中国网络渗透测试联盟
标题:
Piwigo任意文件泄露和任意文件删除漏洞
[打印本页]
作者:
admin
时间:
2013-3-14 20:15
标题:
Piwigo任意文件泄露和任意文件删除漏洞
Piwigo是用PHP编写的相册脚本。
* O+ W4 R9 _4 Y8 o
- Z% Q; d3 q/ x; S
Piwigo 2.4.6及其他版本没有正确验证install.php脚本的 'dl'参数值,在实现上存在安全漏洞,攻击者可利用这些漏洞查看受影响计算机上的任意文件,删除受影响应用上下文内的任意文件。
" {' y, M; a6 o5 G/ M2 s9 R) |
====================================================================
6 w1 ]* ^' A) n
/install.php:
& t* H! m# X7 ]: t( s8 t& K# n
-------------
7 V3 H9 n+ K. D' e7 s- l3 r
113: if (!empty($_GET['dl']) && file_exists(PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl']))
2 o1 y. F1 v: W0 `4 j& X; N
114: {
2 T: G# Z% t6 ^" J& q# k
115: $filename = PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl'];
4 }$ R6 ?1 a: F
116: header('Cache-Control: no-cache, must-revalidate');
- S$ H$ h" v/ M! t' X! M8 {# a7 I# z
117: header('Pragma: no-cache');
7 D+ ~ j& b/ v
118: header('Content-Disposition: attachment; filename="database.inc.php"');
8 l6 Y, p$ j9 G( A
119: header('Content-Transfer-Encoding: binary');
6 Y8 Z6 i) B, O
120: header('Content-Length: '.filesize($filename));
' `' ~' Q( d% Q4 [- O3 k
121: echo file_get_contents($filename);
/ p$ _$ z0 P* @6 z4 B* D* Y
122: unlink($filename);
( L4 S0 i) X/ V6 O% d1 }& H, R( ~. J
123: exit();
& ?, {, F1 t6 u! x
124: }
$ k4 q, J, {! @* n0 m, f; {
====================================================================
# }) q4 J8 s. {9 f/ [5 c
2 c* S- q4 z O6 h
Tested on: Microsoft Windows 7 Ultimate SP1 (EN)
/ t a0 T& q+ |
Apache 2.4.2 (Win32)
5 \' ?+ d5 ^+ V2 J: [
PHP 5.4.4
& }. l9 [/ E- ^3 a# v
MySQL 5.5.25a
# A! v! k5 T4 y0 p* L5 U
. }1 ]! a t; ?! ~/ v0 Z
Vulnerability discovered by Gjoko 'LiquidWorm' Krstic
' K% r* I. a3 I# G' d: W; J
@zeroscience
& O0 _) m# h! c' @' S c
( q# {5 Q, B& L
Advisory ID: ZSL-2013-5127
( A/ E2 |: D& O8 T; T6 e% R3 o
Advisory URL:
http://www.zeroscience.mk/en/vulnerabilities/ZSL-2013-5127.php
: w }: K: y+ \2 c- F& H6 x( V
Vendor Patch:
http://piwigo.org/bugs/view.php?id=2843
1 f b! ^ P9 I
; r/ P2 @: ` k' N& P
15.02.2013
0 ^' H- Y+ N4 h& T# }1 P$ U
4 Z2 k% a( E& r: x& T9 w
--
! }- g* z* j: W- B: A$ G
http://localhost/piwigo/install.php?dl=../../../../../../lio_passwords.txt
; W3 y( g ^$ d! H: m! v& ]
4 x# W9 y: p; x/ n1 ^2 D* k6 a
欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/)
Powered by Discuz! X3.2