GNU Affero General Public License v3.0

技术解读

以下内容由 GitRead 中文社区 编辑团队基于项目 README 与官方资料整理, 结合中文开发者的常见使用场景补充技术选型建议。具体以项目官方文档为准。

让 LLM 成为自主渗透测试工程师:AIDA 深度技术解析

项目背景与痛点

渗透测试长期被两类问题拖累:人力成本高、重复动作多。信息收集、端口枚举、指纹识别、模板化漏洞验证,这些环节技术含量不高却极其耗时。安全从业者真正有价值的产出集中在"范围外的创造性思考"和"最终裁决"上。

LLM 出现后,很多人尝试把 ChatGPT 塞进安全流程,但大多停留在"帮我解释这个 CVE"或"这段 payload 什么意思"——本质上还是个聊天框。真正缺的是一个系统:能在明确授权边界内,自主规划、调用工具、串联证据、输出可复核结论的智能体。AIDA 的定位恰好落在这里——“你定义 scope,agent 干活,你复核发现”。它把 LLM 从知识库变成了执行者,同时保留人类作为最后的判断关口。

核心技术揭秘

从项目定位推断,AIDA 的技术难点不在于写几个漏洞扫描脚本,而在于如何在"自主性"和"可控性"之间取得平衡。一个能自动调用工具、自主决策下一步的 agent,如果没有硬性边界,就是一台失控的破坏性机器。

整体数据流大致如下:

graph TD A[目标与 Scope 定义] --> B[任务规划器 Planner] B --> C[智能体主循环 Agent Loop] C --> D{"工具选择决策"} D -->|"侦察"| E[信息收集工具集] D -->|"探测与验证"| F[漏洞探测/利用工具集] D -->|"收敛输出"| G[发现聚合与去重] E --> H[沙箱执行与结果解析] F --> H H --> I[上下文记忆 Memory] I --> C G --> J[人工复核与报告]

几个关键设计值得展开:

其一,工具抽象层。 agent 不直接拼 shell 命令,而是调用结构化的工具接口(子域枚举、端口扫描、指纹识别、模板验证等)。工具返回统一格式的结果对象,方便 LLM 消化,也便于事后审计。这层封装质量直接决定 agent 的"手"有多稳。

其二,主循环的决策逻辑。 典型的 ReAct 或 plan-execute 混合模式:Planner 先产出高层次任务序列,Loop 在每一步根据上一轮工具输出决定继续深挖、换目标还是收敛。难点在于上下文压缩——渗透过程会产生海量噪声,如何只把关键证据留在窗口里,是决定成本和准确率的核心。

其三,Scope 强制约束。 这是 AIDA 最不该被忽视的部分。所有工具调用在执行前应做目标校验,把授权范围做成执行层的硬门禁,而不是写在 prompt 里靠模型自觉。真正有价值的实现会把它下沉到代码层——越界即拒,而不是越界靠"求模型别乱来"。

其四,Findings 数据模型。 发现必须以结构化形式落库(目标、类型、证据、复现步骤、置信度),否则"复核"二字无从谈起。这也是它区别于"让 LLM 写一份渗透报告"的关键。

功能亮点与差异

横向对比 PentestGPT、AutoGPT 这类方案,AIDA 的差异点集中在三处:

  • 模型无关:不绑定某一家 API,"turn any LLM"意味着可以按预算和合规要求自由替换模型,这对企业采购是实打实的加分项。
  • Scope 优先:把"授权边界"做成系统的一等公民,而非事后补丁。这一点在安全工具里比任何花哨功能都重要。
  • 人在回路:agent 负责干活,人负责裁决。相比全自动"一键打穿"的叙事,这个定位更诚实,也更符合真实红队流程。

应用场景与落地建议

适合的场景:授权范围内的红队前期侦察、CI/CD 中的安全基线回归、内部资产盘点、安全教学与演练。不建议直接用于生产环境的主动攻击链路——LLM 的幻觉和工具执行的不可控性都还撑不起这个责任。

落地时注意几点:

  1. 硬隔离:执行沙箱务必容器化,网络出站做白名单,避免 agent 误伤内网。
  2. 成本控制:给 agent 设步数上限和 token 预算,否则一次失控的循环能烧掉一笔钱。
  3. 先侦察后攻击:初期只放开信息收集类工具,验证准确率后再逐步开放主动探测。
  4. 证据链留存:所有工具调用和原始输出必须落盘,复核和责任追溯都靠它。

综合评价

优点:定位清醒,模型无关带来灵活性,scope-first 与 human-in-the-loop 的设计哲学符合安全行业真实需求,工具抽象层为后续扩展留出了空间。

短板:LLM 决策的稳定性仍是天花板——误报、循环卡死、无效工具调用在高噪声环境下难以完全避免;工具链成熟度和证据可复现性取决于具体实现,距离"可交付的自动化渗透"还有距离;对操作者的安全素养要求不低,用不好反而放大风险。

一句话总结:AIDA 不是"一键渗透"的银弹,而是一个把 LLM 编排能力工程化的框架雏形——它真正的价值在于重新划定了 AI 在安全流程中的角色边界,这一点比它能扫出多少漏洞更值得关注。

关于

GitHub 原始描述(英文)

Turn any LLM into an autonomous pentester. You define the scope, the agent does the work, you review the findings.

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
681
价值分
330
活跃状态
活跃

语言占比

CSS
Dockerfile
HTML
JavaScript
Jinja
Mako
Python
Shell

README

AIDA Banner

AI-Driven Security Assessment

Autonomous Pentesting Agent

An agent that runs full security assessments end-to-end.
You define the scope. You review the findings.

Quick Start • What It Does • Installation • User Guide • Agent Tools • Discord

License Autonomous Models Version GitHub Stars Discord


AIDA turns any LLM into an autonomous pentester capable of assessing web applications, APIs, and infrastructure. The agent reasons, understands application logic, executes commands in an isolated container, and documents every finding with the commands used.


AIDA Dashboard


Real Results

Claude + AIDA isn’t just talk. It produces results that end up in CVE databases.

ID Severity Project Description
CVE-2026-49869 CRITICAL kestra-io/kestra Unauthenticated RCE via auth bypass + OS command injection (CWE-78/184/287/918)
CVE-2026-50189 / GHSA-xfvv-ggvq-pchh HIGH appsmithorg/appsmith RCE via newline injection in env variable endpoint
CVE-2026-32034 MEDIUM openclaw/openclaw Insecure HTTP permits hijacking
CVE-2026-49979 / GHSA-vvxf-f8q9-86gh MEDIUM appsmithorg/appsmith SSRF via SMTP test endpoint — internal port scanning

More under responsible disclosure — awaiting publication.


What It Does

AIDA was built to give your AI everything a pentester needs to work.

A fully equipped execution environment. A Docker container loaded with Linux pentesting tools — nmap, sqlmap, ffuf, nuclei, and anything else it needs. If a tool is missing, the agent installs it.

Custom exploitation via Python. The agent generates and executes Python scripts on the fly — custom payloads, encoding tricks, protocol quirks, or any logic that off-the-shelf tools can’t handle.

Burp-level HTTP control. The agent sends and manipulates HTTP requests directly — headers, cookies, body, auth tokens. Stored credentials are auto-injected via placeholders. Same power as Burp Repeater, without the UI overhead.

A persistent notebook. The agent logs what it knows about the application, maps attack paths, records observations, flags interesting behaviors, and documents every confirmed vulnerability — commands used, raw output, full context. Stop an engagement and resume it days later for retest, deeper analysis, or handoff.

Where is the real pentester?

You review. The AI hands you findings with full context notes, commands, reproduction steps, and the reasoning that led there. You reproduce, triage, prioritize, and report.

Your expertise stays where it matters. The grunt work runs on its own.


Quick Start

Prerequisites: Docker Desktop + any AI client (Claude, Gemini, GPT…)

git clone https://github.com/Vasco0x4/AIDA.git
cd AIDA
./start.sh

Dashboard: http://localhost:31337

./start.sh --dev — hot reload for contributors ./start.sh --lan — share across your local network (HTTPS, self-signed) ./start.sh --domain x.com — public deploy with Let’s Encrypt ./start.sh --localhost — run commands directly on the host (no pentest container) — see Localhost Mode

Launch the Agent

# Launches Claude Code by default
python3 aida.py --assessment "target-corp"

# Auto-detect Claude, Codex, Kimi, or Qwen
python3 aida.py --assessment "target-corp" --cli auto

# Force OpenAI Codex
python3 aida.py --assessment "target-corp" --cli codex

# No confirmation prompts
python3 aida.py --assessment "target-corp" --yes

Define Your Scope

Load assessment 'target-corp' and start the pentest on https://example.com
Scope: all subdomains, authentication flows, API endpoints
Exclude: brute-force on /login

Full setup for all AI clients → INSTALLATION.md


Supported Models

AIDA is model-agnostic. Any LLM with tool-calling support works.

Client Setup
Claude Code python3 aida.py (automatic)
OpenAI Codex CLI python3 aida.py --cli codex (automatic)
Kimi Code CLI python3 aida.py (automatic)
External API (OpenAI-compatible) python3 aida.py --base-url
Claude Desktop MCP config
ChatGPT Desktop MCP config
Gemini CLI MCP config

The smarter the model, the deeper the engagement. Swap models without changing anything else.


Agent Tools

Tool
execute() Run any command in the pentesting container
scan() nmap, gobuster, ffuf, nikto, dirb
subdomain_enum() Subdomain discovery
ssl_analysis() TLS/SSL audit
tech_detection() Technology fingerprinting
python_exec() Execute Python in the container
http_request() HTTP client with credential auto-substitution
add_card() Log a finding — CVSS 4.0 auto-scored
credentials_add() Store credentials, auto-injected via {{PLACEHOLDER}}

Built-in aida-pentest container (~2 GB, starts automatically). Plug in Exegol for 400+ tools — switchable anytime from the dashboard.

Full reference → MCP_TOOLS.md


What’s New in v1.1.0

  • Authentication — JWT, admin/user roles, first-run setup wizard
  • PDF reports — one-click export per assessment
  • CVSS 4.0 — automatic scoring on every finding
  • Attack timeline — auto-generated per engagement
  • Notifications — Telegram, Slack, Email with optional PDF attachment
  • Assessment templates — start from predefined methodologies
  • aida-pentest container — lightweight built-in environment, no Exegol required
  • python_exec + http_request — advanced execution tools
  • Cross-assessment findings view — aggregate and filter findings across all engagements
  • Security hardening — Docker socket proxy, path traversal prevention, localhost-only DB

!! Run locally or on your LAN. Do not expose the dashboard to the public. !!


Documentation

INSTALLATION.md Full setup — all AI clients
USER_GUIDE.md Platform usage guide
MCP_TOOLS.md Agent tool reference
ARCHITECTURE.md Technical deep dive

Contributing

AIDA is actively developed.

Planned:

  • OWASP testing guidelines integration
  • Multi-agent mode — specialized sub-agents per phase
  • Active Directory / internal network module
  • Enhanced CLI capabilities

Issues and PRs welcome → GitHub Issues


License

AGPL v3 — free and open source.


Credits

  • Anthropic MCP — the tool-calling protocol powering agent actions
  • Exegol — supported as alternative container
  • The security community for the open-source tooling

Questions or feedback? Join the community on Discord

⭐ Star on GitHub • 💬 Discord • Report Bug • Contact

评论

暂无评论