信息搜集总结

文章最后更新时间为:2019年06月11日 19:55:29

1. 子域名

主要分为三种,爆破,ssl证书,dns记录查询

工具查询:

  • subDomainsBrute 高并发DNS暴力枚举,乌云核心白帽李劼杰的作品。
  • Layer子域名挖掘机 法师的作品,很古老的作品了。
  • subbrut 快速枚举 DNS 记录和子域名。
  • Sublist3r 用于渗透测试人员的快速子域名枚举工具。

像这种爆破类的工具,选一款即可,主要是字典的作用,对于爆破,还是要收集一个好字典。

在线查询

2. 旁站及C段查询

3. 端口信息

masscan就够了,扫描过程中可以用nmap探测一下基本的漏洞:

nmap -T4 -A -Pn 221.235.187.69 --script=auth,vuln,ftp-brute,imap-brute,smtp-brute,pop3-brute,mongodb-brute,redis-brute,ms-sql-brute,rlogin-brute,rsync-brute,mysql-brute,pgsql-brute,oracle-sid-brute,oracle-brute,rtsp-url-brute,snmp-brute,svn-brute,telnet-brute,vnc-brute,xmpp-brute 

masscan扫描快的多,适合扫描大量主机:

masscan 192.168.1.0/0 -p0-65535 --banners --rate=100000 -oL result.txt

4. web应用信息收集

4.1 敏感信息搜索

4.1.1 可以利用google hacking

# 目录遍历
site:baidu.com intitle:index.of
# 配置文件泄露
site:baidu.com ext:xml | ext:conf | ext:cnf | ext:reg | ext:inf | ext:rdp | ext:cfg | ext:txt | ext:ora | ext:ini
# 数据库文件泄露
site:baidu.com ext:sql | ext:dbf | ext:mdb
# 日志文件泄露
site:baidu.com ext:log
# 备份和历史文件
site:baidu.com ext:bkf | ext:bkp | ext:bak | ext:old | ext:backup
# 后台地址
site:baidu.com inurl:login
# sql错误
site:baidu.com 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:baidu.com ext:doc | ext:docx | ext:odt | ext:pdf | ext:rtf | ext:sxw | ext:psw | ext:ppt | ext:pptx | ext:pps | ext:csv
# phpinfo()
site:baidu.com ext:php intitle:phpinfo "published by the PHP Group"

4.1.2 也可以搜各大网盘,公司员工可能把一些内部资料放在了公网网盘。利用这点和公司深入交流一下。

4.1.3 还可以利用github搜索,直接上几个相关项目

4.2 网站指纹探测

1. 查看robots.txt
2. 可以利用报错、404,查看是什么`cms`和中间件
3. 用大小写是否敏感探测操作系统
4. waf探测: wafw00f
5. 在线指纹识别
    http://ght.se7ensec.cn
    http://whatweb.bugscaner.com/look/
    http://www.yunsee.cn/
    http://finger.tidesec.net/home/index/index.html
6. cdn检测: http://www.17ce.com/site/cdn.html
7. 查找真实ip: https://github.com/3xp10it/xcdn

4.3 web目录探测

web目录探测也是一个比较重要的点,我们可以利用google hacking可以找后台,但是有时候google或者百度都没有收集,这个时候我们需要对网站进一步认识的话就需要爆破一下目录。

目录探测的原理一般是爆破或者利用爬虫来爬取页面内容,然后进行解析。

当然我们是不希望直接爆破的,爆破目录即有可能封ip:

  • dirhunt 一款无需进行暴力破解攻击即可枚举Web服务器目录的工具

但是有时候没办法,上代理也要爆破它。

  • dirsearch 爆破网站中的目录和文件,外国工具,最好替换下字典
  • 御剑 大家都懂的
  • ......

这类工具其实还有很多,基本上都是爆破,在目录扫描时不要忘了扫一些敏感文件,比如svn、git,或者网站源代码。我也写过一个敏感文件泄露的小脚本: https://github.com/saucer-man/penetration-script/tree/master/source_leak

1 + 8 =
快来做第一个评论的人吧~