跳转至

敏感信息泄漏挖掘工具总结

适用场景:授权渗透测试、等保测评、安全自查


一、JS 文件挖掘

JSFinder

专门从 JS 文件中提取 URL 和敏感信息。

python3 JSFinder.py -u https://target.com
python3 JSFinder.py -u https://target.com -d  # 深度爬取

LinkFinder

提取 JS 中隐藏的接口路径。

python3 linkfinder.py -i https://target.com/app.js -o cli
python3 linkfinder.py -i https://target.com -d -o results.html  # 批量扫描整站 JS

SecretFinder

从 JS 中提取 API Key、Token、密码等凭据。

python3 SecretFinder.py -i https://target.com/app.js -o cli

二、目录与文件扫描

dirsearch

python3 dirsearch.py -u https://target.com
python3 dirsearch.py -u https://target.com -e php,jsp,xml,zip,bak

ffuf

# 目录扫描
ffuf -w wordlist.txt -u https://target.com/FUZZ

# 扫备份文件
ffuf -w wordlist.txt -u https://target.com/FUZZ -e .bak,.zip,.tar.gz,.sql

高价值目标路径

路径 泄漏内容
/.git/ 源代码
/backup.zip 备份文件
/.env 环境变量(含数据库密码)
/api/swagger 接口文档
/WEB-INF/web.xml Java 应用配置
/actuator Spring Boot 敏感端点
/api/v1/docs API 文档

三、源码泄漏专项

git-dumper

.git 目录暴露时还原完整源码。

git-dumper https://target.com/.git/ output_dir

GitHack

python3 GitHack.py https://target.com/.git/

truffleHog

扫描 Git 仓库历史提交中的密钥。

trufflehog git https://github.com/company/repo
trufflehog filesystem /path/to/local/repo

gitleaks

gitleaks detect --source /path/to/repo
gitleaks detect --source /path/to/repo --report-path report.json

四、响应内容分析

Burp Suite

Search 功能 — 全局搜索历史流量中的敏感关键词:

password、token、secret、idcard、phone、ak、sk、access_key

推荐插件:

插件 功能
HaE 自动高亮标记敏感响应字段
Sensitive Discoverer 自动发现并标记敏感信息
JS Miner 自动提取 JS 中的接口和密钥

五、GitHub 信息搜集

手动搜索语法(直接在 GitHub 搜索栏使用)

"公司名" password
"公司名" api_key
"公司名" jdbc:mysql
"公司域名" token
"内网IP段" "192.168.x"

gitrob

自动扫描组织/用户所有仓库。

gitrob analyze companyname

六、综合信息收集

theHarvester

收集邮箱、子域名、员工信息。

theHarvester -d target.com -b google,bing,linkedin

Google Hacking(Dork)

site:target.com filetype:sql
site:target.com filetype:env
site:target.com inurl:swagger
site:target.com "index of" "backup"
site:target.com ext:log password

七、自动化批量扫描

nuclei

内置大量敏感信息泄漏检测模板,适合批量自动化检测。

# 扫描常见敏感信息泄漏
nuclei -u https://target.com -t exposures/

# 扫描 API 接口文档泄漏(Swagger、GraphQL 等)
nuclei -u https://target.com -t exposures/apis/

# 扫描备份文件泄漏
nuclei -u https://target.com -t exposures/files/

# 批量扫描多个目标
nuclei -l targets.txt -t exposures/

推荐工作流(金融系统场景)

第一步  Burp + HaE 插件      边浏览边自动标记敏感响应
第二步  SecretFinder          扫描所有 JS 文件提取凭据
第三步  dirsearch             扫描 .git、swagger、actuator 等路径
第四步  nuclei exposures 模板  自动化批量检测敏感信息
第五步  GitHub Dork           搜索公司名 + 敏感关键词

最快出成果的组合:Burp HaE + nuclei,挂着跑完一遍即可有收获。


常见敏感信息类型速查

类型 关键词
数据库凭据 jdbcmysqlpassworddb_pass
云服务密钥 access_keysecret_keyaksk
身份信息 id_cardidcard身份证
金融数据 card_nobankcard银行卡
认证凭据 tokenapi_keysecretprivate_key
内网信息 192.168.10.0.、内网域名