xxxxx.com "Authorization" #"Authorization: Bearer"xxxxx.com "filename:vim_settings.xml"xxxxx.com "language:PHP"
filename:manifest.xmlfilename:travis.ymlfilename:vim_settings.xmlfilename:databasefilename:prod.exs NOT prod.secret.exsfilename:prod.secret.exsfilename:.npmrc _authfilename:.dockercfg authfilename:WebServers.xmlfilename:.bash_history <Domain name>filename:sftp-config.jsonfilename:sftp.json path:.vscodefilename:secrets.yml passwordfilename:.esmtprc passwordfilename:passwd path:etcfilename:dbeaver-data-sources.xmlpath:sites databases passwordfilename:config.php dbpasswdfilename:prod.secret.exsfilename:configuration.php JConfig passwordfilename:.sh_history
language:python usernamelanguage:php usernamelanguage:sql usernamelanguage:html passwordlanguage:perl passwordlanguage:shell usernamelanguage:java apiHOMEBREW_GITHUB_API_TOKEN language:shell
authauthauthenticationclient_secretapi_token:“api token”client_idpassworduser_passworduser_passpasscodeclient_secretsecretpassword hashOTPuser auth
api_key“api keys”authorization_bearer

authauthauthenticationclient_secretapi_token:“api token”client_idpassworduser_passworduser_passpasscodeclient_secretsecretpassword hashOTPuser auth
很多关键字可以搜,还是批量搜高效,工具:
https://github.com/obheda12/GitDorker
https://github.com/michenriksen/gitrob[url]https://github.com/dxa4481/truffleHog[url=https://github.com/techgaun/github-dorks]https://github.com/techgaun/github-dorks[/url][/url]
这类工具需要设置git令牌,附上gitrob过程,踩坑:不要下relase ,自己编译最好:
git clone
https://github.com/michenriksen/gitrob.gitgo mod init #to use go mod 如果报错 运行go mod init github.com/michenriksen/gitrobrm Gopkg* #remove the old stuffgo build #to build it
./build.sh
设置git令牌
set GITROB_ACCESS_TOKEN=xxxxx
使用后可以查看图形界面的结果:
3. 目标人员姓名/手机/邮箱通过开源信息收集目标人员姓名/手机/邮箱,为后面打点做字典做准备。
https://github.com/laramies/theHarvester
通过搜索引擎、PGP服务器以及SHODAN数据库收集用户的email,子域名,主机,雇员名,开放端口和banner信息。 使用: -d 开关用于定义域名,-l 用于限制结果数量
theHarvester -d kali.org -l 200 -banubis,baidu,pentesttools,projectdiscovery,qwant,rapiddns,rocketreach,securityTrails,spyse,sublist3r,threatcrowd,threatminer,trello,twitter,urlscan,virustotal,yahoo,zoomeye,bing,binaryedge,bingapi,bufferoverun,censys,certspotter,crtsh,dnsdumpster,duckduckgo,fullhunt,github-code,google,hackertarget,hunter,intelx,linkedin,linkedin_links,n45ht,omnisint,otx
按github跑就是了,但是有点坑点: 配置api-keys在/etc/theHarvester 目录下api-keys.yaml填入对应的api key即可
有个坑点是key:后要加个空格在放key字符串,不然跑不起来
人员邮箱字典的构造:
https://github.com/pry0cc/GoogLinked/blob/master/GoogLinked.rb

还可以使用一些社工信息来做字典,这样的工具很多了,用一个就够了没必要用全部:Cupp/Cewl
https://github.com/r3nt0n/bopscrkpython3 bopscrk.py -i
3. 域名主动被动收集域名主动信息收集内容就有点杂了。 通过1、2点我们拿到了一批等待爆破的域名和人员的信息,以及泄露的一些敏感信息(运气好的话用泄露的信息已经打到点了。)
现在需要对域名进行whois信息查询、dns域名正反查询、子域名探测爆破三个方面收集。
1.whois信息查询whois需要查询域名的whois,然后根据whois信息来查询历史和反查,这样你就得到了一些邮箱和可疑域名。
查域名信息没什么说的,主要看网址注册人、到期记录、创建域的时间、名称服务器和联系信息等,查最新的一般都是托管的信息,而查看历史信息就有可能查到真实联系人邮箱电话等:
一些常见whois查询,手动的时候可以查询:
whois 信息反查
通过历史whois信息找到真实邮箱or组织名,再反查域名,又可以得到一批资产:
other:
- https://www.reversewhois.io/
复制代码
整理一下whois分了三步,先whois查询一个域名,然后对查询的信息进行历史whois查询和反查,最后得到一批邮箱和域名。**手动知道过程就行,实际做项目用工具批量查了整理:**
https://github.com/xugj-gits/domain-tool 批量whois查询
https://github.com/melbadry9/WhoEnum2.dns域名正向反向查询dns域名查询分两个部分,历史记录和ip反查:
DNS历史记录(doamin2ips)Dnsdumpster 是一个在线实用程序,我们使用它来查找子域、目标的 DNS 记录。
VT也是可以看dns数据信息的:
ip反查(ip2domains)
同ip查询多个解析到这个ip的域名,寻找更多web资产
https://viewdns.info/reverseip/
https://dnslytics.com/
ip反查也可以使用dig、nslookup、host命令完成:
工具推荐:
https://www.infobyip.com/ipbulklookup.php 批量ip反查
https://github.com/Sma11New/ip2domain 国内域名推荐ip2domain,会查询权重、ICP备案等
通过dns查询,我们拿到了一些域名和可疑ip段
3.子域名探测爆破没啥好说的,主要是收集的渠道全、过滤泛解析。 常见手法爆破子域名、证书透明度、搜索引擎、信息泄露、ASN号等等,很多工具已经做了这些工作
https://github.com/shmilylty/OneForAll
https://github.com/six2dez/reconftw[url]https://github.com/P1-Team/AlliN[url=https://github.com/d3mondev/puredns]https://github.com/d3mondev/puredns[/url][/url]
4. 整理域名ip资产到这里大致的收集就结束了,就是要对收集结果进行整理,通过上面收集能拿到:
一批待探测存活的域名一批待确定的ip段一些邮箱,姓名,手机号一些敏感文件、信息、通用密码(敏感信息收集阶段看脸)
整理后大致如上,有一步需要做的就是把收集的这些域名,转成ip段,但是是需要判断这个ip属不属于cdn,属不属于泛解析的ip,然后转成ip后要判断ip段的权重,哪些段才可能是目标主要的C段。
https://github.com/EdgeSecurityTeam/Eeyes 对subdomain数据处理、获取其中真实IP并整理成c段
https://github.com/canc3s/cIPR 整理后查看权重
5. 扫描检测打点这步就开始快速打点了。 上面整理后的资产,需要我们探测的是一批域名和一批C段
域名需要做的事:探测存活title、banner提取、指纹识别爬虫、目录轻量扫描、轻量漏扫
C段需要做的事:扫描端口,探测存活将扫的web和非web进行分类,把扫到的web资产加入到域名需要做的事,和对待域名没区别将扫到的非web(数据库/远程登录协议)进行爆破,比如mysql爆破,rdp爆破
一批域名和一批C段就这样做不同的事,来先探测是否有脆弱的点,最后才是回归常规web,一个站一个站的去撕
一些工具:
https://github.com/broken5/WebAliveScan web存活判断
https://github.com/fadinglr/EHole 红队重点攻击系统指纹探测工具
https://github.com/k8gege/K8CScan 漏洞扫描、密码爆破
https://github.com/b1gcat/DarkEye 主机发现+爆破
https://github.com/Adminisme/ServerScan 高并发网络扫描、服务探测工具
https://github.com/dean2021/titlesearch 批量抓取域名title工具
https://github.com/pmiaowu/PmWebDirScan 批量扫目录备份
还有的就是一些大家都熟知的xray,vulmap之类的漏洞,批量轻量去扫描一下即可。 把上面的几个步骤,工具串起来,行成快速信息收集,快速探测打点,最好写个贯穿流程的工具调用的脚本,自己写过效果不错但代码不好就不拿出来丢人了,基本这样过一遍就容易打到一些比较脆弱的点。
加我好友进交流群