• 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
    
  • 相关阅读:
    初学UE5 C++②
    linux命令
    APP应用加固实战案例:贪玩蓝月
    分布式共识协议 Raft 是如何工作的?
    Phoenix Digital网络模块——将新的PLC连接到传统远程I/O
    【JVM技术专题】服务发生OOM故障定位方案「实战篇」
    【文件传输】查找等相关命令
    2022年软件测试人员必读的经典书籍推荐(附电子版)
    yolo配置(windows)
    R语言使用timeROC包计算无竞争情况下的生存资料多时间AUC值、使用cox模型、并添加协变量、可视化无竞争情况下的生存资料多时间ROC曲线
  • 原文地址:https://blog.csdn.net/qq_44870829/article/details/140007125