OmniScan 是一款基于 Python 的轻量级、多引擎漏洞扫描器,专为红队操作和安全研究设计。它不仅集成了轻量级 Nuclei 引擎 (Lite) 和 Afrog 引擎,还提供了强大的资产收集和结果管理功能。
simpleeval 替代 eval,并在沙箱环境中执行 DSL 表达式,防止恶意模板执行代码。{{lang-file}} -> etc/passwd),支持智能 Fuzzing。hmac, gzip, reverse, rand_base 等)。flow 和 req-condition 逻辑控制。cookie-reuse 会话保持和 redirects 重定向控制。Interactsh 客户端,自动处理无回显漏洞(如 Blind RCE, SSRF)。tqdm 进度条,实时展示每个插件在每个目标上的扫描进度。BasePlugin 类并实现 check(url) 方法即可。git_config.py: 检测 .git/config 泄露spring_boot.py: 检测 Spring Boot Actuatords_store.py: 检测 .DS_Store 泄露phpinfo.py: 检测 phpinfo() 页面backup_files.py: 检测常见备份文件 (.bak, .zip 等)swagger_ui.py: 检测 Swagger UI 文档country="CN")。asyncio 和 aiohttp 框架。interactsh-client 二进制文件。(我已经上传了 interactsh-client.zip,你可以直接解压在这个目录下面)xxx.oast.pro)。{{interactsh-url}} 替换为实时获取的 Payload。克隆仓库:
git clone https://github.com/d3ckx1/OmniScan.git
cd omniscan
安装依赖:
pip3 install -r requirements.txt
配置工具 (可选):
Afrog 或 XRay,请确保相应的可执行文件在项目根目录或系统路径中。config.yml (可选) 设置 API Key 和扫描参数。扫描单个 URL:
python3 omniscan.py -u http://example.com --tool lite -T ./templates/cve/
从 FOFA 搜索资产并使用 Nuclei Lite 引擎扫描:
python3 omniscan.py -f 'app="SpringBoot"' --tool lite -T ./templates/spring-boot/
从 urls.txt 读取目标并扫描:
python3 omniscan.py -l urls.txt --tool lite -T ./templates/cve/
python3 omniscan.py -l urls.txt --tool lite -T ./templates/python3 omniscan.py -l urls.txt --tool afrogpython3 omniscan.py -l urls.txt --tool xray不带 --tool 参数运行,将进入交互菜单选择工具:
python3 omniscan.py -l urls.txt
扫描 Blind RCE 漏洞(自动启用 Interactsh):
python3 omniscan.py -l urls.txt --tool lite -T ./templates/blind-rce.yaml
如果检测到 OOB 交互,控制台将输出 [OOB DETECTED] 并记录漏洞。
使用 Nuclei Lite 引擎并启用所有插件:
python3 omniscan.py -l urls.txt --tool lite -T ./templates/ --plugins
仅运行 Git Config 和 PHPInfo 插件:
python3 omniscan.py -l urls.txt --tool lite -T ./templates/ --plugin-file plugins/git_config.py,plugins/phpinfo.py
不进行实际扫描,仅检查模板兼容性:
python3 omniscan.py --classify-only --tool lite -T ./templates/
config.yml)app:
lite_timeout: 10 # 请求超时 (秒)
lite_threads: 10 # 并发线程数
use_async: true # 启用异步模式
user_agents: # 自定义 User-Agent 池
- "Mozilla/5.0..."
fofa:
email: "your_email"
key: "your_key"
shodan:
api_key: "your_key"
output:
formats: ["json", "csv", "html"] # 报告格式
omniscan.py: 主程序入口,负责参数解析和任务调度。nuclei_lite.py: Nuclei Lite 核心引擎,实现 YAML 模板解析和扫描。result_manager.py: 结果管理模块,处理去重和报告生成。database.py: SQLite 数据库管理。config.py: 配置加载模块。Q: [OOB DETECTED] 是什么意思?
A: 这表示扫描器成功检测到了带外交互(Out-of-Band Interaction)。这通常意味着目标触发了 DNS 或 HTTP 请求回调,证明了 Blind RCE、SSRF 或 Blind SQLi 等漏洞的存在。
Q: 如何配置 FOFA/Shodan API?
A: 您可以在 config.yml 文件中填写 API Key,或者通过环境变量 FOFA_EMAIL, FOFA_KEY, SHODAN_API_KEY 设置。
Q: 支持哪些操作系统? A: Omniscan 是跨平台的,支持 Linux, macOS 和 Windows。外部工具(如 afrog, interactsh-client)需要确保在当前系统可执行。
MIT License
| 参数 | 说明 | 示例 |
|---|
-u URL | 扫描单个 URL | -u http://example.com |
-f | 使用 FOFA 搜索资产 | -f 'country="CN"' |
-s | 使用 Shodan 搜索资产 | -s 'apache' |
-l FILE | 指定本地目标文件 | -l targets.txt |
-T TEMPLATE | 指定 Nuclei 模板路径 (文件/目录) | -T ./templates/ |
--tool NAME | 指定扫描工具 (nuclei/afrog/xray/lite) | --tool lite |
--severity | 指定漏洞等级 (默认 critical,high) | --severity high,medium |
--plugins | 启用 Python 插件扫描 (扫描 plugins/ 目录) | --plugins |
--plugin-file FILE | 指定运行特定的插件文件 (逗号分隔) | --plugin-file plugins/test.py |
--new | 仅扫描新发布的模板 (需 Nuclei 支持) | --new |
--no-resume | 禁用断点续传 | --no-resume |
--verbose | 显示详细调试日志 | --verbose |