web_枚举

网页枚举

使用工具 gobuster,Nikto,WPScan

Gobuster

安装:sudo apt install gobuster

有用的全局标志

-t      线程        并发线程数(默认10)
-v      冗长        详细输出
-z      没有进展    不显示进度
-q      安静的      不打印多余的东西   
-o      输出        将结果写入的输出文件

目录模式

gobuster dir 然后使用-u和-w添加url和单词表
例如
gobuster dir -u http://10.10.10.10/ -w direnum.txt

其他有用的标志
-c      --cookies      用于请求的cookie
-x      --extensions        要搜索的文件扩展名
-H      --headers        指定http标头,-H 'Header1: val1' -H 'Header2: val2'
-k      --no-tls-validation            跳过 TLS 证书验证
-n      --no-status    不打印状态码
-P      --password        基本认证密码
-s      --status-codes      正面状态码
-b      --status-codes-blacklist     负面状态码
-U      --username      基本身份验证的用户名

DNS模式

gobuster dns 然后分别使用 -d 和 -w 选项添加域和词表
例如
gobuster dns -d mydomain.thm -w subdomains.txt 

其他

-c      --show-cname        显示 CNAME 记录(不能与“-i”选项一起使用)
-i      --show-ips          显示 IP 地址
-r      --resolver          使用自定义DNS服务器

虚拟主机模式

虚拟主机是基于 IP 的

gobuster vhost 然后需要分别使用-u和-w选项添加域和词表
例如
gobuster vhost -u http://example.com -w subdomains.txt

Kali Linux默认列表

/usr/share/wordlists/dirbuster/directory-list-2.3-*.txt
/usr/share/wordlists/dirbuster/directory-list-1.0.txt
/usr/share/wordlists/dirb/big.txt
/usr/share/wordlists/dirb/common.txt
/usr/share/wordlists/dirb/small.txt
/usr/share/wordlists/dirb/extensions_common.txt - 在对文件进行模糊测试时很有用!

或者sudo apt install seclists

示例

目录扫描
gobuster dir -u http://10.10.10.10/ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -t 64

扩展名扫描
gobuster dir -u http://10.10.10.10/ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x.html,.php,.conf

扫描虚拟主机
gobuster vhost -u webenum.thm -w /usr/share/wordlists/SecLists/Discovery/DNS/subdomains-top1million-5000.txt -t 64

WPScan

WPScan 框架能够枚举和研究 WordPress 网站中存在的一些安全漏洞类别 - 包括 - 但不限于:

敏感信息披露(已披露漏洞或 CVE 的插件和主题安装版本)
路径发现(寻找错误配置的文件权限,即 wp-config.php)
弱密码策略(密码暴力破解)
存在默认安装(寻找默认文件)
测试 Web 应用程序防火墙(常见 WAF 插件)

更新:wpscan --update

--enumerate/-e 枚举  [option](要枚举的目标)

u      枚举用户名
wpscan --url http://cmnatics.playground/ --enumerate u 
p      枚举插件
wpscan --url http://cmnatics.playground/ --enumerate p 
t      枚举主题
wpscan --url http://cmnatics.playground/ --enumerate t 

vp     结果中显示有漏洞的插件
wpscan --url http://cmnatics.playground/ --enumerate vp 

执行密码攻击
wpscan –-url http://cmnatics.playground –-passwords rockyou.txt –-usernames cmnatic

调整 WPScan 的攻击性 (WAF)
--plugins-detection aggressive

Nikto

Nikto 能够对所有类型的网络服务器进行评估(并且不是特定于应用程序的,例如 WPScan。)。Nikto 可用于发现可能的漏洞,包括:

敏感文件
过时的服务器和程序(即易受攻击的网络服务器安装)
常见的服务器和软件错误配置(目录索引、cgi 脚本、x-ss 保护)

-host:扫描目标URL
-id:http认证接口
-list-plugins:列出所有可用的插件
-evasion:IDS/IPS逃避技术
-port:指定端口(默认80)
-ssl:使用SSL
-useproxy:使用HTTP代理
-vhost:当一个IP拥有多个网站时使用
-update:更新程序
-outfile:以文件形式输出扫描结果
-Format:规定输出文件的格式
-Version:显示插件和数据库的版本号
-Cgidirs:扫描相关CGI文件夹,传入单词“none”或者是“all”可以扫描所有CGI目录

插件介绍

通过使用-Plugin参数

apacheusers         尝试枚举 Apache HTTP 身份验证用户
cgi                 寻找我们可以利用的 CGI 脚本
robots              分析 robots.txt 文件,该文件指示我们能够导航到哪些文件/文件夹
dir_traversal       尝试使用目录遍历攻击(即LFI)

例:nikto -h 10.10.10.1 -Plugin apacheuser

扫描的冗长程度-Display


1       显示 Web 服务器提供的任何重定向。
2       显示收到的任何 cookie 
E       输出任何错误

posted @ 2023-03-29 11:12  gvpn  阅读(65)  评论(0编辑  收藏  举报