Rapid7 Vulnerability & Exploit Database

Zimbra Collaboration Autodiscover Servlet XXE and ProxyServlet SSRF

Back to Search

Zimbra Collaboration Autodiscover Servlet XXE and ProxyServlet SSRF

Disclosed
03/13/2019
Created
04/22/2019

Description

This module exploits an XML external entity vulnerability and a server side request forgery to get unauthenticated code execution on Zimbra Collaboration Suite. The XML external entity vulnerability in the Autodiscover Servlet is used to read a Zimbra configuration file that contains an LDAP password for the 'zimbra' account. The zimbra credentials are then used to get a user authentication cookie with an AuthRequest message. Using the user cookie, a server side request forgery in the Proxy Servlet is used to proxy an AuthRequest with the 'zimbra' credentials to the admin port to retrieve an admin cookie. After gaining an admin cookie the Client Upload servlet is used to upload a JSP webshell that can be triggered from the web server to get command execution on the host. The issues reportedly affect Zimbra Collaboration Suite v8.5 to v8.7.11. This module was tested with Zimbra Release 8.7.1.GA.1670.UBUNTU16.64 UBUNTU16_64 FOSS edition.

Author(s)

  • An Trinh
  • Khanh Viet Pham
  • Jacob Robles

Platform

Linux

Architectures

java

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/linux/http/zimbra_xxe_rce
msf exploit(zimbra_xxe_rce) > show targets
    ...targets...
msf exploit(zimbra_xxe_rce) > set TARGET < target-id >
msf exploit(zimbra_xxe_rce) > show options
    ...show and set options...
msf exploit(zimbra_xxe_rce) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;