Metasploit框架有许多辅助模块脚本,可用于执行 DoS 攻击。 这个特定的秘籍演示了如何找到 DoS 模块,确定模块的使用方式,以及如何执行它们。
### 准备
为了使用 Metasploit 执行 DoS 攻击,你需要有一个运行漏洞服务的系统,它易受 Metasploit DoS 辅助模块之一的攻击。 所提供的示例使用 Windows XP 的实例。 有关设置 Windows 系统的更多信息,请参阅本书第一章中的“安装 Windows Server”秘籍。
### 操作步骤
在使用 Metasploit 辅助模块执行 DoS 测试之前,我们需要确定哪些 DoS 模块可用。 相关模块可以通过浏览 Metasploit 目录树来确定:
```
root@KaliLinux:~# cd /usr/share/metasploit-framework/modules/auxiliary/ dos/
root@KaliLinux:/usr/share/metasploit-framework/modules/auxiliary/dos# ls cisco dhcp freebsd hp http mdns ntp pptp samba scada smtp solaris ssl syslog tcp wifi windows wireshark
root@KaliLinux:/usr/share/metasploit-framework/modules/auxiliary/dos# cd windows/
root@KaliLinux:/usr/share/metasploit-framework/modules/auxiliary/dos/ windows# ls appian browser ftp games http llmnr nat rdp smb smtp tftp
root@KaliLinux:/usr/share/metasploit-framework/modules/auxiliary/dos/ windows# cd http
root@KaliLinux:/usr/share/metasploit-framework/modules/auxiliary/dos/ windows/http# ls ms10_065_ii6_asp_dos.rb
pi3web_isapi.rb
```
通过浏览`/ modules / auxiliary / dos`目录,我们可以看到各种类别的 DoS 模块。 在提供的示例中,我们已浏览包含 Windows HTTP 拒绝服务漏洞的目录:
```
root@KaliLinux:/usr/share/metasploit-framework/modules/auxiliary/dos/ windows/http# cat ms10_065_ii6_asp_dos.rb | more
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# web site for more information on licensing and terms of use.
# http://metasploit.com/
##
require 'msf/core'
class Metasploit3 < Msf::Auxiliary
include Msf::Exploit::Remote::Tcp
include Msf::Auxiliary::Dos
def initialize(info = {})
super(update_info(info,
'Name' => 'Microsoft IIS 6.0 ASP Stack Exhaustion Denial of Service',
'Description' => %q{
The vulnerability allows remote unauthenticated attackers to force the IIS server
to become unresponsive until the IIS service is restarted manually by the administrator.
Required is that Active Server Pages are hosted by the IIS and that an ASP script reads
out a Post Form value.
},
'Author' =>
[
'Alligator Security Team',
'Heyder Andrade <heyder[at]alligatorteam.org>',
'Leandro Oliveira <leadro[at]alligatorteam.org>'
],
'License' => MSF_LICENSE,
'References' =>
[
[ 'CVE', '2010-1899' ],
[ 'OSVDB', '67978'],
[ 'MSB', 'MS10-065'],
[ 'EDB', '15167' ]
],
'DisclosureDate' => 'Sep 14 2010'))
```
为了从上到下读取脚本,我们应该对文件使用`cat`命令,然后通过管道输出到`more`工具。 脚本的顶部描述了它所利用的漏洞以及系统必须满足的条件。 我们还可以在 Metasploit 框架控制台中识别潜在的 DoS 漏洞。 要访问它,在终端中键入`msfconsole`:
```
root@KaliLinux:~# msfconsole # cowsay++
____________
< metasploit >
-----------
\ ,__,
\ (oo)____
(__) )\
||--|| *
Large pentest? List, sort, group, tag and search your hosts and services in Metasploit Pro -- type 'go_pro' to launch it now.