渗透测试中拿到目标资产后需要对目标资产进行资产整理再进行测试,目标资产形式可能是企业名称、域名信息等。此篇文章主要总结对目标资产收集的一些思路、渠道和工具等。
文章作者:奇安信攻防社区(中铁13层打工人)
文章来源:https://forum.butian.net/share/3837
一般拿到目标资产如果是公司名称的时候可以通过企业信息去获取更多信息。
1、可以使用:天眼查、企查查、爱企查、小蓝本等工具查询。
结合知识产权下的信息进行收集,会展示域名、小程序、app、公众号等。
https://beian.miit.gov.cn/#/Integrated/index
http://icp.chinaz.com/
如果给出的目标资产是域名形式,那么可以进行资产测绘,收集其IP和子域名信息。
1、子域名通过工具辅助测试
(1)子域名在线查询:
https://zh.subdomains.whoisxmlapi.com/lookup
https://pentest-tools.com/information-gathering/find-subdomains-of-domain
项目地址:https://github.com/shmilylty/OneForAll
https://site.ip138.com/ip/domain.htm
https://hackertarget.com/find-dns-host-records/
https://searchdns.netcraft.com/
http://viewdns.info/
https://github.com/knownsec/ksubdomain
https://github.com/FeeiCN/ESD
https://github.com/Lijijie/subDomiansBrute
(1)crtsh:https://crt.sh/
(2)facebook:https://developers.facebook.com/tools/ct
(3)entrust:https://www.entrust.com/ct-search/
(4)certspotter:https://sslmate.com/certspotter/api/
(5)spyse:https://spyse.com/search/certificate
(6)censys:https://censys.io/certificates
(7)google:https://google.com/transparencyreport/https/ct/
(1)http://whois.chinaz.com/ 站长之家
(2)https://whois.aliyun.com/ 阿里云域名信息查询
(3)https://www.whois365.com/cn/ 全球whois查询
site:网址 //搜索指定的域名的网页内容 、可以用来搜索子域名、跟此域名相关的内容
site:sohu.com -www //搜索除了www.xxx.com其他的网站信息
filetype:文件类型 //搜索指定文件类型
intitle:keyword //搜索标题存在特定关键字的网页
intext:keyword //搜索正文存在特定关键字的网页
intext:powered by wordpress 搜索wordpress制作的博客网址
intext:Powered by *CMS 搜索CMS相关的页面
使用端口扫描工具对目标系统进行端口探测,以nmap为例:
nmap -p 1-65535 <目标域名> (所有端口扫描)
nmap -p 80,443,8080,8000,5000 <目标域名> (常用端口扫描)
nmap -sV -p <开放端口> <目标域名> (服务器版本检测)
使用目录探测对目标系统进行探测:
gobuster dir -u http://<目标域名>:<开放端口> -w /path/to/wordlist.txt
dirb http://<目标域名>:<开放端口> /path/to/wordlist.txt
./scan.sh example.com
TARGET=$1
WORDLIST="/usr/share/wordlists/dirb/common.txt"
# 检查输入
if [ -z "$TARGET" ]; then
echo "Usage: $0 <target-domain>"
exit 1
fi
# 端口探测
echo "Scanning ports for $TARGET..."
nmap -p 1-65535 $TARGET -oN ports.txt
# 查找开放的 HTTP/HTTPS 端口
OPEN_PORTS=$(grep "/open" ports.txt | awk '{print $2}' | tr 'n' ' ')
if [ -z "$OPEN_PORTS" ]; then
echo "No open ports found."
exit 1
fi
# 迭代每个开放的端口进行目录探测
for PORT in $OPEN_PORTS; do
echo "Found open port: $PORT"
# 目录探测
echo "Directory scanning on http://$TARGET:$PORT..."
gobuster dir -u http://$TARGET:$PORT -w $WORDLIST
done
<img src="https://shs3.b.qianxin.com/butian_public/fbd5efafd73d26f81d080f48c4df128c8.png" alt="image-20240723162433165" style="zoom:150%;" />
admin
autotest
cert
confluence
console
crm
galaxy
git
gitlab
grafana
hr
it
jira
k8s
kafka
kafka-manager
oa
okr
package
packages
release
repo
report
sso
wiki
work
zabbix
https://github.com/fofapro/Hosts_scan
<img src="https://shs3.b.qianxin.com/butian_public/f727ee35e285812de1e68f1a102be5c62.png" alt="image-20240723170117375" style="zoom:200%;" />
https://github.com/cckuailong/hostscan
https://github.com/alwaystest18/hostCollision
https://www.wappalyzer.com/
whatweb www.xxx.com //扫描单个目标
whatweb -i xxx --log-brief=txt.txt //把目标保存为txt文件,扫描多个目标
%framework_name%
powered by
built upon
running
httpd.conf、.htaccess //Apache
nginx.conf //nginx
web.config、applicationHost.config //IIS
application.properties、application.yml //springboot
server.xml //Tomcat
php.ini //PHP
settings.py、wsgi.py //Python、Django
postgresql.conf //PostgreSQL
my.cnf、my.ini //Mysql
mongod.conf //MongoDB
redis.conf //Redis
elasticsearch.yml //elasticsearch
X-Powered-By: PHP/7.4.3
Cookie: CAKEPHP=xxxxxxxxxxxx; //web应用框架是CakePHP
https://github.com/Tuhinshubhra/CMSeeK
https://github.com/F6JO/CmsVulScan
3.2 Github、Yuque、网盘等在线资源对目标资产信息收集
https://github.com/search/advanced
"token"
"password"
"secret"
"passwd"
"username"
"key"
"apidocs"
"AWSSecretKey"
"access_key"
"access_token"
"amazonaws"
"apiSecret"
"api_key"
"api_secret"
"auth"
"aws_access"
"config"
"login"
"mysql"
"pass"
"pwd"
"ssh"
"swagger"
"jdbc"
https://www.lingfengyun.com/
http://www.zhuzhupan2.com/
3.3 全面指纹检测收集工具汇总
http://finger.tidedesec.net/
http://github.com/TideSec/TideFinger
https://github.com/owasp-amass/amass
项目地址:https://github.com/TideSec/TscanPlus
https://github.com/lemonlove7/EHole_magic
原文始发于微信公众号(李白你好):资产收集常用工具以及思路总结
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论