渗透必备-Metasploit常用模块的用法 | 8月更文挑战

1,782 阅读2分钟

如果你不知道什么是Metasploit,可以先看一下这篇:网络安全人员一定要知道的Metasploit渗透框架!

端口扫描

先查看一下支持的端口扫描类型

image-20210802220402222

ACK防火墙扫描

use auxiliary/scanner/portscan/ack

image-20210802221051213

image-20210802221028110

SYN端口扫描

use auxiliary/scanner/portscan/syn

image-20210802221347177

通过wireshark抓包可以看到,底层是通过发送SYN数据包去建立三次握手,通过回应的数据包来判断端口是否打开

image-20210802221729412

TCP端口扫描

use auxiliary/scanner/portscan/tcp

image-20210802222330200

同样使用wireshark抓包查看,发现和SYN扫描原理差不多,区别在于这种扫描会完成三次握手的连接,SYN扫描直接发送一个RST数据包去拒绝连接

image-20210802222420247

xmas扫描

use auxiliary/scanner/portscan/xmas

image-20210802225954520

xmas扫描通过发送fin数据包,根据目标端口是否有回应来判断端口是否打开

image-20210802230451241

web信息扫描

扫描网络目录

use auxiliary/scanner/http/dir_scanner

image-20210802230956967

通过wireshark可以看到底层通过不断发送GET请求去扫描网站

image-20210802231915268

服务器软件扫描

use auxiliary/scanner/http/http_version

image-20210802233707583

原理也特别简单,就是通过获取HTTP响应报文中的内容

image-20210802233958320

XSS漏洞扫描

use auxiliary/scanner/http/trace

image-20210802235942123

原理通过URL注入JS的代码去判断有没有存在XSS漏洞

image-20210802235830041

WebDAV扫描

use auxiliary/scanner/http/webdav_scanner

image-20210803001115174

image-20210803001526840

信息收集

SSH版本收集

use  auxiliary/scanner/ssh/ssh_version

image-20210803004839571

通过发送数据包去查询SSH22端口获取SSH版本信息

image-20210803005047072

Mysql版本收集

use auxiliary/scanner/mysql/mysql_version

image-20210803002145222

通过发送数据包对Mysql的端口3306进行扫描

image-20210803002040174

渗透攻击

Apache DOS攻击

use auxiliary/dos/http/apache_range_dos

image-20210802232605816

通过发送大的数据包对80端口进行攻击

image-20210802232543038

参考文档

Metasploit常用web漏洞扫描模块

Kali linux 2016.2(Rolling)里Metasploit的常用模块