5. web信息收集(OWASP实战训练)

1. 信息收集概述

(1)web信息收集(探测)即web踩点,主要是掌握目标web服务的方方面面,是实现web渗透入侵前的准备工作
(2)Web踩点内容包括操作系统、服务器类型、数据库类型、web容器、web语言、域名信息、网站目录。。。。
(3)Web信息收集涉及搜索引擎、网站扫描、域名遍历、指纹识别等工作

2. Google hacking

2.1 Site

功能:搜索指定的域名的网页内容,可以用来搜索子域名、跟此域名相关的内容

示例:

site:zhihu.com			搜索跟zhihu.com相关的网页
“web安全” site:zhihu.com	搜索zhihu.com跟web安全相关的网页
“sql注入” site:csdn.net		在csdn.net搜索跟sql注入相关的内容

“教程” site:pan.baidu.com		在百度盘中搜索教程

2.2 filetype

功能:搜索指定文件类型

示例:

“web安全” filetype:pdf		搜索跟安全书籍相关的PDF文件
nmap filetype:ppt			搜索跟nmap书籍相关的ppt文件
site:csdn.net	 filetype:pdf	搜索CSDN网站中的PDF文件
filetype:pdf	filetype:www.51cto.com  搜索51cto的PDF文件

2.3 inurl

功能:搜索url网址存在特定关键字的网页,可以用来搜寻有注入点的网站

示例:

inurl:.php?id=			搜索网址中有“php?id”的网页
inurl:.jsp?id=			搜索网址中有“jsp?id”的网页
inurl:.asp?id=			搜索网址中有“asp?id”的网页
inurl:/admin/login.php	搜索网址中有“/admin/login.php”的网页(后台)
inurl:login			搜索网址中有“login”等登陆网页(一般前端)

2.4 intitle

功能:搜索标题存在特定关键字的网页

示例:

intitle:后台登录		搜索网页标题是“后台登陆”的相关网页
intitle:后台管理 filetype:php 搜索网页标题是“后台管理”的PHP页面
intitle:index of “keyword”	搜索此关键字相关的索引目录信息
intitle:index of “parent directory”	搜索跟目录相关的索引目录信息
intitle:index of “password”		搜索密码相关的索引目录信息
intitle:index of “login”			搜索登陆页面信息
intitle:index of “admin”			搜索后台管理页面信息

intitle:后台登录 一般不知道网站后台的,后台隐藏比较深,可以使用此方法搜索,或者使用爆破系统来爆破后台出来也行。现在是在Google上面大面积的搜索,如果这有sql注入漏洞的话就能注入进去了。一般后台隐藏很深是找不到的,只有后台管理员有这个网址,虽然有些网站藏得很深,但有些开发人员开发的登录title会写到后台登录。我们只有拿到后台账号

2.5 intext

功能:搜索正文存在特定关键字的网页

示例:

intext:powerd by Discuz 		搜索discuz论坛相关的页面
intext:powerd by wordpress 		搜索WordPress的制作的博客网站
intext:powerd by *CMS 		搜索*CMS相关的页面
intext:powerd by xxx inurl:login 		搜索此类网址的后台登录页面

intext:powerd by Discuz可以搜到用discuz框架构建的网站。

CMS内容管理系统、建站系统,国内比较知名的是织梦CMS,帝国CMS,自己在互联网访问的大部分都是基于此种的建站系统。这种建站系统一旦出现漏洞,那么通用的。大部分建站的,有很多并没有消除其一些使用的可以识别的信息。

2.6 实例

搜索美女/电影等相关网站:

inurl:php?id=  intitle:美剧
inurl:php?id=  intitle:美女
inurl:php?id=  intitle:美女图片 intext:power by discuz
inurl:php?id=  intitle:美女图片 intext:power by *cms

搜索用discuz搭建的论坛:

inurl:php?id=  intitle:电影 intext:power by discuz
intext:”power by discuz 7.2”  inurl:faq.php  intitle:论坛

搜索用struts相关的网站:

intitle:”Struts Problem Report”
intitle:”Struts Problem Report”	intext:”development mode is enabled.”

2.7 符号

-keyword		强制结果不要出现此关键字,例如:电影 -黑客
*keyword		模糊搜索,强制结果包含此关键字,例如:电影 一个叫*决定*
“keyword”	强制搜索结果出现此关键字,例如:书籍 “web安全”

3. shodan hacking

https://www.shodan.io

Shodan(撒旦搜索引擎)是有web工程师John matherly(马瑟利)编写的,被称为“最可怕的搜索引擎”,可扫描一切联网的设备。除了常见的web服务器、路由器、交换机、摄像头、打印机等一切联网设备。

3.1 IP

114.114.114.114

3.2 service/protocol

http
http country:”DE”
http country:”DE” product:”Apache httpd”
http product:”Apache httpd”

ssh
ssh default password
ssh default password country:”JP”

3.3 keyword

基于关键词搜索的思路是根据banner信息(设备指纹)来搜索

“default password” country:”TH”
FTP anon successful

3.4 country

country:cn
country:us
country:jp

3.5 product

product:”Microsoft IIS httpd”
product:”nginx”
product:”Apache httpd”
product:”MySql”

3.6 version

product:MySQL  version:”5.1.73”
product:”Microsoft IIS httpd”  version:”7.5”

3.7 hostname

hostname:org
hostname:edu

3.8 os

os:”Windows Server 2008 R2”
os:”Windows 7 or 8”
os:”Linux 2.6.x”

3.9 net

net:110.180.13.0/24
200 ok net:110.180.13.0/24
200 ok country:JP net:110.180.13.0/24

3.10 port

port:3389
port:445
port:22
port:80
port:443

3.11 综合示例

搜索日本区开启80端口的设备:

country:jp  port:”80”
country:jp  port:”80”	product:”Apache httpd”
country:jp  port:”80”	product:”Apache httpd”	city:”tokyo”
country:jp  port:”80”	product:”Apache httpd”	city:”tokyo” os:”Linux 3.x”

搜索日本区使用Linux2.6.x的设备:

country:jp  os:”Linux 2.6.x”
country:jp  os:”Linux 2.6.x”  port:”80”
country:jp  os:”Linux 2.6.x”  port:”80”	product:”Apache”

搜索日本区使用windows server系统的设备:

country:jp  os:”Windows Server 2008 R2”
country:jp  os:”Windows Server 2003”  port:”445”
country:jp  os:”Windows Server 2003”  port:”80”	

搜索日本区使用Microsoft IIS的设备

country:jp  product:”Microsoft IIS httpd”  version:”7.5”

4. zoomeye hacking

4.1 概述

https://www.zoomeye.org
ZoomEye(钟馗之眼)是一个面向网络空间的搜索引擎,“国产的shodan”,由知道创宇出品

Ip
Os
App
Service
Port
Product
Country
Ver
Cidr
Hostname
Site
Title
Header
Keywords
Desc

用户手册:http://www.zoomeye.org/help

谷歌搜索内容是很强大的。
要想搜到网站的指纹信息,Apache等版本信息可以通过shodan和zoomeye等网站搜索。

5 Nmap

5.1 nmap简介

Nmap是安全渗透领域最强大的开源端口扫描器,能跨平台支持运行。

https://nmap.org/
http://sectools.org/	

这不是漏扫软件,这是信息收集软件,踩点

5.2 扫描示例

主机发现	 nmap -sn 192.168.106/24
端口扫描	nmap -s5 -p1-1000 192.168.106.134
系统扫描	nmap -0 192.168.106.134
版本扫描 	nmap -A 192.168.106.134

5.3 脚本扫描

/usr/share/nmap/scripts#	nmap --script=default 192.168.106.134
nmap --script=auth 192.168.106.214
nmap --script=brute 192.168.106.134

nmap --script=vuln 192.168.106.134
nmap --script=broadcast 192.168.106.134
nmap --script=smb-brute.nse 192.168.106.134

-A 扫描端口,系统,路由追踪
+ORDER+BY+1
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

吾名招财

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值