工具介绍
「渊照」是一款功能强大的专业暗链扫描工具,专注于检测网站、HTML文件或目录中的隐蔽链接、隐藏元素和恶意代码。该工具能够智能识别扫描目标类型(本地文件/目录、内网URL、公网URL),并自动调整扫描策略以获得最佳效果,是安全人员进行网站安全审计和应急响应的理想工具。
功能特性
智能目标识别与处理
多类型目标支持:自动识别和扫描本地文件、本地目录、内网URL和公网URL
差异化扫描策略:根据目标类型应用最优扫描策略
递归目录扫描:支持可配置的扫描深度
文件过滤机制:支持通过通配符排除特定文件或目录
核心扫描能力
多层次检测机制:HTML代码检测、JavaScript代码分析、CSS代码检测、元标签扫描、注释内容分析
高级威胁识别:加密/编码链接检测、可疑域名检测、随机生成域名检测、短链接服务检测、非标准端口检测、可疑查询参数检测
特殊隐藏手法检测:CSS隐藏技术、颜色隐藏、零宽字符隐藏、字体大小隐藏等
关键字匹配系统:支持CSV格式自定义关键字文件,包含关键字、类别和风险权重
智能风险评分:基于多维度风险评估
无头浏览器增强检测
动态内容捕获:使用Chrome无头浏览器执行JavaScript并捕获动态内容
DOM操作监控:跟踪动态DOM修改
iframe深度分析:渲染和分析iframe内容
网络请求捕获:监控HTTP请求和重定向链
全面的报告系统
多种报告格式:文本报告(txt)、HTML报告(html)、JSON报告(json)、CSV报告(csv)
丰富的报告内容:扫描概览、问题详情、风险评估、上下文展示
灵活的配置选项
多种扫描模式:基础扫描(basic)、高级扫描(advanced)、全部扫描(all)
性能优化选项:可配置并发线程数、请求超时设置、代理服务器支持
使用方法
查看帮助信息
python YuanZhao.py --help
完整使用案例命令
- 本地文件扫描场景
# 基本扫描 - 单个HTML文件
python YuanZhao.py /path/to/file.html
# 高级扫描 + HTML报告
python YuanZhao.py /path/to/file.html -m advanced -f html
# 详细日志模式
python YuanZhao.py /path/to/suspicious.html --verbose
# 自定义输出目录
python YuanZhao.py /path/to/file.html -o /custom/report/dir
# 特定报告格式(JSON)
python YuanZhao.py /path/to/file.html -f json
2.本地目录扫描场景
# 默认深度扫描目录
python YuanZhao.py /path/to/website
# 自定义深度扫描(仅当前目录和一级子目录)
python YuanZhao.py /path/to/website -d 1
# 深度递归扫描
python YuanZhao.py /path/to/website -d 5
# 排除特定文件/目录
python YuanZhao.py /path/to/website --exclude "*.jpg""*.png""logs/*""vendor/"
# 调整线程数(提高性能)
python YuanZhao.py /path/to/website -t 16
# 完整模式 + 多格式报告
python YuanZhao.py /path/to/website -m all -f html -o security_reports --threads 12
3.网络URL扫描场景
# 基本网站扫描
python YuanZhao.py https://example.com
# 内网地址扫描
python YuanZhao.py http://192.168.1.100
# 本地开发服务器扫描
python YuanZhao.py http://localhost:8080
# 带路径的URL扫描
python YuanZhao.py https://example.com/news/article
# 设置超时时间
python YuanZhao.py https://example.com --timeout 60
# 使用代理服务器
python YuanZhao.py https://example.com --proxy http://127.0.0.1:8080
# 带认证的代理
python YuanZhao.py https://example.com --proxy http://username:password@proxy.example.com:8080
4.高级功能场景
# 无头浏览器扫描(动态内容)
python YuanZhao.py https://dynamic-website.com --headless
# 无头浏览器 + 延长等待时间
python YuanZhao.py https://heavy-js-website.com --headless --js-wait 10
# 自定义关键字检测
python YuanZhao.py /path/to/target --keyword-file custom_keywords.txt
# 基础模式快速扫描
python YuanZhao.py https://example.com -m basic -d 1 -t 5
# 全部模式深度扫描
python YuanZhao.py /path/to/important-site -m all -d 3 -f html --verbose
5.特定场景优化命令
# 应急响应场景
python YuanZhao.py /compromised/webroot -m all -f html -o incident_response --keyword-file malware_keywords.txt --verbose
# 定期安全审计
python YuanZhao.py /path/to/webroot -d 3 -m advanced -f json -o weekly_scan_$(date +%Y%m%d)
# 新闻页面专项扫描
python YuanZhao.py https://example.com/news -m all -d 1 -t 8 --verbose
# 大规模并行扫描
python YuanZhao.py /large/website -d 2 -t 20 --exclude "*.zip""*.rar""backup/*"
# 自动化集成扫描(生成JSON报告)
python YuanZhao.py https://example.com -f json -o automated_scan_results --no-color
自定义关键字文件格式
关键字文件为CSV格式,每行包含三个字段:
关键字,类别,风险权重
poker,gambling,8
casino,gambling,9
malware,malware,10
phishing,phishing,9
类别可选值:gambling (博彩)、porn (色情)、malware (恶意软件)、phishing (钓鱼)、other (其他) 风险权重范围:1-10(10为最高风险)
工具获取
https://github.com/BINBIN02/YuanZhao
JiaXu's Blog