7scanAI — AI 驱动的自动化安全扫描Pipeline
7scanAI — AI 驱动的自动化安全扫描 Pipeline
给 AI 一个根域名,自动完成:子域名发现 → DNS 解析 → 端口扫描 → Web 指纹 → 目录爆破 → 备份扫描 → 漏洞检测 → 结果研判 → HTML 报告
https://github.com/VMsec/7scanAI
本skill插件从我自己的工具流编排脚本修改而来,工具和流程限制相对严格,由于个人经验有限,难免有些不够细致的地方,欢迎大家提出建议,仅适配Linux下的Ubuntu/Debian,已经过GPT+DeepSeek经过多轮实战进行自我完善。
安装后使用方法很简单
扫 target.com,端口扫全端口,需要截图
扫 target.com,快速扫一下(top-100 端口,不截图,不开域名变形)
扫 target.com,有泛解析别开域名变形,端口 top-1000 不截图
# 我常用的Claude Code设定目标模式
/goal 并行扫描target1.com,target2.com,target3.com 达到出完整报告的程度,运行中遇到的任何问题尝试解决,进程长时间挂住无反应主动kill,我需要扫top1000端口,不做子域名变形,截图关闭
设计理念
传统脚本是固定的编排流程,AI 无法介入决策。7scanAI 把同样的逻辑编码为 AI 可理解的工作流,让 AI 充当编排器:判断泛解析、处理重试、交叉验证结果、给出渗透方向。
核心原则:
- AI 严格按 SKILL.md 中的命令参数和顺序执行,不凭记忆拼命令
- 每个阶段有明确 checkpoint,通过才进入下一步
- 扫描前一次性确认(端口范围 + 域名变形 + 截图开关),扫描中零交互
- 任何步骤失败自动重试 3 次(间隔 2s/4s/8s),anew 保证断点续跑不污染数据
- 所有 bash 代码块以
set -o pipefail开头,防止管道中间态错误静默丢失 - Python 工具 git clone 后必须
pip3 install -r requirements.txt --break-system-packages - 默认进入自治执行模式:优先自动修依赖、切 fallback、局部重跑,再决定是否中止
工作流总览(8 个 Phase)
用户: "扫 baidu.com"
│
├─ Phase 1 Intake 确认目标 + 端口范围 + 域名变形 + 截图开关,创建目录
│
├─ Phase 2 Subdomain 7 个工具多源收集子域名
│ OneForAll → ksubdomain → subDomainsBrute
│ → subfinder → gau → jsubfinder
│
├─ Phase 3 DNS 泛解析检测(3次重试) → dnsgen/alterx 排列(可选)
│ → dnsx 解析 → 内外网分离
│
├─ Phase 4 Port IP 提取 → CDN 过滤(nali+nocdn)
│ → naabu 端口扫描(用户选择范围)
│
├─ Phase 5 Web httpx 指纹 → 智能分类(高价值/泄露风险)
│ → gowitness 截图(可选)
│
├─ Phase 6 Vuln 6 引擎串行扫描:
│ kscan指纹/弱口令 → afrog(分批) → 备份扫描
│ → dirsearch → nuclei → katana+fuzz
│
├─ Phase 7 Report 统计汇总 → AI 逐条研判
│ → 渗透方向建议 → 生成 HTML 报告
│
└─ Phase 8 Exploit AI 自主利用攻击 → 弱口令登录
→ SQL注入/备份泄露 → 登录口爆破
→ 注册越权 → OAuth滥用 → 凭据喷洒
→ 生成利用报告
文件清单
7scanAI/
├── SKILL.md # 轻量主控 skill(触发条件、规则、phase 编排)
├── README.md # 本文件
├── .codex-plugin/
│ └── plugin.json # Codex 插件描述
├── .claude-plugin/
│ └── plugin.json # Claude Code 插件描述
├── .claude/
│ └── skills/
│ └── 7scanai/
│ └── SKILL.md # Claude Code 项目级 skill 入口
├── skills/
│ └── 7scanai/
│ └── SKILL.md # Codex 兼容层,指向根目录权威流程
└── references/
├── install.md # 详细安装指南
├── config.md # 配置说明
├── pipeline/
│ ├── full-workflow.md # 命令级原始长版流程
│ ├── 02-subdomain-tools.md # 子域名工具参数说明
│ ├── 04-port-strategy.md # 端口扫描策略
│ ├── 06-vuln-engines.md # 漏洞引擎参数说明
│ └── 08-exploitation.md # 漏洞利用 playbook
└── scripts/
├── auto_install.sh # 环境预检 + 缺失自动安装
├── auto_dirsearch.py # 智能目录爆破(1C1G 自适应)
└── generate_report.py # 生成离线 HTML 报告
结果目录结构
targets/<domain>/
├── whois_info/
│ └── <domain>.html
├── oneforall_subdomains/
│ └── oneforall.txt
├── ksubdomain_subdomains/
│ └── ksubdomain.txt
├── subdomainsbrute_subdomains/
│ └── subdomainsbrute.txt
├── subfinder_subdomains/
│ └── subfinder.txt
├── gau_subdomains/
│ ├── url.txt
│ └── gau.txt
├── jsubfinder_subdomains/
│ └── jsubfinder.txt
├── dnsgen_subdomains/
│ └── dnsgen.txt # 仅非泛解析 + 用户启用时
├── alterx_subdomains/
│ └── alterx.txt # 仅非泛解析 + 用户启用时
├── collect_subdomains/
│ └── collect_subdomains.txt
├── active_subdomains/
│ ├── active_subdomains2ips.txt
│ ├── active_subdomains.txt
│ └── active_subdomains_intranet.txt
├── active_ips/
│ └── active_ips.txt
├── active_all/
│ └── active_all.txt
├── active_ports/
│ ├── active_ports.txt
│ ├── active_ips_ports.txt
│ ├── active_webs_ports.txt
│ ├── active_webs_portsfinger.txt
│ └── active_ips_portsfinger.txt
├── active_webs/
│ ├── active_websfinger.json
│ ├── active_webs.txt
│ ├── high_value_targets.txt
│ └── leak_risks.txt
├── afrog_scan_results/
│ ├── part_*.json
│ └── *.html
├── backup_result/
│ └── backup_scan.txt
├── brute_result/
│ └── brute_success.txt
├── dirsearch_result/
│ └── smart_scan_*.txt
├── nuclei_fuzzing_result/
│ ├── nuclei-templates_fuzzing.txt
│ ├── nuclei-DAST_fuzzing.txt
│ ├── katana_urls.txt
│ └── uro_urls.txt
├── web_screenshots/
│ ├── gowitness.sqlite3
│ └── screenshots/*.png
├── exploit_result/
│ ├── exploit_log.txt
│ ├── exploit_success.txt
│ ├── harvested_credentials.txt
│ └── evidence/
└── <domain>_7scanAI_report.html

评论20次