
ENDGAME C2 FRAMEWORK — AI-powered command and control for professional red team operations
ENDGAME is a professional command and control framework built for authorized red team engagements, penetration testing, and educational security research. Designed to simulate realistic adversary techniques, assess detection coverage, and help security teams understand their defensive gaps — with a built-in AI Console that turns natural language into executed commands and automatically analyzes every result.
Hecho con IA, pensado y dirigido por un humano.
🌐 endgamec2framework.com · 📄 Documentation



git clone https://github.com/endgamec2framework/endgame
cd endgame
./install.sh
Re-run ./install.sh to update — it will pull the latest code and rebuild while preserving certificates and operator profiles.
Full setup guide: Documentation → Installation
ENDGAME's AI Console is a first-class feature that brings an AI co-pilot directly into the operator workflow. It's not a chatbot tacked on the side — it lives in the same panel as your agent terminals, knows the full C2 command set, and has real-time context about the target: hostname, OS, user, privileges, and transport.
🤖 tab opens in the bottom console pane — side by side with your regular terminal tabs


Any model available in your Ollama instance works. Recommended for red team context:
qwen3.6:latest — default · fast · good instruction followingqwen3.6:35b-a3b-coding-mxfp8 — larger · stronger code/command reasoningdeepseek-r1:8b / deepseek-r1:32b — reasoning models · good at multi-step attack chains✓ = implemented · 🔧 = in progress / planned · — = not available
Building for Linux (from a Linux host — agents are compiled natively):
# Go
GOOS=linux GOARCH=amd64 go build -o agent_linux .
# Rust
cargo build --release --target x86_64-unknown-linux-gnu
# C
make -f Makefile.linux AGENT_SERVER_URL=https://<c2>:<port>
# Nim
./build_linux.sh
Agent transports: HTTP · HTTPS · mTLS · DNS · DoH · SMB pipe · TCP
Mesh relay: agents can register as HTTP or TCP pivots; when an agent loses direct connectivity to the teamserver (≥ 3 consecutive beacon failures), it automatically falls back to any known peer and relays its beacon through that agent's existing transport. The teamserver distributes the peer list in every beacon response so agents always have a current fallback. Unlike fully decentralised P2P overlays (libp2p/DHT), relay paths in ENDGAME are operator-designated and logged — the operator decides which agent acts as pivot, and the relay chain is always explicit and stoppable on demand.
Evasion: AMSI (VEH/DR0) · ETW blind · NTDLL unhook · Ekko XOR sleep masking · indirect syscalls (Hell's Gate) · stack spoofing · API hashing (PEB walk) · PPID spoof · anti-sandbox · header wipe · UDRL phantom DLL · BLOCKDLLS · DNS canary burn detection
Injection: remote thread · APC early-bird · thread hijack · fork-and-run · hollowing
Post-ex: screenshot · keylogger · clipboard · LSASS dump · token theft · UAC bypass · persistence
Network discovery: ARP (returns MAC, no elevation on Windows) · ICMP ping sweep · TCP probe — selectable per scan
Lateral movement: psexec · smbexec · atexec · wmi · dcom · winrm · ssh
MITRE ATT&CK: 50+ commands mapped across 12 tactics · Navigator layer export · technique matrix in GUI
See the full documentation for commands, API reference, IOC list, and operator guide.
ENDGAME implements controlled mesh relay rather than a fully decentralised P2P overlay. Relay paths are operator-designated: the operator chooses which agent acts as pivot, and the relay chain is explicit, stoppable on demand, and logged — no dependency on public DHT infrastructure like libp2p that enterprise firewalls routinely block.
Cross-platform agents: All four agents now support Windows and Linux. The Go agent additionally supports macOS. Platform-specific features (Windows evasion, AMSI/ETW patching, Hell's Gate syscalls, stack spoofing, token theft, PE injection) are Windows-only and are compiled out on Linux; the Linux build retains the full beacon, shell, file ops, SOCKS5, port scan, persistence, credential harvesting, and pivot functionality. See the Platform support matrix below for per-feature detail and the build_linux.sh script in each agent directory for Linux compilation.
DNS canaries: each payload build embeds a unique per-build canary subdomain. When a sandbox or AV scanner dynamically analyses the binary, the agent's startup DNS lookup resolves canary.<token>.<c2_domain> — intercepted by the C2's authoritative DNS server — and the operator receives a real-time burn alert via the events stream. Canaries are tracked per-build in the database and never reused.
Indirect syscalls + stack spoofing (Nim): syscalls.nim resolves SSNs at runtime via Hell's Gate (reads mov eax,SSN from ntdll stubs) with Halo's Gate fallback for EDR-patched stubs. When both a syscall;ret gadget and a call rel32;ret gadget are found in ntdll .text, the agent upgrades to 110-byte spoofed stubs that plant the gadget address at [RSP] before the syscall — making the call-stack visible to EDR appear to originate from within ntdll rather than agent code.
API hashing (C): api_resolve.c uses DJB2 hashing and a PEB InLoadOrderModuleList walk to resolve 33 sensitive WinAPI functions at runtime. None of these functions appear in the binary's import table.



HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon after running SharpUp. No exploit required.
This tool is for authorized security testing, educational use, and lab environments only. Use against systems without explicit written authorization is illegal and strictly prohibited. By using this software you agree to the Ethical Use Policy.
Please do not open issues regarding EDR/AV detection. Default builds include known IOCs — see IOC documentation. Operators should recompile with custom certs, build flags, and malleable profiles for authorized engagements.
| Capability | Detail |
|---|
| Integrated into console pane | Opens as a tab — no floating modal, no context switch |
| Full C2 command awareness | System prompt includes every available command, the agent's OS/arch/privileges, transport, and current task queue |
| Streaming responses | Tokens stream in real time as the model generates them |
| Auto-analysis loop | After every command execution the output is automatically sent back to the AI for interpretation and next-step recommendation |
| Multi-session | Open AI Console for multiple agents simultaneously — each tab maintains independent chat history |
| Provider agnostic | Works with Ollama (local, offline) or Anthropic Claude API — whichever is configured in the AI tab |
| Confirm before execute | Every suggested command requires an explicit click — the AI never sends tasks autonomously |
| Component | Summary |
|---|
| Server | Go binary · multi-operator teamserver · SQLite op-log · mTLS API :31337 · DNS canary burn alerts |
| Web GUI | Kill-chain graph (auto-refresh) · agent console · AI Console · loot manager · AI assistant · multi-operator |
| Agent (Go) | Windows · Linux · macOS · 7 transports · full evasion suite · API hashing (PEB walk, 22 fns off IAT) · Kerberos ops · inline PE loader · CONFIG runtime · ~13 MB |
| Agent (Nim) | Windows · Linux · 7 transports incl. SMB pipe · indirect syscalls (Hell's Gate) · stack spoofing · NTDLL unhook · API hashing (PEB walk, 22 fns off IAT) · inline PE loader · BOF + .NET CLR · keylogger · SOCKS5 · ISHELL · browser creds · lateral movement · anti-sandbox · ~1 MB |
| Agent (Rust) | Windows · Linux (x64) · 7 transports · indirect syscalls (Hell's Gate) · AMSI patch · sleep masking · API hashing · stack spoofing · NTDLL unhook · anti-sandbox · working hours · DNS canary · Kerberos ops · inline PE loader · BOF + .NET CLR · ISHELL · screenwatch · full injection suite · BLOCKDLLS · PEB spoof · ETW patch · browser creds · keylogger · SOCKS5 · lateral movement (8 methods) · ~507 KB |
| Agent (C) | Windows · Linux (x64) · 7 transports · EXE + DLL format · API hashing (PEB walk, 35 fns off IAT) · PPID spoof · anti-sandbox · Kerberos ops · inline PE loader · NTDLL unhook · keylogger · SOCKS5 · ISHELL · browser creds · .NET CLR · BOF · lateral movement · ~130 KB |
| Loaders | C / Go / Nim / shellcode stubs |
| Reports | HTML · JSON · CSV · MITRE ATT&CK Navigator layer · AI executive summary |
| Go (Ekko) | Nim | Rust | C |
|---|
| Platform | Win · Linux · macOS | Win · Linux | Win · Linux | Win · Linux |
| Size | ~13 MB | ~1.2 MB | ~507 KB | ~130 KB |
| Transports | HTTP · HTTPS · mTLS · DNS · DoH · SMB · TCP | HTTP · HTTPS · mTLS · DNS · DoH · SMB · TCP | HTTP · HTTPS · mTLS · DNS · DoH · SMB · TCP | HTTP · HTTPS · mTLS · DNS · DoH · SMB · TCP |
| DLL format | ✓ | ✓ | ✓ | ✓ |
| Shell / file ops / sysinfo | ✓ | ✓ | ✓ | ✓ |
| Upload / Download | ✓ | ✓ | ✓ | ✓ |
| Screenshot | ✓ | ✓ | ✓ | ✓ |
| Screenwatch (live) | ✓ | ✓ | ✓ | ✓ |
| Keylogger | ✓ | ✓ | ✓ | ✓ |
| Clipboard monitor | ✓ | ✓ | ✓ | ✓ |
| LSASS dump (MINIDUMP) | ✓ | ✓ | ✓ | ✓ |
| AMSI patch | ✓ (VEH / DR0) | ✓ | ✓ xor-ret patch | ✓ |
| ETW blind | ✓ | ✓ + NtSetInfoProcess | ✓ EtwEventWrite patch | ✓ |
| NTDLL unhook | ✓ | ✓ | ✓ | ✓ |
| Indirect syscalls | ✓ Hell's Gate + Halo's Gate | ✓ Hell's Gate + Halo's Gate | ✓ Hell's Gate + Halo's Gate | ✓ Hell's Gate + Halo's Gate |
| Stack spoofing | ✓ call-preceded RET gadget | ✓ 110-byte spoofed stubs | ✓ 110-byte spoofed stubs | ✓ 110-byte spoofed stubs |
| API hashing (IAT removal) | ✓ DJB2 + PEB walk · 22 fns | ✓ DJB2 + PEB walk · 22 fns | ✓ DJB2 + PEB walk · 21 fns | ✓ DJB2 + PEB walk · 35 fns |
| Sleep masking | ✓ Ekko XOR + NOACCESS | ✓ XOR non-exec sections + NtDelayExecution | ✓ XOR + NtDelayExecution | ✓ XOR + NOACCESS |
| Anti-sandbox | ✓ 12-check score model | ✓ CPU/RAM/disk/idle checks (-d:SandboxChecks) | ✓ CPU/RAM/disk/username score | ✓ score model |
| CONFIG runtime | ✓ sleep · jitter · working hours · inject method | ✓ sleep · jitter · working hours | ✓ sleep · jitter | ✓ sleep · jitter · working hours |
| Working hours gating | ✓ | ✓ | ✓ | ✓ |
| DNS canary | ✓ startup burn lookup | ✓ startup burn lookup | ✓ startup burn lookup | ✓ startup burn lookup |
| PE header wipe | ✓ | ✓ | ✓ | ✓ |
| HWBP clear | ✓ | ✓ | ✓ | ✓ |
| PPID spoof | ✓ | ✓ | ✓ | ✓ |
| BLOCKDLLS / PEB spoof | ✓ | ✓ | ✓ | ✓ |
| EDR silence (ETW/hook) | ✓ | ✓ | ✓ | ✓ |
| Hook + HWBP detection | ✓ | ✓ | ✓ | ✓ |
| Kerberos (klist · ptt · purge) | ✓ LSA API | ✓ LSA API | ✓ LSA API | ✓ LSA API |
| Inline PE execution | ✓ full PE64 loader | ✓ full PE64 loader | ✓ full PE64 loader | ✓ full PE64 loader |
| Process injection | ✓ remote · APC · hijack · fork-and-run · hollow | ✓ remote · APC | ✓ remote · APC · hijack · fork-and-run · hollow | ✓ remote · APC |
| BOF / .NET CLR | ✓ | ✓ BOF + .NET CLR | ✓ BOF + .NET CLR | ✓ BOF + .NET CLR |
| Token theft / impersonation | ✓ | ✓ | ✓ | ✓ |
| Token vault (store · reuse) | ✓ | ✓ | ✓ | ✓ |
| GETSYSTEM / UAC bypass | ✓ | ✓ | ✓ | ✓ |
| Persistence | ✓ | ✓ | ✓ | ✓ |
| Lateral movement | ✓ psexec · smbexec · atexec · wmi · dcom · winrm · ssh · runas | ✓ psexec · smbexec · atexec · wmi · dcom · winrm · ssh · runas | ✓ psexec · smbexec · atexec · wmi · dcom · winrm · ssh · runas | ✓ psexec · smbexec · atexec · wmi · dcom · winrm · ssh · runas |
| SOCKS5 / port forward | ✓ | ✓ | ✓ | ✓ |
| Reverse SOCKS | ✓ | ✓ | ✓ | ✓ |
| Port scan | ✓ | ✓ | ✓ | ✓ |
| Mesh relay pivot | ✓ HTTP + TCP | ✓ HTTP + TCP | ✓ HTTP + TCP | ✓ HTTP + TCP |
| Credential harvesting | ✓ GPP · WiFi · Browser · NTDS | ✓ GPP · WiFi · Browser · NTDS | ✓ WiFi · Browser | ✓ GPP · WiFi · Browser · NTDS |
| Registry ops | ✓ | ✓ | ✓ | ✓ |
| ADS (read · write · list · delete) | ✓ | ✓ | ✓ | ✓ |
| COM hijack | ✓ | ✓ | ✓ | ✓ |
| Timestomp | ✓ | ✓ | ✓ | ✓ |
| Interactive shell (ISHELL) | ✓ | ✓ | ✓ | ✓ |
| MITRE ATT&CK | 50+ cmds · 12 tactics | evasion · post-ex · lateral | evasion · post-ex · lateral | evasion · post-ex · lateral |
| Feature | Windows (all agents) | Linux (Go · Rust · C · Nim) | macOS (Go only) |
|---|
| Beacon + beaconing (HTTP/HTTPS/mTLS/TCP/DNS) | ✓ | ✓ | ✓ |
| Shell / file ops / upload / download | ✓ | ✓ | ✓ |
| SYSINFO / PS / ENV | ✓ | ✓ | ✓ |
| Port scan | ✓ | ✓ | ✓ |
| SOCKS5 / reverse SOCKS / port forward | ✓ | ✓ | ✓ |
| Mesh relay pivot (HTTP + TCP) | ✓ | ✓ | ✓ |
| Persistence | ✓ registry/service/schtask | ✓ cron / systemd user | ✓ LaunchAgent |
| Screenshot | ✓ GDI | ✓ ImageMagick (if X11) | ✓ |
| Credential harvesting | ✓ Browser · WiFi · GPP · NTDS | ✓ Browser (Linux paths) | ✓ Browser |
| Windows-only (evasion) | |||
| AMSI patch / ETW blind | ✓ | — | — |
| Indirect syscalls (Hell's Gate) | ✓ | — | — |
| Stack spoofing (110-byte stubs) | ✓ | — | — |
| API hashing / IAT removal | ✓ | — | — |
| Sleep masking (XOR + NOACCESS) | ✓ | — | — |
| NTDLL unhook | ✓ | — | — |
| PPID spoof / BLOCKDLLS / PEB spoof | ✓ | — | — |
| Token theft / UAC bypass | ✓ | — | — |
| Process injection | ✓ | — | — |
| Inline PE exec / .NET CLR | ✓ | — | — |
| Keylogger / clipboard monitor | ✓ | — | — |
| Lateral movement (8 methods) | ✓ | — | — |
| Kerberos (klist/ptt/purge) | ✓ | — | — |