All Projects → redcanaryco → Chain Reactor

redcanaryco / Chain Reactor

Licence: mit
Chain Reactor is an open source framework for composing executables that simulate adversary behaviors and techniques on Linux endpoints.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Chain Reactor

ezEmu
See adversary, do adversary: Simple execution of commands for defensive tuning/research (now with more ELF on the shelf)
Stars: ✭ 89 (-56.8%)
Mutual labels:  security-testing, mitre-attack
Caldera
Automated Adversary Emulation Platform
Stars: ✭ 3,126 (+1417.48%)
Mutual labels:  security-testing, mitre-attack
Web Methodology
Methodology for high-quality web application security testing - https://github.com/tprynn/web-methodology/wiki
Stars: ✭ 142 (-31.07%)
Mutual labels:  security-testing
0x00sec code
Code for my 0x00sec.org posts
Stars: ✭ 190 (-7.77%)
Mutual labels:  elf
Pcap Attack
PCAP Samples for Different Post Exploitation Techniques
Stars: ✭ 175 (-15.05%)
Mutual labels:  mitre-attack
Rustig
A tool to detect code paths leading to Rust's panic handler
Stars: ✭ 145 (-29.61%)
Mutual labels:  elf
Faerie
Magical ELF and Mach-o object file writer backend
Stars: ✭ 187 (-9.22%)
Mutual labels:  elf
Elfhooker
兼容Android 32位和64位。基于EFL文件格式Hook的demo,hook了SurfaceFlinger进程的eglSwapBuffers函数,替换为new_eglSwapBuffers
Stars: ✭ 138 (-33.01%)
Mutual labels:  elf
Lief
Authors
Stars: ✭ 2,730 (+1225.24%)
Mutual labels:  elf
Elf Parser
Lightweight elf binary parser with no external dependencies - Sections, Symbols, Relocations, Segments
Stars: ✭ 172 (-16.5%)
Mutual labels:  elf
Apk Medit
memory search and patch tool on debuggable apk without root & ndk
Stars: ✭ 189 (-8.25%)
Mutual labels:  security-testing
Mandibule
linux elf injector for x86 x86_64 arm arm64
Stars: ✭ 171 (-16.99%)
Mutual labels:  elf
Libdiffuzz
Custom memory allocator that helps discover reads from uninitialized memory
Stars: ✭ 147 (-28.64%)
Mutual labels:  security-testing
Checksec.py
Checksec tool in Python, Rich output. Based on LIEF
Stars: ✭ 188 (-8.74%)
Mutual labels:  elf
Exodus
Painless relocation of Linux binaries–and all of their dependencies–without containers.
Stars: ✭ 2,560 (+1142.72%)
Mutual labels:  elf
Litmus test
Detecting ATT&CK techniques & tactics for Linux
Stars: ✭ 190 (-7.77%)
Mutual labels:  mitre-attack
Metasploit Cheat Sheet
Metasploit Cheat Sheet 💣
Stars: ✭ 139 (-32.52%)
Mutual labels:  security-testing
Elf Dump Fix
Utils use to dump android ELF from memory and do some fix including the ELF section header rebuilding
Stars: ✭ 166 (-19.42%)
Mutual labels:  elf
Elfkit
rust elf parsing, manipulation and (re)linking toolkit
Stars: ✭ 180 (-12.62%)
Mutual labels:  elf
Elfhook
modify PLT to hook api, supported android 5\6.
Stars: ✭ 202 (-1.94%)
Mutual labels:  elf

Chain Reactor

Announcement blog post: https://redcanary.com/blog/chain-reactor-framework-for-linux/

Chain Reactor is an open source framework for composing executables that can simulate adversary behaviors and techniques on Linux endpoints. Executables can perform sequences of actions like process creation, network connections and more, through the simple configuration of a JSON file.

Chain Reactor assumes no prior engineering experience and can easily leverage tests or techniques from Atomic Red Team and MITRE ATT&CK.

How does it work?

Chain Reactor is responsible for running a reaction, which is composed of a list of objectives, called atoms. Each atom can contain one or many actions, called quarks. Quarks specify the action to take and the subsequent arguments to use.

While this might sound complex at first, this structure helps with pre-stage setup, multi-stage objectives, and post-stage cleanup.

Getting Started

Chain Reactor requires python3.

Install dependencies:

Debian:

sudo apt install musl-tools

RPM:

sudo yum install musl-tools

Note: If your repository system doesn't contain musl-tools, you can build it from source:

git clone git://git.musl-libc.org/musl
cd musl && ./configure && sudo make install

Build Chain Reactor:

make

An illustrative example

Let’s start with a basic chain reaction:

reaction.json

{
    "name": "simple_reaction",
    "atoms": [
        "HIDDEN-PROCESS-EXEC"
    ]
}

atoms.json

[
    {
        "name" : "HIDDEN-PROCESS-EXEC",
        "execve" : [ "mkdir", "-p", "/tmp/.hidden" ],
        "copy" : [ "/proc/self/exe", "/tmp/.hidden/.chain_reactor_hidden" ],
        "execveat" : [ "/tmp/.hidden/.chain_reactor_hidden", "exit" ],
        "remove" : [ "/tmp/.hidden" ]
    }
]

To build the ELF executable, we run the following:

python3 compose_reaction atoms.json reaction.json <output_name_for_executable>

The details:

  • The chain reaction simple_reaction is composed of one objective (atom) called HIDDEN-PROCESS-EXEC.
  • This atom is composed of four actions (quarks).
  • The first quark utilizes the execve system call to create a hidden directory.
  • The second quark utilizes a built-in function to copy the current running chain reactor process (/proc/self/exe) to the newly created hidden directory as a hidden file.
  • The third quark utilizes a different system call, execveat, to execute the hidden chain reactor binary. The exit argument instructs the newly created chain reactor process to exit without performing additional operations.
  • The fourth quark deletes the hidden directory and hidden file.

Here are some questions this chain reaction can help you answer:

  • Visibility: Does my endpoint security product collect telemetry for all four quarks? Does it handle one, many, or all system calls that can be used to execute a binary?
  • Detection: Does my endpoint security product alert me to the execution of a hidden binary in a hidden directory?

Documentation

Additional details about reactions, atoms, and quarks can be found here

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].