信息收集的思路及工具#
==========
-
参考链接:
-
整体思路:
- 子域名 -> IP -> 全端口 -> http、https -> 获取资产 -> 指纹识别
- 小程序、公众号、APP
- 通过端口识别的非 web 资产 -> 如数据库:先批量弱口令检测,后根据获得的相关信息构造字典进行爆破
-
内网信息收集的思路(不要一上来就用 fscan 扫描)
- 先在拿下的机器看 网卡信息、
history
历史命令、netstat
端口信息、arp
表、ps
进程、配置文件等,收集已控机器所通的其它内网网段信息。 - 在微步在线等威胁情报社区查看域名信息。
- 不存在解析 IP,可能是内网才能访问的域名,尝试在已控机器上
ping
域名得到内网地址。 - 存在互联网解析 IP,也可以尝试在已控机器上
ping
域名得到内网地址。
- 不存在解析 IP,可能是内网才能访问的域名,尝试在已控机器上
- 在互联网侧的网站上,有时会有一些内网系统的跳转,比如 OA 系统、统一身份认证系统,点击会跳转至内网,从而获得内网地址信息。
- 通过什么洞打点成功 -> 比如泛微 -> 查看泛微配置文件,比如数据库配置文件,数据库系统可能在另一台内网服务器上,从而确认存在内网。
- 更多手法可以看看这篇文章:如何判断存不存在内网
- 先在拿下的机器看 网卡信息、
综合利用工具#
公司名资产收集#
子域名收集#
-
枚举、第三方聚合服务
-
搜索引擎
- Google 或者百度等
site:xxx.com
- fofa
domain="xxx.com"
- Google 或者百度等
-
证书透明性信息
- 证书透明性(Certificate Transparency,CT)是 Google 的公开项目,通过让域所有者、CA 和域用户对 SSL 证书的发行和存在进行审查,来纠正这些基于证书的威胁。因为它是一个开放的公共框架,所以任何人都可以构建或访问驱动证书透明性的基本组件,CA 证书中包含了域名、子域名、邮箱等敏感信息,存在一定的安全风险。
- 利用证书透明性进行域名信息收集,一般使用 CT 日志搜索引擎进行域名信息收集,如在线网站:
CDN#
CDN 判断#
- 使用不同主机 ping 域名判断是否有 CDN
- 站长之家多地 ping
- ipip
- 全球 Ping 测试
- 爱站网 Ping 检测
- 使用 ping 域名判断是否有 CDN
- 直接使用 ping 域名查看回显地址来进行判断,如下回显 cname.vercel-dns.com ,很明显使用了 cdn 技术。
- 图自 mathwizard
- 直接使用 ping 域名查看回显地址来进行判断,如下回显 cname.vercel-dns.com ,很明显使用了 cdn 技术。
- 使用 nslookup 解析域名判断
- 其中 Name 字段指向 cname.vercel-dns.com 这类的,说明使用了 CDN 技术。
- 🌰 www.baidu.com ,其中 Address 字段指向两个不同 IP ,即 www.baidu.com 可能使用了 CDN。
绕过 CDN,获取真实 ip#
-
解析子域名 ip
- 使用 CDN 是要掏钱的,所以很多网站只对主站做了 CND 加速,子域名就没做。子域名可能跟主站在同一个服务器或者同一个 C 段网络中,所以可以通过查询子域名的 IP 信息来辅助判断主站的真实 IP 信息。
-
查询历史 DNS 记录
-
使用国外主机请求域名
- 部分国内的 CDN 加速服务商只对国内的线路做了 CDN 加速,但是国外的线路没有做加速,这样就可以通过国外的主机来探测真实的 IP 信息。可以使用自己的国外主机或者全球 Ping 测试选取国外的探测节点来判断真实 ip 信息。
-
邮件信息
- 邮件系统一般都在内部,没有经过 CDN 的解析,通过利用目标网站的邮箱注册、找回密码或者 RSS 订阅等功能发送邮件,接收到目标回复的邮件后,查看邮件源码就 -> 获得目标的真实 IP。
- 图自 mathwizard
-
信息泄露
- 利用信息泄露的敏感信息、文件(如:phpinfo 页面、网站源码(备份)文件、Github 泄露的信息等)获取真实的 IP 信息。
- phpinfo 页面的
SERVER_ADDR
字段会显示该主机真实 IP。
- phpinfo 页面的
- 利用信息泄露的敏感信息、文件(如:phpinfo 页面、网站源码(备份)文件、Github 泄露的信息等)获取真实的 IP 信息。
-
目标网站 APP 应用
- 如果目标网站有自己的 App,可以尝试利用 Burp Suite 等流量抓包工具抓取 App 的请求,从里面可能会找到目标的真实 IP。
IP 反查域名(旁站查询)#
- 360 ip 反查
- 微步在线
- 站长工具同 IP 网站查询
- webscan
- 云悉
- dnsgrep ip 反查
- bugscaner ip 反查
- bing
https://cn.bing.com/search?q=ip:x.x.x.x
- fofa
ip="x.x.x.x"
指纹识别#
- 浏览器插件: Wappalyzer
- 潮汐 - 在线指纹识别
- bugscaner - 在线指纹识别
- EHole - 红队重点攻击系统指纹探测工具
- 云悉 - 在线指纹识别
- what web - 在线指纹识别
js 及接口信息#
- JSFinder: https://github.com/Threezh1/JSFinder
- URLFinder: https://github.com/pingc0y/URLFinder
- 可以看作是新版本的 JSFinder
- LinkFinder: https://github.com/GerbenJavado/LinkFinder
- Packer-Fuzzer: https://github.com/rtcatc/Packer-Fuzzer (webpack)
- 搜索关键接口
- config/api
- method:"get"
- http.get("
- method:"post"
- http.post("
- $.ajax
- service.httppost
- service.httpget
- path
- api
- 存在 xxx.js.map 文件时
- 搜索 axios 关键字,查找路由
APP#
邮箱收集#
WAF 识别#
敏感信息#
网盘引擎#
Googlehack 语法#
- 后台地址
- site.com intitle: 管理 | 后台 | 登陆 | 管理员 | 系统 | 内部
- site.com inurl|admin|system|guanli|denglu|manage|admin_login|auth|dev
- 敏感文件
- site.com (filetype OR filetype OR filetype OR filetype OR filetype OR filetype OR filetype OR filetype OR filetype OR --filetype OR filetype OR filetype OR filetype OR filetype OR filetype OR filetype OR filetype OR filetype OR filetype OR filetype OR filetype OR filetype OR filetype OR filetype OR filetype)
- 测试环境
- site.com inurl|ceshi
- site.com intitle: 测试
- 邮箱
- site.com (intitle:"Outlook Web App" OR intitle:"邮件" OR inurl:"email" OR inurl:"webmail")
- 其他
- site.com inurl|uid=|id=|userid=|token|session
- site.com intitle.of "server at"
- 谷歌语法生成器
- 在线版本:http://www.php1nf0.top/google/google.php
- 离线版本:去 这里 领取
渗透测试之信息收集#
* 渗透测试之信息收集
* 开源情报信息收集(OSINT)
* github
* whois 查询/注册人反查/邮箱反查/相关资产
* google hacking
* 创建企业密码字典
* 子域名获取
* 字典列表
* 邮箱列表获取
* 泄露密码查询
* 对企业外部相关信息进行搜集 开源情报信息收集(OSINT)
* github
* Github_Nuggests(自动爬取 Github 上文件敏感信息泄露) :https://github.com/az0ne/Github_Nuggests
* GSIL(能够实现近实时(15 分钟内)的发现 Github 上泄露的信息) :https://github.com/FeeiCN/GSIL
* x-patrol(小米团队的):https://github.com/MiSecurity/x-patrol whois 查询/注册人反查/邮箱反查/相关资产
* 站长之家:http://whois.chinaz.com/?DomainName=target.com&ws=
*爱站:https://whois.aizhan.com/target.com/
* 微步在线:https://x.threatbook.cn/
* IP 反查:https://dns.aizhan.com/
* 天眼查:https://www.tianyancha.com/
* 虎妈查:http://www.whomx.com/
* 历史漏洞查询 :
* 在线查询:http://wy.zone.ci/
* 自搭建:https://github.com/hanc00l/wooyun_publi/ google hacking
* 创建企业密码字典 字典列表 passwordlist:https://github.com/lavalamp-/password-lists
- 猪猪侠字典:https://pan.baidu.com/s/1dFJyedzBlasting_dictionary (分享和收集各种字典,包括弱口令,常用密码,目录爆破。数据库爆破,编辑器爆破,后台爆破等) 针对特定的厂商,重点构造厂商相关域名的字典 ['% pwd%123','% user%123','% user%521','% user%2017','% pwd%321','% pwd%521','% user%321','% pwd%123!','% pwd%123!@#','% pwd%1234','% user%2016','% user%123$%^','% user%123!@#','% pwd%2016','% pwd%2017','% pwd%1!','% pwd%2@','% pwd%3#','% pwd%123#@!','% pwd%12345','% pwd%123$%^','% pwd%!@#456','% pwd%123qwe','% pwd% qwe123','% pwd% qwe','% pwd%123456','% user%123#@!','% user%!@#456','% user%1234','% user%12345','% user%123456','% user%123!']
- 密码生成 GenpAss(中国特色的弱口令生成器: https://github.com/RicterZ/genpAss/
- passmaker(可以自定义规则的密码字典生成器) :
https://github.com/bit4woo/passmaker - pydictor(强大的密码生成器) :
https://github.com/LandGrey/pydictor - 邮箱列表获取 theHarvester :https://github.com/laramies/theHarvester * 获取一个邮箱以后导出通讯录 LinkedInt :https://github.com/mdsecactivebreach/LinkedInt
- Mailget:https://github.com/Ridter/Mailget
- 泄露密码查询 ghostproject: https://ghostproject.fr/
- pwndb: https://pwndb2am4tzkvold.onion.to/
- 对企业外部相关信息进行搜集 子域名获取
-
Layer 子域名挖掘机 4.2 纪念版 subDomainsBrute :https://github.com/lijiejie/subDomainsBrute
- wydomain :https://github.com/ring04h/wydomain
- Sublist3r :https://github.com/aboul3la/Sublist3r
- site.com:https://www.google.com Github 代码仓库
-
抓包分析请求返回值(跳转/文件上传/app/api 接口等)
- 站长帮手 links 等在线查询网站
域传送漏洞 Linux dig @ns.example.com example=.com AXFR Windows nslookup -type=ns xxx.yyy.cn #查询解析某域名的 DNS 服务器 nslookup #进入 nslookup 交互模式 server dns.domian.com #指定 dns 服务器 ls xxx.yyy.cn #列出域信息
- GetDomainsBySSL.py :https://note.youdao.com/ynoteshare1/index.h tml?id=247d97fc1d98b122ef9804906356d47a&type=note#/
- censys.io 证书 :https://censys.io/certificates?q=target.com crt.sh
- 证书查询:https://crt.sh/?q=%25.target.com
- shadon :https://www.shodan.io/
- zoomeye :https://www.zoomeye.org/ fofa :https://fofa.so/
- censys:https://censys.io/
- dnsdb.io :https://dnsdb.io/zh-cn/search?q=target.com
- api.hackertarget.com :http://api.hackertarget.com/reversedns/?q =target.com
- community.riskiq.com :https://community.riskiq.com/Search/targe t.com
- subdomain3 :https://github.com/yanxiu0614/subdomain3
- FuzzDomain :https://github.com/Chora10/FuzzDomain dnsdumpster.com :https://dnsdumpster.com/
- phpinfo.me :https://phpinfo.me/domain/
- dns 开放数据接口 :https://dns.bufferover.run/dns?q=baidu.com
Github#
- @xxx.com password/secret/credentials/token/config/pass/login/ftp/ssh/pwd
- @xxx.com security_credentials/connetionstring/JDBC/ssh2_auth_password/send_keys