资产收集常用工具以及思路总结
字数 2751 2025-08-20 18:17:53

资产收集常用工具及思路总结

前言

渗透测试中获取目标资产后,需要对资产进行系统整理后再进行测试。目标资产形式可能是企业名称、域名信息等。本文总结了目标资产收集的思路、渠道和工具。

0x01 企业信息及知识产权收集

1. 企业信息查询工具

  • 天眼查
  • 企查查
  • 爱企查
  • 小蓝本

2. 收集方法

  1. 知识产权信息:查询企业知识产权下的域名、小程序、APP、公众号等资产
  2. 股权控制:通过控股比例收集子公司信息
  3. 微信搜索:通过微信搜索公司名称查看相关小程序等资产
  4. 合作协议:查看热点文章中的公司合作方信息
  5. 用户协议:查看用户协议、隐私政策中的归属使用方

3. ICP备案查询

  • 工业和信息化部政务服务平台:https://beian.miit.gov.cn/#/Integrated/index
  • 站长之家:http://icp.chinaz.com/

0x02 域名及IP信息收集

1. 子域名收集工具

  1. 在线工具:
    • 子域名在线查询:https://zh.subdomains.whoisxmlapi.com/lookup
    • Subdomian Finder:https://pentest-tools.com/information-gathering/find-subdomains-of-domain
  2. 本地工具:
    • OneForAll:https://github.com/shmilylty/OneForAll
    • ksubdomain:https://github.com/knownsec/ksubdomain
    • ESD:https://github.com/FeeiCN/ESD
    • subDomiansBrute:https://github.com/Lijijie/subDomiansBrute

2. DNS记录查询

  • ip138:https://site.ip138.com/ip/domain.htm
  • hackertarget:https://hackertarget.com/find-dns-host-records/
  • netcraft:https://searchdns.netcraft.com/
  • ViewDNS.info:http://viewdns.info/

3. 证书透明度收集

  • crtsh:https://crt.sh/
  • facebook:https://developers.facebook.com/tools/ct
  • entrust:https://www.entrust.com/ct-search/
  • certspotter:https://sslmate.com/certspotter/api/
  • spyse:https://spyse.com/search/certificate
  • censys:https://censys.io/certificates
  • google:https://google.com/transparencyreport/https/ct/

4. WHOIS查询

  • 站长之家:http://whois.chinaz.com/
  • 阿里云:https://whois.aliyun.com/
  • 全球WHOIS查询:https://www.whois365.com/cn/

5. 搜索引擎技巧

  • site:网址:搜索指定域名的网页内容
  • site:sohu.com -www:搜索除www外的网站信息
  • filetype:文件类型:搜索指定文件类型
  • intitle:keyword:搜索标题含关键字的网页
  • intext:keyword:搜索正文含关键字的网页

6. 站点抓包测试

  • 检查配置文件信息泄露
  • 观察请求中的第三方站点资产
  • 收集JS文件及其他配置中泄露的域名、IP

7. 端口探测与目录探测

  1. 端口探测
    nmap -p 1-65535 <目标域名>  # 全端口扫描
    nmap -p 80,443,8080,8000,5000 <目标域名>  # 常用端口扫描
    nmap -sV -p <开放端口> <目标域名>  # 服务版本检测
    
  2. 目录探测
    gobuster dir -u http://<目标域名>:<开放端口> -w /path/to/wordlist.txt
    dirb http://<目标域名>:<开放端口> /path/to/wordlist.txt
    
  3. 自动化脚本示例:
    #!/bin/bash
    TARGET=$1
    WORDLIST="/usr/share/wordlists/dirb/common.txt"
    
    # 端口探测
    nmap -p 1-65535 $TARGET -oN ports.txt
    
    # 查找开放端口
    OPEN_PORTS=$(grep "/open" ports.txt | awk '{print $2}' | tr '\n' ' ')
    
    # 目录探测
    for PORT in $OPEN_PORTS; do
        gobuster dir -u http://$TARGET:$PORT -w $WORDLIST
    done
    

8. Host碰撞

  1. 原理:当多个域名共享同一IP时,服务器根据Host头部路由请求
  2. 方法
    • 收集IP与域名生成字典
    • 设置Host头为暴破点进行暴破
  3. 常见内网系统
    admin, autotest, cert, confluence, console, crm, galaxy, git, gitlab, 
    grafana, hr, it, jira, k8s, kafka, kafka-manager, oa, okr, package, 
    packages, release, repo, report, sso, wiki, work, zabbix
    
  4. 工具
    • Hosts_scan:https://github.com/fofapro/Hosts_scan
    • hostscan:https://github.com/cckuailong/hostscan
    • hostCollision:https://github.com/alwaystest18/hostCollision

0x03 指纹探测

3.1 框架识别

  1. 在线工具
    • Wappalyzer:浏览器扩展,识别网站技术栈
  2. 命令行工具
    • whatweb:扫描网站识别CMS、服务器等信息
    whatweb www.xxx.com  # 单个目标
    whatweb -i xxx --log-brief=txt.txt  # 批量扫描
    
  3. 手动检查
    • 查看源代码中的<meta>信息和HTML注释
    • 检查JavaScript文件中的框架特征
    • 分析页面提示信息
    • 访问服务器配置文件
  4. HTTP响应头分析
    • X-Powered-By字段可能显示服务器或框架信息
  5. Cookies分析
    • 某些框架会在Cookies中包含特定名称
  6. CMS识别工具
    • CMSeeK
    • CmsVulScan

3.2 在线资源信息收集

  1. Github信息收集
    • 高级搜索:https://github.com/search/advanced
    • 常用关键字:
      "token", "password", "secret", "passwd", "username", "key", "apidocs", 
      "AWSSecretKey", "access_key", "access_token", "amazonaws", "apiSecret", 
      "api_key", "api_secret", "auth", "aws_access", "config", "login", 
      "mysql", "pass", "pwd", "ssh", "swagger", "jdbc"
      
  2. 语雀信息收集
    • 使用企业名称、邮件后缀、域名等关键字搜索
  3. 网盘信息收集
    • 凌风云:https://www.lingfengyun.com/
    • 猪猪盘:http://www.zhuzhupan2.com/

3.3 全面指纹检测工具

  1. TideFinger
    • 在线网址:http://finger.tidedesec.net/
    • 项目地址:https://github.com/TideSec/TideFinger
    • 功能:识别网站信息、IP地址、CDN、中间件、banner信息、操作系统等
  2. Amass
    • 项目地址:https://github.com/owasp-amass/amass
    • 功能:网络资产发现和子域名收集
  3. TscanPlus
    • 项目地址:https://github.com/TideSec/TscanPlus
    • 功能:快速资产发现、识别、检测,构建基础资产信息库
  4. EHole_magic
    • 项目地址:https://github.com/lemonlove7/EHole_magic
    • 功能:对重点资产进行漏洞检测

总结

资产收集是渗透测试的重要前置工作,通过系统化的信息收集可以全面了解目标资产情况,为后续测试奠定基础。本文总结了从企业信息、域名/IP到指纹识别的全方位收集方法和工具,实际工作中可根据目标特点灵活组合使用这些方法。

资产收集常用工具及思路总结 前言 渗透测试中获取目标资产后,需要对资产进行系统整理后再进行测试。目标资产形式可能是企业名称、域名信息等。本文总结了目标资产收集的思路、渠道和工具。 0x01 企业信息及知识产权收集 1. 企业信息查询工具 天眼查 企查查 爱企查 小蓝本 2. 收集方法 知识产权信息 :查询企业知识产权下的域名、小程序、APP、公众号等资产 股权控制 :通过控股比例收集子公司信息 微信搜索 :通过微信搜索公司名称查看相关小程序等资产 合作协议 :查看热点文章中的公司合作方信息 用户协议 :查看用户协议、隐私政策中的归属使用方 3. ICP备案查询 工业和信息化部政务服务平台:https://beian.miit.gov.cn/#/Integrated/index 站长之家:http://icp.chinaz.com/ 0x02 域名及IP信息收集 1. 子域名收集工具 在线工具: 子域名在线查询:https://zh.subdomains.whoisxmlapi.com/lookup Subdomian Finder:https://pentest-tools.com/information-gathering/find-subdomains-of-domain 本地工具: OneForAll:https://github.com/shmilylty/OneForAll ksubdomain:https://github.com/knownsec/ksubdomain ESD:https://github.com/FeeiCN/ESD subDomiansBrute:https://github.com/Lijijie/subDomiansBrute 2. DNS记录查询 ip138:https://site.ip138.com/ip/domain.htm hackertarget:https://hackertarget.com/find-dns-host-records/ netcraft:https://searchdns.netcraft.com/ ViewDNS.info:http://viewdns.info/ 3. 证书透明度收集 crtsh:https://crt.sh/ facebook:https://developers.facebook.com/tools/ct entrust:https://www.entrust.com/ct-search/ certspotter:https://sslmate.com/certspotter/api/ spyse:https://spyse.com/search/certificate censys:https://censys.io/certificates google:https://google.com/transparencyreport/https/ct/ 4. WHOIS查询 站长之家:http://whois.chinaz.com/ 阿里云:https://whois.aliyun.com/ 全球WHOIS查询:https://www.whois365.com/cn/ 5. 搜索引擎技巧 site:网址 :搜索指定域名的网页内容 site:sohu.com -www :搜索除www外的网站信息 filetype:文件类型 :搜索指定文件类型 intitle:keyword :搜索标题含关键字的网页 intext:keyword :搜索正文含关键字的网页 6. 站点抓包测试 检查配置文件信息泄露 观察请求中的第三方站点资产 收集JS文件及其他配置中泄露的域名、IP 7. 端口探测与目录探测 端口探测 : 目录探测 : 自动化脚本 示例: 8. Host碰撞 原理 :当多个域名共享同一IP时,服务器根据Host头部路由请求 方法 : 收集IP与域名生成字典 设置Host头为暴破点进行暴破 常见内网系统 : 工具 : Hosts_ scan:https://github.com/fofapro/Hosts_ scan hostscan:https://github.com/cckuailong/hostscan hostCollision:https://github.com/alwaystest18/hostCollision 0x03 指纹探测 3.1 框架识别 在线工具 : Wappalyzer:浏览器扩展,识别网站技术栈 命令行工具 : whatweb:扫描网站识别CMS、服务器等信息 手动检查 : 查看源代码中的 <meta> 信息和HTML注释 检查JavaScript文件中的框架特征 分析页面提示信息 访问服务器配置文件 HTTP响应头分析 : X-Powered-By 字段可能显示服务器或框架信息 Cookies分析 : 某些框架会在Cookies中包含特定名称 CMS识别工具 : CMSeeK CmsVulScan 3.2 在线资源信息收集 Github信息收集 : 高级搜索:https://github.com/search/advanced 常用关键字: 语雀信息收集 : 使用企业名称、邮件后缀、域名等关键字搜索 网盘信息收集 : 凌风云:https://www.lingfengyun.com/ 猪猪盘:http://www.zhuzhupan2.com/ 3.3 全面指纹检测工具 TideFinger : 在线网址:http://finger.tidedesec.net/ 项目地址:https://github.com/TideSec/TideFinger 功能:识别网站信息、IP地址、CDN、中间件、banner信息、操作系统等 Amass : 项目地址:https://github.com/owasp-amass/amass 功能:网络资产发现和子域名收集 TscanPlus : 项目地址:https://github.com/TideSec/TscanPlus 功能:快速资产发现、识别、检测,构建基础资产信息库 EHole_ magic : 项目地址:https://github.com/lemonlove7/EHole_ magic 功能:对重点资产进行漏洞检测 总结 资产收集是渗透测试的重要前置工作,通过系统化的信息收集可以全面了解目标资产情况,为后续测试奠定基础。本文总结了从企业信息、域名/IP到指纹识别的全方位收集方法和工具,实际工作中可根据目标特点灵活组合使用这些方法。