首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
phpSlash Account Hijacking
来源:tobozo@adchat.org 作者:tobozo 发布时间:2005-07-22  

phpSlash Account Hijacking (Exploit)

Summary
"phpSlash is a powerful CMS written in PHP that provides easy and flexible means to publish community-based websites. It currently boasts full HTML templates, an OO design, the ability to operate in a hosted environment."

An input validation flaw discovered in phpSlash can be used to gain elevated privileges by hijacking the administrator's account.

Credit:
The information has been provided by tobozo.

Details
Vulnerable Systems:
* phpSlash versions 0.7.1, 0.7.2, and 0.8.X

There is an input validation flaw in Author.class::saveProfile which can lead to gain root privileges by hijacking user account. In function saveProfile, author_id value is retrieved from the wrong source : user info in $ary is not compared to the author_id associated to the running session ...

Vulnerable Code:
<?
/* Code extracted from Author.class */
function saveProfile($ary) {
global $HTTP_COOKIE_VARS;

// ( ... snip ... )

/**********************************
* This sql query is using data from an untrusted source ( $ary ) *
**********************************/

$this->db->query("SELECT author_id
FROM psl_author
WHERE author_id = '".$ary['author_id']."'");

/**********************************
* This condition is not relevant in that context, it is the current *
* author_id (from $this->auth) that should eventually be compared *
**********************************/

if ($this->db->next_record()) {
if ($ary['password'] == "") {
$q = "UPDATE psl_author
SET author_name = '$ary[author_name]',
author_realname = '$ary[author_realname]',
url = '$ary[url]',
email = '$ary[email]',
quote = '$ary[quote]',
author_options = '$serial_opts'
WHERE author_id = '$ary[author_id]'";
// use $this->auth->auth['uid'] instead of untrusted $ary
} else {
$q = "UPDATE psl_author
SET author_name = '$ary[author_name]',
author_realname = '$ary[author_realname]',
url = '$ary[url]',
email = '$ary[email]',
quote = '$ary[quote]',
password = MD5('$ary[author_name]:$ary[password]'),
author_options = '$serial_opts'
WHERE author_id = '$ary[author_id]'";

/******************************/
// use $this->auth->auth['uid'] and $this->auth->auth['uname']
// instead of untrusted $ary
/******************************/
}
}
// ( ... snip ... )
}
?>

A malicious registered user can forge a http request that will overwrite preferences of other author(s) (including author real name, email address, URL, and password). A malicious developer can easily code an automated attack with the help of the self-registration capacity offered by phpSlash and build CMS-based zombie network. In fact any registered user with AuthorSaveProfile perm can overwrite other account's preferences.

Vulnerable site's recognition may vary depending on configuration and version of the package, the ability to match them will depend principally on version identification, this should be subject for a second bulletin uncovering the more generic HTML fingerprinting problem found in the common footer templates.

The point to focus on to identify if your version is vulnerable or not are the default perms assigned to a self-registered user (AuthorProfileSave, id 50).

Note:
Some upgrades (7 to 8) seem not to have this perm set, and therefore are not vulnerable. Some versions with configuration value 'authmode' set to 'log' are less vulnerable to manual or automated attacks.

Fix:
Download the latest package (0.8.1) from the phpSlash project page :
http://sourceforge.net/project/showfiles.php?group_id=10566




 
[推荐] [评论(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
  相关文章
·OpenBB CID SQL Injection
·SlimFTPd <= 3.16 LIST Comma
·GNU Mailutils imap4d Format St
·Stealth Background Process
·Windows Netman Service Local D
·Netquery Command Execution
·Microsoft Color Management Mod
·SlimFTPd RNFR Buffer Overflow
·Greasemonkey Firefox Extension
·FTPshell Server DoS
·MailEnable STATUS Command Buff
·FtpLocate Command Execution
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved