渗透-信息收集

Created at 2019-06-25 Updated at 2019-08-15 Category 漏洞渗透 Tag 渗透-信息收集


渗透-信息收集

1.收集那些信息
a.目标系统的信息系统的相关资料
域名 、网络拓扑 、操作系统 、应用软件
相关脆弱性
b.目标系统的组织相关资料
组织架构及相关资料
地理位置细节
电话号码、邮件等联系方式
近期重大事件
员工简历
2.Googlehacking
intext:寻找正文中含有关键字网页
intitle:寻找标题中含有关键字网页
inurl:返回URL中含有关键字网页
site:指定访问的站点
filetype:指定访问文件类型
related:页面布局相似页面
3.whois
Whois是一个标准服务,可以用来查询域名是否被注册以及注册的详细资料
Whois 可以查询到的信息
域名所有者
域名及IP地址对应信息
联系方式
域名到期日期
域名注册日期
域名所使用的 DNS Servers
4.子域名收集
字典爆破:
Layer子域名挖掘机
SubDomainsBrute
在github上进行克隆下载
ttps://github.com/lijiejie/subDomainsBrute
可直接在kali上对SubDomainsBrute进行克隆即可

kali使用扫面qq
git clone https://github.com/lijiejie/subDomainsBrute.git
cd subDomainsBrute/
chmod +x subDomainsBrute.py
./subDomainsBrute
./subDomainsBrute.py qq.com -o ppp.txt
cat ppp.txt查看(导出文件必须以txt结尾)
Wydomain
https://github.com/ring04h/wydomain.git
Wydomain中的字典
Wydomain用法

库依赖安装:pip install -r requirements.txt
git clone https://github.com/ring04h/wydomain.git
chmod +x wydomain.git
$ python dnsburte.py -d aliyun.com -f dnspod.csv -o aliyun.log
子域名字典穷举结果保存在result / aliyun.com目录下的dnsburte.json文件
-d:域名
-o:输出的文件
-f:使用的字典
wfuzz(Wfuzz支持Python 3)
https://github.com/xmendez/wfuzz
要安装WFuzz:pip install wfuzz
git clone https://github.com/xmendez/wfuzz
使用:
wfuzz -w wordlist/general/common.txt –hc 404 http://testphp.vulnweb.com/FUZZ
Wfuzz编码器/解码器:
wfencode -e md5 test


搜索引擎:
site:xxx.com
Sublist3r(Sublist3r是一个python工具,旨在使用OSINT枚举网站的子域。它可以帮助渗透测试人员和漏洞猎人收集并收集他们所针对的域的子域。)
安装:git clone https://github.com/aboul3la/Sublist3r.git
建议安装python2.7
依赖关系:
Sublist3r依赖于,requests,dnspython,argparse,python
在Windows上安装:python27\python.exe -m pip install -r requirements.txt
在Linux上安装:sudo pip install -r requirements.txt
用法:python sublist3r.py -d yahoo.py -b -t 50 -p 80,443,21,22


第三方聚合应用枚举:
直接输域名就可以
DNSdumpster(https://dnsdumpster.com/)
5.子域名收集
证书透明度公开日志枚举
https://transparencyreport.google.com/https/certificates
https://crt.sh/
https://censys.io/
在线查询网站
http://tool.chinaz.com/subdomain/
http://www.yumingco.com/sub/
https://securitytrails.com/list/apex_domain/qq.com
https://findsubdomains.com/
https://opendata.rapid7.com/
第三方网站
https://github.com/
https://virustotal.com
https://www.shodan.io
http://ce.baidu.com/index/getRelatedSites?site_address=qq.com
X云
集成工具
https://github.com/yanxiu0614/subdomain3/
https://github.com/FeeiCN/ESD
6.端口扫描——端口信息收集
原理
通过端口扫描确定主机开放的端口,不同的端口对应运行着的不同的网络服务
扫描方式
全扫描
半打开扫描
隐秘扫描
漏洞扫描
在线查询
http://tool.chinaz.com/port/
https://tool.lu/portscan/index.html
http://coolaf.com/tool/port

工具
Nmap
Masscan
Python+masscan+Nmap
nmap
主机发现 (Host Discovery)
Nmap –sn
扫描协议 (Port Scanning)
TCP SYN 扫描(-sS)
TCP connent 扫描(-sT)
TCP FIN/Xmas/NULL 扫描(-sN/sF/sX)
简单扫描(nmap ip)
nmap ip
nmap -A ip
nmap -T4 -A -v ip
端口扫描(Nmap会默认以TCP SYN方式扫描目标端口,扫描目标主机的80-445端口的开放情况
以半连接的TCP SYN方式扫描目标主机的80端口,以UDP方式扫描目标主机的445端口)
nmap -p 80-445 ip
nmap -sS -sU -p T:80,U:445 ip
nmap -sS -sU –top-ports ip
版本侦测
nmap -sV ip
操作系统侦测
nmap -O ip
Masscan
端口扫描
Masscan 10.11.0.0/16 -p443
Masscan 10.11.0.0/16 -p80,443
Masscan 10.11.0.0/16 -p22-25


网站敏感目录和文件收集(主要还是字典。wwwscan 、御剑 、 dirbuster、cansina 备份压缩文件)
扫描网站目录结构,看看是否可以遍历目录,或者敏感文件泄漏。
phpinfo:会把你配置的各种信息暴露出来
后台目录:弱口令,万能密码,爆破
安装包:获取数据库信息,甚至是网站源码
上传目录:截断、上传图片马等
mysql管理接口:弱口令、爆破,万能密码,然后脱裤,甚至是拿到shell
安装页面 :可以二次安装进而绕过
编辑器:fck、ke、等
robots.txt

Site by csy using Hexo & Random

Hide