渗透测试之一:信息收集
通过web服务搜集信息
使用谷歌镜像站https://www.library.ac.cn/
使用baidu搜索引擎
常用语法
- site:指定搜索域名,如site:zhihu.com
- inurl:指定搜索在url中的关键词,如inurl:login,搜索url中包含login的网址
- intitle:指定搜索在标题中的关键字,如intitle:登陆
- intext:指定搜索在正文中的关键字,如intext:用户名
- filetype:指定文件类型搜索,如filetype:asp
语法使用
查找后台
site:xxx.com intext:登陆|后台|管理···|login|user|sys|manage|member|admin_login···
查找sql注入漏洞
site:xxx.com inurl:.php?id=23
inurl:.asp?id=11
查找上传点
site:xxx.com inurl:file
inurl:uploadfile
查找敏感信息泄露
site:xxx.com intitle:“index of/admin”
intitle:“index of/root”
intitle:“index of/admin”+password.txt
查找未授权访问phpmyadmin
intext:php探针
inurl:.php?intext:CHARACTER_SETS,COLLATIONS.?intitle:phpmyadmin 可以直接访问到后台
fofa网络空间资产搜索引擎
fofa常用语法
- domain=“xxx.com” //搜索xxx.com域名下的所有子域名
- host=“edu.cn” //搜索url中包含edu.cn
- port=“443” //搜索443端口的资产
- ip=“1.1.1.1” //搜索ip
- server=“apache” //搜索服务是apache的网站
- os=“windows” //搜索操作系统是windows的网站
- port=3306 或者 protocol==“mysql” //搜索包含mysql数据库的网站
- app=“海威康视” //搜索海威康视设备
- tiitle=“登陆” //搜索标题
- header=“thinkphp” //从http头里面搜索thinkphp
更多语法可以在fofa搜索页面中查看
利用whois、企业备案信息服务
如站长之家、天眼查
已注册域名的各种信息
利用dns域名服务
如nslookup、ping、tracert等方法
nslookup可以判断是否使用cdn
tracert可以查询本机发包到目标ip经过的路由器及ip