干货|最全Web 渗透测试信息搜集-CheckList
1.获取真实IP
2.如何判断是否是CDN
使用ping域名判断是否有CDN
cname.vercel-dns.com,很明显使用了cdn技术。使用不同主机ping域名判断是否有CDN
全球Ping测试:https://www.wepcc.com/站长工具Ping检测:http://ping.chinaz.com/爱站网Ping检测:https://ping.aizhan.com/
www.zjun.info的全球ping测试,有76.223.126、76.76.21.21这两个不同的解析IP,说明www.zjun.info可能使用了CDN。使用nslookup域名解析判断是否有CDN
nslookup命令对域名解析,发现其中的Name字段直接指向cname.vercel-dns.com,毫无疑问使用了CDN技术。www.baidu.com,其中Address字段也是指向两个不同IP,即www.baidu.com可能使用了CDN。3.如何绕过CDN获取真实IP
查询子域名
查询历史DNS记录
dnsdb:https://dnsdb.io/zh-cn/viewdns:https://viewdns.info/iphistory/微步在线:https://x.threatbook.cn/
使用国外主机请求域名
网站信息泄露漏洞
SERVER_ADDR字段会显示该主机真实IP。邮件信息
目标网站APP应用
4.旁站查询(IP反查)
Nmap扫描获取旁站信息
nmap -sV -p 1-65535 x.x.x.x
第三方服务获取旁站信息
站长工具同IP网站查询:http://s.tool.chinaz.com/samewebscan:https://www.webscan.cc/云悉:https://www.yunsee.cn/微步在线:https://x.threatbook.cn/在线旁站查询|C段查询|必应接口C段查询:http://www.bug8.me/bing/bing.php
https://cn.bing.com/search?q=ip:x.x.x.x
ip="x.x.x.x"
5.C段主机查询
Nmap扫描C段
nmap -sn x.x.x.x/24,对目标IP的C段主机进行存活扫描,根据扫描的结果可以判断目标IP的C段还有哪些主机存活。nmap -Pn这个命令在实际工作中的使用很多,该命令不通过ICMP协议进行主机存活判断,会直接对端口进行扫描。这样在开启了防火墙禁Ping的情况下,也可以利用这个命令正常扫描目标是否存活及对外开启的相关服务。搜索引擎语法收集C段信息
site:x.x.x.*
Fofa
ip="x.x.x.x/24"
在线C段扫描工具
在线旁站查询|C段查询|必应接口C段查询:http://www.bug8.me/bing/bing.php查旁站:https://chapangzhan.com/云悉:https://www.yunsee.cn/
本地C段扫描工具(其中某些工具不只是C段扫描)
httpscan:https://github.com/zer0h/httpscan小米范web查找器Goby:https://gobies.org/bufferfly:https://github.com/dr0op/bufferflycscan:https://github.com/z1un/cscan
6.子域名查询
blog.zjun.info和tools.zjun.info这两个域名是zjun.info的子域名。一般企业对于主站域名的应用的防护措施比较健全,不管是应用本身的漏洞发现、漏洞修复,还是安全设备相关的防护都做得更加及时和到位,而企业可能有多个、几十个甚至更多的子域名应用,因为子域名数量多,企业子域名应用的防护可能会没有主站及时。攻击者在主站域名找不到突破口时,就可以进行子域名的信息收集,然后通过子域名的漏洞进行迂回攻击。子域名信息收集主要包含枚举发现子域名、搜索引擎发现子域名、第三方聚合服务发现子域名、证书透明性信息发现子域名、DNS域传送发现子域名等方式。枚举发现子域名
在线子域名查询:https://phpinfo.me/domain/OneForAll:https://github.com/shmilylty/OneForAllknock:https://github.com/guelfoweb/knocksubDomainsBrute:https://github.com/lijiejie/subDomainsBruteLayer子域名挖掘机:https://github.com/euphrat1ca/LayerDomainFinder
搜索引擎发现子域名
site:xxx.com
Fofa
domain="xxx.com"
第三方聚合服务发现子域名
Sublist3r:https://github.com/aboul3la/Sublist3rOneForAll:https://github.com/shmilylty/OneForAll
证书透明性信息发现子域名
使CA无法(或至少非常困难)为域颁发SSL证书,而该域的所有者看不到该证书;提供一个开放的审核和监视系统,该系统可以让任何域所有者或CA确定证书是错误的还是恶意颁发的;尽可能防止用户被错误或恶意颁发的证书所欺骗。
https://crt.sh/https://transparencyreport.google.com/https/certificateshttps://developers.facebook.com/tools/ct/
ctfr:https://github.com/UnaPibaGeek/ctfrOneForAll:https://github.com/shmilylty/OneForAll
DNS域传送发现子域名
dns-zone-transfer进行检测nmap --script dns-zone-transfer --script-args dns-zone-transfer.domain=xxx.edu.cn -p 53 -Pn dns.xxx.edu.cn
Linux dig命令进行测试
dig xxx.com nsdig axfr @dns xxx.com
-sS (TCP SYN扫描)-sT (TCP connect()扫描)-sU (UDP扫描)-sN; -sF; -sX (TCP Null,FIN,and Xmas扫描)-Pn (不通过ICMP探测)
详细文档:
https://nmap.org/man/zh/
https://github.com/robertdavidgraham/masscan
8.目录探测
dirsearch:https://github.com/maurosoria/dirsearchdirmap:https://github.com/H4ckForJob/dirmap御剑目录扫描:https://github.com/foryujian/yjdirscandirb:https://tools.kali.org/web-applications/dirb
ProxyPool:https://github.com/Python3WebSpider/ProxyPool
9.指纹识别
服务器信息搜集
nmap -sV -p 1-65535 x.x.x.xnmap -O x.x.x.x
CMS识别
特定关键字识别
Powered by XXCMS)与扫描工具数据库存储的指纹信息进行正则匹配,判断CMS的类型。特定文件及路径识别
/wp-admin、/wp-includes等,有些CMS的robots.txt文件也可能包含了CMS特定的文件路径,与扫描工具数据库存储的指纹信息进行正则匹配,判断CMS的类型。响应头信息识别
rememberMe字段:指纹识别工具
whatweb:https://github.com/urbanadventurer/WhatWebwappalyzer:https://github.com/AliasIO/wappalyzerGlass:https://github.com/s7ckTeam/Glass
CMSScan:https://github.com/ajinabraham/CMSScanCMSmap:https://github.com/Dionach/CMSmap云悉:https://www.yunsee.cn/bugscaner在线cms识别:http://whatweb.bugscaner.com/look/
10.Google hacking
目录遍历: site:$site intitle:index.of配置文件泄露: site:$site ext:xml | ext:conf | ext:cnf | ext:reg | ext:inf | ext:rdp | ext:cfg | ext:txt | ext:ora | ext:ini数据库文件泄露: site:$site ext:sql | ext:dbf | ext:mdb日志文件泄露: site:$site ext:log备份和历史文件: site:$site ext:bkf | ext:bkp | ext:bak | ext:old | ext:backup登录页面: site:$site inurl:loginSQL错误: site:$site intext:"sql syntax near" | intext:"syntax error has occurred" | intext:"incorrect syntax near" | intext:"unexpected end of SQL command" | intext:"Warning: mysql_connect()" | intext:"Warning: mysql_query()" | intext:"Warning: pg_connect()"公开文件信息: site:$site ext:doc | ext:docx | ext:odt | ext:pdf | ext:rtf | ext:sxw | ext:psw | ext:ppt | ext:pptx | ext:pps | ext:csvphpinfo(): site:$site ext:php intitle:phpinfo "published by the PHP Group"搜索粘贴站点: site:pastebin.com | site:paste2.org | site:pastehtml.com | site:slexy.org | site:snipplr.com | site:snipt.net | site:textsnip.com | site:bitpaste.app | site:justpaste.it | site:heypasteit.com | site:hastebin.com | site:dpaste.org | site:dpaste.com | site:codepad.org | site:jsitor.com | site:codepen.io | site:jsfiddle.net | site:dotnetfiddle.net | site:phpfiddle.org | site:ide.geeksforgeeks.org | site:repl.it | site:ideone.com | site:paste.debian.net | site:paste.org | site:paste.org.ru | site:codebeautify.org | site:codeshare.io | site:trello.com $site搜索Github、Gitlab: site:github.com | site:gitlab.com $site.
在线Google Hacking利用:https://tools.zjun.info/googlehacking/
11.社工信息收集
whois信息
whois命令
whois xxx.com
后面的具体信息就没截出来了,可以查询域名的所有人、注册商等相关信息:
在线工具
站长工具whois查询:http://tool.chinaz.com/ipwhois爱站网whois查询:https://whois.aizhan.com/
12.社会工程学
bugku密码攻击器:https://www.bugku.com/mima/白鹿社工字典生成器:https://github.com/z3r023/BaiLu-SED-Tool
Telegram软件中充斥着大量免费或付费的社工查询。文章作者 :zjun文章来源 :zjun's blog
侵权请私聊公众号删文
热文推荐