🇰🇷 한글 설명
Debian과 Ubuntu의 Tomcat 6, 7, 8 패키지 postrm 스크립트에서 Catalina 디렉토리의 setgid 프로그램을 통해 tomcat 사용자가 root 권한을 획득할 수 있는 특권 상승 취약점입니다.
💡 쉬운 설명
Tomcat 계정으로 접근 가능한 설정 폴더에 악의적인 프로그램을 심으면, Tomcat 제거 시 그 프로그램이 관리자 권한으로 실행됩니다. 이를 통해 시스템 전체를 장악할 수 있습니다.
🇺🇸 원문 (English)
The postrm script in the tomcat6 package before 6.0.45+dfsg-1~deb7u3 on Debian wheezy, before 6.0.45+dfsg-1~deb8u1 on Debian jessie, before 6.0.35-1ubuntu3.9 on Ubuntu 12.04 LTS and on Ubuntu 14.04 LTS; the tomcat7 package before 7.0.28-4+deb7u7 on Debian wheezy, before 7.0.56-3+deb8u6 on Debian jessie, before 7.0.52-1ubuntu0.8 on Ubuntu 14.04 LTS, and on Ubuntu 12.04 LTS, 16.04 LTS, and 16.10; and the tomcat8 package before 8.0.14-1+deb8u5 on Debian jessie, before 8.0.32-1ubuntu1.3 on Ubuntu 16.04 LTS, before 8.0.37-1ubuntu0.1 on Ubuntu 16.10, and before 8.0.38-2ubuntu1 on Ubuntu 17.04 might allow local users with access to the tomcat account to gain root privileges via a setgid program in the Catalina directory, as demonstrated by /etc/tomcat8/Catalina/attack.
📍 영향받는 시스템
Tomcat 6 (6.0.45 이전), Tomcat 7 (7.0.56 이전), Tomcat 8 (8.0.38 이전) - Debian wheezy/jessie, Ubuntu 12.04/14.04/16.04/16.10/17.04
⚔️ 공격 벡터
Tomcat 계정 권한으로 /etc/tomcat*/Catalina/ 디렉토리에 setgid 바이너리 배치 후 패키지 제거 시 postrm이 root 권한으로 실행
🛡️ 대응 방법
각 버전을 권장 버전 이상으로 업데이트: Tomcat 6.0.45+dfsg-1~deb7u3, Tomcat 7.0.56-3+deb8u6, Tomcat 8.0.38-2ubuntu1
🔧 검증 코드
설치된 Tomcat 패키지의 버전이 권장 버전보다 낮으면 취약 상태입니다.
dpkg -l | grep -E 'tomcat[678]' | awk '{print $2, $3}'