--- source: https://adversaryvillage.org/adversary-events/DEFCON-34/Jun-Miura/ created: 2026-08-09T10:30:00 github: https://github.com/jyadon/Red_Agent_Workshop --- ## Overview With recent advances in AI technology, large language models (LLMs) are increasingly being applied to red team engagements. In this context, current uses of LLMs have mainly focused on automating or streamlining operations during the engagement itself. However, the potential benefits of LLMs extend beyond this. We have developed "Red Agent", a kind of AI agent system designed to enhance the entire lifecycle of red team engagements. In a typical approach, after a red team engagement, blue team members should implement remediation measures based on the engagement report. It is necessary to evaluate their effectiveness, which often becomes a bottleneck because it requires substantial manual effort of both blue and red team members to interpret the findings on the report, reproduce relevant attack paths, and verify mitigations. In particular, "Red Agent" focuses on and automates this follow-up process, and significantly reduced the workload. In contrast, the introduction of "Red Agent" also led to the optimization of key engagement artifacts produced by the red team, including operational logs and report structures, for the efficient follow-up process. Moreover, by accumulating refined data and knowledge and applying them to tasks such as model training, "Red Agent" can be utilized in the operations of red team engagements. As a result, "Red Agent" reconstructed the entire life cycle of red team engagements - by clearly defining the division of labor between manual tasks and AI-driven tasks, red team members were able to focus on more advanced operations, thereby successfully enhancing the value of the engagement itself. This talk provides not only the technical details of Red Agent, but also demo and case-study. ## Notes ### Red Team Engagement - Does adversary emulation - After the test, the validation process requires substantial manual effort from both blue and red team members to interpret the findings - Red Agent is designed to automate this workflow - A multi-agent system to make this validation process repeatable and scalable - Has an orchestrator agent to manage the sub-agents: - Understand the report - Plan re-test procedures - Task execution - Interpret and summarize execution results ### Architecture ![Red Agent architecture diagram](images/red-agent-architecture.jpg) #### Deep Agent - Agents for long-running tasks with memory, planning, and delegation tools #### Custom Kali MCP Server - Lets the agent execute commands on Kali Linux - Existing MCP servers were too limited for re-testing workflows - Built to support more flexible command execution #### Human-in-the-Loop - Part of the process to validate actions before the agent takes them - Can approve, edit, or reject the agent's actions - Rejecting will skip the action ### Capabilities - Creates documents and artifacts that are LLM/agent-friendly - The structured artifacts help as we accumulate data and knowledge to analyze information over time, extending the agent's capabilities over time - Enables the human to focus on more advanced operations and the value-add creative work ### From the Repo - Three-tier architecture: a Vite + React frontend (port 5173) for reviewing findings and managing retest execution with human approval gates; a FastAPI backend (port 8000) that orchestrates the verification workflow, handles credential management, generates commands via LLM, and persists results to SQLite; and an execution layer where commands run through the Kali MCP server over stdio (with optional SOCKS5 proxying to the target network) - DC auto-discovery pulls Active Directory domain controller info via DNS/SMB; Entra support integrates with `roadrecon` for cloud identity verification - Audit logging retains operations for 180 days by default - Quick setup: `make install` (dependencies + `.env` template) → set `LLM_BASE_URL` in `.env` → `make dev` (starts frontend + API) → UI at `http://localhost:5173` (auth disabled by default for local trials) ### Repo Bugs / Follow-ups Found while setting up the repo locally ahead of the workshop (macOS, Python 3.11, `make install` + `make dev`): - **Missing `greenlet` dependency** — not pinned in `requirements.txt`. Without it, SQLAlchemy's async engine throws on every DB operation (`ValueError: the greenlet library is required to use this function`), which broke the periodic audit-log prune job and would break retest history persistence. Fixed locally with `venv/bin/pip install greenlet`; the real fix is adding `greenlet` to `requirements.txt`. - **Fixed and submitted upstream**: added `greenlet==3.5.4` to `requirements.txt`, verified with a clean uninstall/reinstall from `requirements.txt` + a `make dev` smoke test (no more errors, DB inits cleanly). Forked to `bryancowan/Red_Agent_Workshop`, pushed branch `fix/missing-greenlet-dependency`, opened PR: https://github.com/jyadon/Red_Agent_Workshop/pull/1