Skip to content

Live CTF Orchestration

Capture The Flag (CTF) events require extreme precision. Unlike Bug Bounty where the goal is finding any vulnerability, CTFs require finding a specific vulnerability to read a flag file (e.g., flag.txt).

[!NOTE] The Problem: Generalist AI agents fail at CTFs because they lack the specific strategic knowledge for crypto, pwn, or reverse engineering challenges, and they don't know how to structure an exploit script.

The Solution: Emmu introduces emmuaterasu, a dedicated CTF backend that relies on prompt_engine.py to dynamically generate challenge-specific prompts, and playbooks.py to enforce strict solving methodologies.


1. The Playbook Methodology

When you assign Emmu a CTF challenge, you specify the category (e.g., web, crypto, pwn).

Instead of just telling the AI "Solve this," Emmu loads a specific Playbook from playbooks.py. A playbook is a hardcoded, step-by-step methodology that the AI must follow.

Example: The Crypto Playbook 1. Identify the Algorithm: Do not write code yet. Identify if this is RSA, AES, ECC, or a custom cipher. Wait for Reviewer approval. 2. Mathematical Analysis: Determine the vulnerability (e.g., weak primes, padding oracle). 3. Draft the Solver: Write a solve.py using pwntools or pycryptodome. 4. Execution: Execute the solver locally. 5. Verification: Does the output match the regex format flag{.*}?

By forcing the AI to step through the playbook, Emmu eliminates the erratic guessing behavior typical of LLMs.


2. The Prompt Engine (prompt_engine.py)

The Prompt Engine is responsible for creating the ultimate System Prompt for the CTF Specialist. It aggregates: - The Challenge Description. - The attached files (e.g., a .pcap or an ELF binary). - The current step of the Playbook. - The [BRIDGE PARITY] instructions (so the AI knows it can execute the solver).

It then injects this massive, highly-contextualized prompt into the LLM.


3. Emmuaterasu & Discord Sync

As the AI executes the solve.py script, it may fail (e.g., EOFError from a remote server). The emmuaterasu engine captures stdout and stderr natively and feeds it back to the AI. The AI will read the traceback, realize its payload offset was incorrect, patch solve.py, and run it again.

Simultaneously, this entire process is broadcast to a dedicated Discord thread (via the Discord C2 integration), allowing you to watch the AI's debugging process in real-time and intervene if it gets stuck on a Python syntax issue.