Article directory
- Preface
- 1. Collection of asset information
-
- 1. Main domain name asset collection
- 1) ICP filing inquiry
- 2) DNS record query
- 3) Whois query includes online website and email retrieval
- 4) IP reverse check can use cyberspace search engines or threat intelligence centers
- 2. Collection of subdomain assets
- 1) DNS domain transfer
- 2) Public dns data set
- 3) Via search engine
- 4) Through cyberspace search engines
- 5) Information leakage of subdomain names includes JS file leaks, web crawlers, etc.
- 6) Some online website subdomain queries
- 7) Subdomain blasting tool
- 8) Batch domain name survival detection tool
- 9) SSL/TLS certificate query
- 10) Leveraging Certificate Transparency to Collect Subdomains
- 3. IP and C-segment asset collection
- 1) Bypass CDN to find real IP
- 2) Collect through cyberspace search engines:
- 3) IP and C segment asset scanning:
- 4) Host discovery
- 5) Operating system identification
- 6) For details on common port vulnerabilities and default device passwords, see the web column.
- 4.Others
- 2. Website fingerprint identification
- 3. Collection of Sensitive Information
Preface
In normal work, some customers may give a very detailed asset list, but some may give a main domain name or even a name, so at this time we need to manually collect the information ourselves.
1. Collection of asset information
1. Main domain name asset collection
1) ICP filing inquiry
Link | illustrate |
---|---|
https://beian.miit.gov.cn/#/Integrated/index | Registration with the Ministry of Industry and Information Technology |
https://www.beian.gov.cn/portal/registerSystemInfo | Public security filing |
http://icp.chinaz.com/ | Webmaster's Home |
https://www.aizhan.com/cha/ | Aizhan.com |
2) DNS record query
Link | illustrate |
---|---|
https://dnsdb.io/zh-cnl | Dnsdb |
https://site.ip138.com | Query network |
https://ti.360.net/#/homepage | 360 Threat Intelligence Center |
https://x.threatbook.com | Weibu online |
https://viewdns.info | viewdns.info |
https://securitytrails.com | securitytrails |
https://tools.ipip.net/cdn.php | tools.ipip |
3) Whois query includes online website and email retrieval
Information left when registering a domain name. For example, the email address, phone number, name, etc. of the domain name registrant. Based on this information, you can try to create a social engineering password, or find out more assets, etc. You can also check the registrant, email, phone number, organization and more domain names.
Online website link | illustrate |
---|---|
https://beian.miit.gov.cn/#/Integrated/index | Ministry of Industry and Information Technology registration website |
https://www.beian.gov.cn/portal/registerSystemInfo | Public Security Registration Website |
http://whois.chinaz.com/ | Webmaster's Home |
https://whois.aizhan.com/ | Aizhan.com |
https://webwhois.cnnic.cn/WelcomeServlet | China Internet Information Center |
https://whois.cloud.tencent.com/ | Tencent Cloud |
https://whois.aliyun.com/ | Ali Cloud |
http://whois.xinnet.com/domain/whois/index.jsp | new network |
Check email link | illustrate |
---|---|
https://bbs.fobshanghai.com/checkemail.html | Lucky man |
https://www.benmi.com/rwhois | whois reverse check |
http://whois.chinaz.com/reverse?ddlSearchMode=1 | Webmaster Tools |
https://phonebook.cz | phonebook |
https://hunter.io/ | hunter |
4) IP reverse check can use cyberspace search engines or threat intelligence centers
Link | illustrate |
---|---|
https://ti.360.net/ | 360 Threat Intelligence Center |
https://x.threatbook.com/ | Weibu online |
2. Collection of subdomain assets
1) DNS domain transfer
DNS servers are divided into main servers, backup servers, and cache servers.
Domain transfer means that the backup server copies data from the main server and then updates its own database to achieve data synchronization. This is to increase redundancy. Once there is a problem with the main server, the backup server can directly provide support.
The domain transfer vulnerability is due to improper DNS configuration, which allows anonymous users to obtain all records of a certain domain, causing the topology of the entire network to be leaked to potential attackers. With this network blueprint, attackers can save a lot of scanning time. , while improving the accuracy of the target.
There are three ways to detect DNS domain transfer vulnerabilities: nslookup, dig, and using nmap scripts.
2) Public dns data set
https://hackertarget.com/find-dns-host-records/
https://www.netcraft.com/
3) Via search engine
Search subdomain names through hack search syntax such as Google, Baidu, Sogou, 360, Bing, etc.
Link | illustrate |
---|---|
https://www.google.com | Google syntax: intitle=company name; site:xxxx.com |
https://www.baidu.com | Baidu syntax: intitle=company name;site:xxxx.com |
https://www.sogou.com/ | Sogou |
https://www.so.com/ | 360 |
https://cn.bing.com/ | Bing |
4) Through cyberspace search engines
Link | illustrate |
---|---|
https://www.zoomeye.org/ | Zhong Kui's Eye |
https://fofa.info/ | fly away |
https://www.shodan.io/ | shadon |
https://hunter.qianxin.com/ | Eagle Figure |
https://quake.360.cn/ | 360 |
5)子域名的信息泄露包括JS文件泄露、网络爬虫等
a)可利用github直接搜索域名或者网站的js文件泄露子域名,JSFinder,JSINFO-SCAN和SubDomainizer都是从网站js文件中搜索子域名的工具。
链接 | 说明 |
---|---|
https://github.com/Threezh1/JSFinder | JSFinder是一款用作快速在网站的js文件中提取URL,子域名的工具。 |
https://github.com/p1g3/JSINFO-SCAN | 对网站中引入的JS进行信息搜集的一个工具 |
https://github.com/nsonaniya2010/SubDomainizer | 查找子域名的工具 |
https://github.com/rtcatc/Packer-Fuzze | 针对webpack打包方式的 |
https://github.com/momosecurity/FindSomething | FindSomething |
b)利用文件泄漏,很多网站有跨域策略文件crossdomain.xml、站点地图sitemap.xml和robots.txt等,其中也可能存在子域名的信息。
c)利用网络爬虫,很多网站的页面中,会有跳转到其他系统的功能,如OA、邮箱系统等,其中可能就包含有其他子域名相关的信息,此外部署了内容安全策略(CSP)的网站在header头Content-Security-Policy中,也可能存在域名的信息。可使用burpsuite或者awvs类工具对站点进行爬取分析。
6)一些在线网站子域名查询
链接 | 说明 |
---|---|
https://site.ip138.com/ | 查询网 |
https://phpinfo.me/domain/ | 在线子域名查询 |
http://tool.chinaz.com | 站长之家 |
https://www.t1h2ua.cn/tools/ | 子域名扫描 |
https://dnsdumpster.com/ | dnsdumpster |
http://dns.aizhan.com | 爱站 |
7)子域名爆破工具
链接 | 说明 |
---|---|
https://github.com/euphrat1ca/LayerDomainFinder | layer子域名挖掘机 |
https://github.com/lijiejie/subDomainsBrute | subDomainsBrute |
https://github.com/shmilylty/OneForAll | OneforAll |
https://github.com/aboul3la/Sublist3r | Sublist3r |
https://github.com/laramies/theHarvester | theHarvester |
https://github.com/projectdiscovery/subfinder | subfinder |
https://github.com/knownsec/ksubdomain | ksubdomain |
8)批量域名存活探测工具
链接 | 说明 |
---|---|
https://github.com/dr0op/bufferfly | bufferfly |
https://github.com/broken5/WebAliveScan | WebAliveScan 可进行批量目标存活扫描和目录扫描 |
https://github.com/EASY233/Finger | Finger |
9)SSL/TLS证书查询
链接 | 说明 |
---|---|
https://myssl.com | SSL/TLS安全评估报告 |
https://crt.sh/ | crt.sh |
https://spyse.com/tools/ssl-lookup | SPYSE |
https://censys.io/ | censy |
10)利用证书透明度收集子域
要向用户提供加密流量,网站必须先向可信的证书授权中心 (CA) 申请证书。然后,当用户尝试访问相应网站时,此证书即会被提供给浏览器以验证该网站。近年来,由于 HTTPS 证书系统存在结构性缺陷,证书以及签发证书的 CA 很容易遭到入侵和操纵。Google 的证书透明度项目旨在通过提供一个用于监测和审核 HTTPS 证书的开放式框架,来保障证书签发流程安全无虞。可以使用以下网站来查询
crtsh
entrust
censys
google
spyse
certspotter(每小时免费查询100次)
facebook(需要登录)
3.IP和C段资产收集
1)绕过CDN寻找真实IP
a)多地ping,可以使用以下两个网站。
http://ping.chinaz.com/
http://ping.aizhan.com/
采用各地 dns 解析的方式来判断是否存在cdn,如果ip一致则不存在相反就是存在的。
知乎是使用了腾讯云的cdn,所以无法直接获取到它的真实IP,这对后续的工作造成了困扰,可以采用网站标题匹配的方法来进行查找,
之后我们到fofa来进行titie匹配,然后逐个查看。
b)利用证书序列号
一串16进制字符,我们需要将其调整为10进制来满足知乎的搜索结果。
然后在fofa中使用cert 语法进行查询,域名和ip能够都访问网站就为真实ip。
c)利用nslookup
nslookup 进行检测,原理同上,如果返回域名解析对应多个 IP 地址多半是使用了 CDN
d)利用Fofa、Shadon等搜索引擎。
e)ping域名而不带主机名
一般我们都ping www.hasee.com,而www主机名一定会被cdn保护(前提是企业使用cdn)
f)采用国外DNS,这个方法主要就是针对一些cdn 只对国内的ip部署了cdn,对于国外的ip并没有部署,这样就会得到真实IP。
链接 | 说明 |
---|---|
https://www.wepcc.com/ | wepcc |
http://www.ab173.com/dns/dns_world.php | ab173 |
https://dnsdumpster.com/ | dnsdumpster |
https://who.is/whois/zkaq.cn | who.is |
g)利用邮件去查
很多网站存在注册功能,注册时获取验证码,他会向邮箱发送一封邮件,这时你可以显示邮件全文查看ip
h)利用子域名
这种方法的主要原理就是因为很多公司没有必要为每一个子域名都使用cdn,而且子域名和主站使用
同一个服务器,此时就会导致真实IP泄漏,可以用子域名挖掘机,Subdomainbrute等等去查询子域名,
获取子域名ip。
i)DNS历史解析记录,有一些网站可以查询到DNS历史解析记录,可能在很多网站并未采用cdn时候的解析记录就被记录了下来,之后也并未更换服务器,此时就能查询到真实IP地址。可以使用以下网站等等。
链接 | 说明 |
---|---|
https://dnsdb.io/zh-cnl | Dnsdb |
https://site.ip138.com | 查询网 |
https://ti.360.net/#/homepage | 360威胁情报中心 |
https://x.threatbook.com | 微步在线 |
https://viewdns.info | viewdns.info |
https://securitytrails.com | securitytrails |
https://tools.ipip.net/cdn.php | tools.ipip |
j)HTML 页面信息匹配
采用FOFA搜索引擎(https://fofa.info/)可以对html 进行匹配(shodan也能做到,就是费点劲),
比如我们匹配标题,我们先来查看一下网站首页的标题,然后去fofa搜索就会搜索到。
2)通过网络空间搜索引擎搜集:
链接 | 说明 |
---|---|
https://www.zoomeye.org/ | 钟馗之眼 |
https://fofa.info/ | fofa |
https://www.shodan.io/ | shadon |
https://hunter.qianxin.com/ | 鹰图 |
https://quake.360.cn/ | 360 |
3)IP和C段资产扫描:
工具有:Nmap,msscan,Goby,水泽,fscan,EHole(棱洞)等等。
链接 | 说明 |
---|---|
https://nmap.org/download.html | Nmap |
https://gobies.org/ | Goby |
https://github.com/0x727/ShuiZe_0x727 | 水泽 |
https://github.com/shadow1ng/fscan | fscan |
https://github.com/EdgeSecurityTeam/EHole | EHole(棱洞) |
https://github.com/codeyso/CodeTest | ARL灯塔 |
4)主机发现
a)二层发现,主要利用arp协议,速度快,结果可靠,不过只能在同网段内的主机。
arping工具:arping 192.168.1.2 -c 1
nmap工具:192.168.1.1-254 –sn
netdiscover -i eth0 -r 192.168.1.0/24
scapy工具:sr1(ARP(pdst="192.168.1.2"))
b)三层发现,主要利用ip、icmp协议,速度快但没有二层发现快,可以经过路由转发,理论上可以探测互联网上任意一台存活主机,但很容易被边界防火墙过滤。
ping工具:ping 192.168.1.2 –c 2
fping工具:fping 192.168.1.2 -c 1
Hping3工具:hping3 192.168.1.2 --icmp -c 2
Scapy工具:sr1(IP(dst="192.168.1.2")/ICMP())
nmap工具:nmap -sn 192.168.1.1-255
c)四层发现,主要利用tcp、udp协议,速度比较慢,但是结果可靠,可以发现所有端口都被过滤的存活主机,不太容易被防火墙过滤。
Scapy工具:
sr1(IP(dst="192.168.1.2")/TCP(dport=80,flags='A') ,timeout=1)) #tcp发现
sr1(IP(dst="192.168.1.2")/UDP(dport=33333),timeout=1,verbose=1) #udp发现
nmap工具:
nmap 192.168.1.1-254 -PA80 –sn #tcp发现
nmap 192.168.1.1-254 -PU53 -sn #udp发现
hping3工具:
hping3 192.168.1.1 -c 1 #tcp发现
hping3 --udp 192.168.1.1 -c 1 #udp发现
5)操作系统识别
知道目标存活主机的操作系统后,可以依据操作系统来实施针对性的测试。
大小写敏感判断
开启22端口的话就是Linux系统
TTL值:Windows(65~128),Linux/Unix(1-64),某些Unix(255)
nmap工具:nmap 192.168.1.1 -O
xprobe2工具:xprobe2 192.168.1.1
p0f工具:使用后,直接访问目标即可
6)常见端口漏洞和默认设备口令详见web专栏。
4.其他
1)如果主站及子站没有思路可以尝试其他方式,如小程序或者APP。可采用天眼查,爱企查,企查查等网站查询该企业的公众号或者APP。
2)微信搜索公众号和小程序大家应该都知道就不举例了,支付宝也一样。
3)还可以用搜狗微信搜索公众号。
二、网站指纹识别
1.网站指纹识别
1)在线平台:
链接 | 说明 |
---|---|
http://whatweb.bugscaner.com/look/ | bugscaner 需要扫码登录 |
https://fp.shuziguanxing.com/#/ | 数字观星 |
http://www.yunsee.cn/finger.html | 云悉 需注册 |
http://sso.tidesec.com/ | 潮汐 |
http://whatweb.bugscaner.com/look/ | whatweb |
https://github.com/search?q=cms识别 | github查找 |
2.网站waf识别
WAF识别:wafw00f
链接 | 说明 |
---|---|
https://github.com/EnableSecurity/wafw00f | wafw00f |
三、敏感信息收集
1.网站漏洞扫描
网站漏洞扫描,各种扫描器了。如:nessus,极光,xray,AWVS,goby,AppScan,各种大神团队自己编写的扫描器等等。
2.目录扫描
目录扫描,主要扫描敏感信息、隐藏的目录和api、代码仓库、备份文件等。工具有:各种御剑,dirmap,Dirsearch,dirbuster,7kbstorm,gobuster等等。
3.JS信息收集
在JS中可能会存在大量的敏感信息,包括但不限于:
- 某些服务的接口,可以测试这些接口是否有未授权等
- 子域名,可能包含有不常见或者子域名收集过程中没收集到的目标
- 密码、secretKey等敏感数据
链接 | 说明 |
---|---|
https://gitee.com/kn1fes/JSFinder | jsfinder |
https://github.com/rtcatc/Packer-Fuzzer | Packer-Fuzzer |
https://gitee.com/mucn/SecretFinder | SecretFinder |
4.通过在线网站和各种网盘搜集
直接百度网盘搜索,就可搜到很多在线网盘,然后进入网盘搜索关键词,如单位名、单位别称等。
链接 | 说明 |
---|---|
https://wooyun.website/ | 乌云漏洞库 |
https://www.lingfengyun.com/ | 凌云搜索 |
http://www.pansoso.com | 盘搜搜 |
http://www.pansou.com/ | 盘搜 |
5.通过搜索引擎和代码仓库搜集敏感信息
通过搜索引擎,谷歌百度搜狗360等hack搜索语法搜索信息。以下示例为谷歌和github:
Google语法 | 说明 |
---|---|
site:xxx.com 学号或管理/admin/login等 | 搜集学号或后台等 |
site:xxx.com inurl:?=/login/sql.php等等 | 搜集SQL注入点 inurl:URL存在关键字的网页 |
site:xxx.com filetype:doc/pdf/xlsx/xls等 | 搜集敏感文件 filetype:搜索指定文件类型 |
site:xxx.com intext:@xxx.com | 搜集mail intext:正文中存在关键字的网页 |
site:xxx.com intitle:登录/注册 | 搜集敏感web路径 intitle:标题中存在关键字的网页 |
site:huoxian.cn inurl:token | 搜索token |
site:Github.com sa password | 密码搜索 |
site:Github.com root password | 密码搜索 |
site:Github.com User ID=‘sa’;Password | 密码搜索 |
site:Github.com inurl:sql | 密码搜索 |
site:Github.com svn | SVN 信息收集 |
site:Github.com svn username | SVN 信息收集 |
site:Github.com svn password | SVN 信息收集 |
site:Github.com svn username password | SVN 信息收集 |
site:Github.com password | 综合信息收集 |
site:Github.com ftp ftppassword | 综合信息收集 |
site:Github.com 密码 | 综合信息收集 |
site:Github.com 内部 | 综合信息收集 |
github语法 | 说明 |
---|---|
in:name xxxx | 仓库标题中含有关键字xxxx |
in:descripton xxxx.com | 仓库描述搜索含有关键字xxxx |
in:readme xxxx | Readme文件搜素含有关键字xxxx |
smtp xxx.com password 3306 | 搜索某些系统的密码 |