
Zimbra CVE-2024-45519 실제 수정 - 공식 패치는 불완전함
Zimbra CVE-2024-45519 실제 수정 - 공식 패치는 불완전합니다
CVE-2024-45519는 Zimbra Collaboration Suite의 치명적인 RCE 취약점(CVSS 9.8)입니다. 많은 관리자가 공식 패치를 적용한 후에도 보호되지 않는다고 생각합니다. 이 문서는 실제 상황을 명확히 설명합니다.
CVE-2024-45519는 포트 10027의 postjournal 서비스를 통해 인증되지 않은 원격 명령 실행을 허용합니다.
침해 대응 중 조사를 통해 다음을 확인할 수 있었습니다:
p46/p47 패치 적용 + postjournal 비활성화로 충분합니다:
zmlocalconfig -e postjournal_enabled=false
zmcontrol restart
이 패치는 postjournal 바이너리의 취약한 popen()을 execvp()로 교체하여,
포트 10027이 열려 있어도 명령 주입을 방지합니다.
포트 10027은 Zimbra 메일 흐름에 필수입니다. 닫으면 메일 전달이 중단됩니다:
# DO NOT DO THIS - it will break your mail server!
# sed -i 's/^\[%%zimbraLocalBindAddress%%\]:10027 inet/#...' master.cf.in
취약점이 패치되었는지 테스트합니다:
printf "EHLO probe.test\r\nMAIL FROM:<[email protected]>\r\nRCPT TO:<x: \$(echo TEST > /opt/zimbra/mailboxd/webapps/zimbra/public/test.txt)>\r\nQUIT\r\n" \
| nc 127.0.0.1 25
# Expected: 555 5.5.4 Unsupported option OR 501 5.1.3 Bad recipient address syntax
# Verify file was NOT created:
ls /opt/zimbra/mailboxd/webapps/zimbra/public/test.txt
# Expected: No such file or directory = PATCHED ✅
# Regenerate PreAuth Key
su - zimbra -c "zmprov generateDomainPreAuthKey -f yourdomain.com"
# Monitor for webshells every 5 minutes
cat > /root/check_webshell.sh << 'EOF'
#!/bin/bash
WEBDIR="/opt/zimbra/mailboxd/webapps/zimbra/public"
ALERT_EMAIL="[email protected]"
LOGFILE="/var/log/webshell_check.log"
if [ -f "$WEBDIR/version.txt" ]; then
echo "$(date) - ALERT: version.txt detected!" >> $LOGFILE
rm -f "$WEBDIR/version.txt"
echo "SECURITY ALERT: version.txt detected on $(hostname)" | \
/opt/zimbra/common/sbin/sendmail -f [email protected] $ALERT_EMAIL
fi
find "$WEBDIR" -maxdepth 1 -name "*.jsp" -newer "$WEBDIR/login.jsp" -type f | while read f; do
echo "$(date) - ALERT: Suspicious JSP: $f" >> $LOGFILE
rm -f "$f"
echo "SECURITY ALERT: Suspicious file $f detected" | \
/opt/zimbra/common/sbin/sendmail -f [email protected] $ALERT_EMAIL
done
EOF
chmod +x /root/check_webshell.sh
echo "*/5 * * * * root /root/check_webshell.sh" > /etc/cron.d/check_webshell
| 버전 | 상태 |
|---|---|
| Zimbra 8.8.15 p46 이전 | 취약 |
| Zimbra 8.8.15 p46/p47 | 패치 완료 ✅ |
| Zimbra 9.0.0 p41 이전 | 취약 |
| Zimbra 10.0.9 이전의 10.x | 취약 |
침해 대응 중 Lionel Sarrazin - CDH Informatique 님이 발견