chainreactors/aiscan

GitHub: chainreactors/aiscan

aiscan 是一款结合 LLM Agent 与传统扫描引擎的红队安全评估工具,支持确定性扫描、自然语言自主评估及多 Agent 分布式协作。

Stars: 68 | Forks: 10

aiscan logo

aiscan

Agentic Security Scanner — AI-driven reconnaissance meets deterministic scanning

Preview — APIs and features may change between releases

Release CI Downloads AGPL-3.0 Stars

中文文档

**aiscan** 将 LLM agent 与传统安全扫描引擎相结合。提供三种模式:**Scan**(确定性 pipeline,可选 AI 辅助)、**Agent**(自然语言自主评估)、**IOA**(多 agent 分布式协作)。 ## 快速开始 ``` # 无需 LLM — 单行扫描 aiscan scan -i 192.168.1.0/24 # 使用 LLM — 单行 agent aiscan agent --base-url "https://api.deepseek.com" --api-key "sk-..." --model deepseek-chat \ -p "scan targets and check for high-risk vulnerabilities" -i 192.168.1.0/24 ``` ## 安装 ### 下载二进制文件 从 [GitHub Releases](https://github.com/chainreactors/aiscan/releases/latest) 下载: | 版本 | 描述 | | --- | --- | | **aiscan** | 标准版 — scan/agent/gogo/spray/zombie/neutron/proton/arsenal | | **aiscan-full** | 完整版 — 增加 playwright 浏览器、被动侦察、katana 爬虫 | | **aiscan-agent** | 轻量级 agent 运行时,非常适合远程 worker 部署 | | 操作系统 | 架构 | 标准版 | 完整版 | Agent | | --- | --- | --- | --- | --- | | Linux | amd64 / arm64 | `aiscan_linux_amd64` | `aiscan-full_linux_amd64` | `aiscan-agent_linux_amd64` | | macOS | Intel / Apple Silicon | `aiscan_darwin_amd64` | `aiscan-full_darwin_arm64` | `aiscan-agent_darwin_arm64` | | Windows | amd64 | `aiscan_windows_amd64.exe` | `aiscan-full_windows_amd64.exe` | `aiscan-agent_windows_amd64.exe` | ``` # Linux curl -L -o aiscan https://github.com/chainreactors/aiscan/releases/latest/download/aiscan_linux_amd64 chmod +x aiscan && sudo mv aiscan /usr/local/bin/ # macOS curl -L -o aiscan https://github.com/chainreactors/aiscan/releases/latest/download/aiscan_darwin_arm64 chmod +x aiscan && sudo mv aiscan /usr/local/bin/ # Windows (PowerShell) Invoke-WebRequest "https://github.com/chainreactors/aiscan/releases/latest/download/aiscan_windows_amd64.exe" -OutFile aiscan.exe ``` ### 从源码编译 ``` git clone https://github.com/chainreactors/aiscan.git && cd aiscan go build -o aiscan ./cmd/aiscan # standard go build -tags full -o aiscan-full ./cmd/aiscan # full (playwright/katana/passive) ``` ## 功能 ### 设计 - **单一二进制文件,零依赖** — 静态编译,开箱即用的部署 - **极简的 agent 核心** — 可组合的约 160 行核心循环;工具、重试、评估机制均为插拔式设计,而非硬编码 - **插件化架构** — 添加新工具只需一个文件;重度依赖(playwright、katana)在编译时为可选项 - **内嵌技能** — 每个工具自带使用文档和战术指导,由 agent 按需加载 - **Scan 与 Agent 统一** — 相同的引擎同时驱动确定性 pipeline 和自主 agent ### Scan — 确定性 Pipeline - 多阶段自动链路:端口发现 → Web 探测 → 弱口令 → POC 检测 — 无需 LLM - 可选的 AI 驱动的结果验证、公开 CVE 关联以及动态测试 - 快速模式用于快速测绘暴露面,完整模式用于深度爬取和扩大覆盖范围 ### Agent — 自主安全评估 - 自然语言任务 — agent 自主进行规划、扫描、分析和报告 - 目标评估 — 独立的评估器判断任务完成情况并驱动自动重试 - 交互式 REPL,支持直接执行命令 - 多 provider 故障转移机制,保证鲁棒性 ### [IOA](https://github.com/chainreactors/ioa) — 多 Agent 协作 - 用于分布式 agent 协调的共享消息空间 - 用于持久化任务监听的 worker 模式 - 内置支持 token 认证的 IOA 服务器 - 详情:[设计](https://github.com/chainreactors/ioa/blob/main/docs/design.md) | [CLI](https://github.com/chainreactors/ioa/blob/main/docs/cli.md) | [扩展](https://github.com/chainreactors/ioa/blob/main/docs/extension.md) ### 内置工具集 **扫描器** - [gogo](https://github.com/chainreactors/gogo) — 端口、服务和 banner 发现 - [spray](https://github.com/chainreactors/spray) — Web 探测、指纹识别、路径 fuzzing - [zombie](https://github.com/chainreactors/zombie) — 凭证测试 - [neutron](https://github.com/chainreactors/neutron) — 基于模板的 POC 执行 - [proton](https://github.com/chainreactors/proton) — 敏感信息扫描(API 密钥、token、凭证、机密信息) - [cyberhub](https://github.com/chainreactors/fingers) — 指纹与 POC 关联查询 **浏览器与侦察**(完整版) - playwright — 无头 Chromium 会话、截图、网络流量捕获 - katana — 具备标准/无头/混合引擎的 Web 爬虫 - passive — 网络空间测绘搜索(FOFA、Hunter、Shodan) **实用工具** - tmux — 带有增量输出交付的后台任务会话 - arsenal — 安全工具包管理器([crtm](https://github.com/chainreactors/crtm)),一键安装 - proxy — 多协议代理链(trojan/vless/anytls/hy2/ss) - web_search / fetch — CVE 搜索与 URL 抓取 ## 使用方法 ### Scan 模式 ``` aiscan scan -i 192.168.1.0/24 # quick scan aiscan scan -i 192.168.1.0/24 --mode full # full scan aiscan scan -i http://target.example --verify=high --sniper # AI-enhanced aiscan scan -i http://target.example --mode full --deep --report # full + deep + report ``` ### Agent 模式 ``` # 一次性任务 aiscan agent -p "scan and find web vulnerabilities" -i 192.168.1.0/24 # 带目标评估 aiscan agent -p "full scan" -i http://target.example -e "find all open ports with service fingerprints" # 交互式 REPL aiscan agent ``` ### IOA 模式 ``` # 启动 IOA server aiscan ioa serve --ioa-url http://0.0.0.0:8765 # 启动 IOA worker aiscan agent --ioa-url http://127.0.0.1:8765 --space pentest-project \ -p "scan assigned targets and report findings" ``` ### LLM 配置 ``` # 环境变量 export OPENAI_API_KEY="sk-..." # CLI 参数 aiscan agent --provider deepseek --base-url https://api.deepseek.com --api-key sk-... --model deepseek-chat ``` 配置文件 `aiscan.yaml`: ``` llm: provider: openai api_key: sk-... model: gpt-4o ``` ## 文档 | 文档 | 描述 | | --- | --- | | [Scan 模式](docs/scan.md) | Pipeline、AI 增强、输出格式 | | [Agent 模式](docs/agent.md) | 工具集、目标评估、REPL | | [IOA](docs/ioa.md) | 多 agent 架构、Space/Node/Message 模型 | | [参考手册](docs/reference.md) | 配置、provider、flag、扫描器用法、常见问题解答 | | [更新日志](docs/changelog.md) | 版本历史 | ## 免责声明 1. 本工具仅供**授权的安全测试和研究目的使用**。如果您需要测试其功能,请自行搭建实验环境。 2. 在使用本工具进行任何扫描之前,您必须确保遵守当地法律法规,并获得**充分的授权。严禁扫描未经授权的目标。** 3. 如果您在使用本工具时从事任何非法活动,您需自行承担所有后果。我们不承担任何法律或连带责任。 4. 在安装和使用本工具之前,请**仔细阅读并完全理解所有条款**。限制和免责条款可能会特别标出以引起您的注意。 5. 除非您已完全阅读、理解并接受本协议的所有条款,否则请不要安装或使用本工具。您的使用行为或其他明示/默示的接受行为即表示您同意受这些条款的约束。 ## 许可证 本项目基于 [GNU Affero General Public License v3.0 (AGPL-3.0)](LICENSE) 许可证授权。 ## 链接 - [chainreactors](https://github.com/chainreactors) — 组织 - [IOA](https://github.com/chainreactors/ioa) — Internet of Agents - [gogo](https://github.com/chainreactors/gogo) — 端口与服务发现 - [spray](https://github.com/chainreactors/spray) — Web 探测与指纹识别 - [zombie](https://github.com/chainreactors/zombie) — 凭证测试 - [neutron](https://github.com/chainreactors/neutron) — 基于模板的 POC 引擎 - [fingers](https://github.com/chainreactors/fingers) — 指纹规则引擎 - [sdk](https://github.com/chainreactors/sdk) — 扫描器 SDK(gogo/spray/zombie 核心) - [proxyclient](https://github.com/chainreactors/proxyclient) — 多协议代理客户端 - [crtm](https://github.com/chainreactors/crtm) — 安全工具包注册表 - [utils](https://github.com/chainreactors/utils) — 共享工具库与 PTY 管理器 - [parsers](https://github.com/chainreactors/parsers) — 协议与数据解析器

Star History

标签:AI代理, C2, EVTX分析, 实时处理, 密码管理, 插件系统, 日志审计, 特征检测