Skip to content

emmuOEC (Campaign-Centric Analysis)

emmuOEC (Emmu Operational Engagement Campaigns) is the framework's flagship static and dynamic analysis mode. It is designed for deep, iterative auditing of source code repositories, large binary structures, or massive infrastructure dumps.

[!NOTE] The Problem: Single-pass AI scans (like dragging a file into ChatGPT) miss complex vulnerability chains. If an AI reads 10,000 lines of code once, it cannot correlate an input validation flaw in controller.py with a dangerous sink in database.py.

The Solution: emmuOEC operates on a Campaign Workflow Loop. The AI is forced to iterate over the target multiple times (e.g., 10 passes), saving its state to memory between each pass, allowing it to build deep contextual awareness.


1. The Campaign Loop

When you launch a campaign against a target (e.g., a massive GitHub repository), emmuOEC's manager.py initiates the pipeline.

By default, Emmu sets the execution loop to 10. (Setting it to 0 enables infinite mode).

stateDiagram-v2
    [*] --> Target_Ingestion
    Target_Ingestion --> Initial_Triage

    state "Campaign Workflow Loop (10 Passes)" as Loop {
        Initial_Triage --> Specialist_Analysis
        Specialist_Analysis --> Reviewer_Gate

        Reviewer_Gate --> Memorize_State: Approved
        Reviewer_Gate --> Specialist_Analysis: Rejected (Retry)

        Memorize_State --> Save_Findings
    }

    Save_Findings --> Specialist_Analysis: Next Iteration
    Save_Findings --> [*]: Max Loops Reached

Pass 1-3: Recon & Triage

The AI is instructed to perform broad sweeps. It identifies the tech stack, maps the routing architecture, and lists potential points of interest. It calls update_emmuoec_finding to save these as "Low Confidence" leads.

Pass 4-7: Deep Dive

The AI reads its own memory from the previous passes. It now focuses exclusively on the leads it generated. If it suspected an IDOR, it will now ask the MCP bridge to grep for the exact SQL queries handling that IDOR.

Pass 8-10: Exploit Formulation

The AI verifies the vulnerabilities and attempts to formulate a Proof of Concept (PoC). The Reviewer agent strictly gates these PoCs before they are marked as "High Confidence."


2. emmuOEC Memory Management

The secret to the 10-pass loop is core/emmuOEC/memory.py.

Instead of relying on the LLM's internal context window, emmuOEC maintains an external, vectorized or structured memory state for the campaign. Between every loop, the Orchestrator pulls the latest findings from this memory and injects them into the System Prompt for the next iteration.

This means that even if a campaign takes 48 hours and the AI is restarted, the AI immediately regains 100% of its previous context.


3. Plugin Architecture

emmuOEC is highly extensible via plugin_registry.py. You can write custom Python plugins that trigger between loops. For example, you could write a plugin that runs Semgrep natively on the repository during Pass 1, and feeds the Semgrep output directly into the AI's memory before Pass 2 begins.