🇰🇷 한글 설명
Red Hat Enterprise Linux 5~7의 Tomcat 패키지에서 /etc/sysconfig/tomcat과 /etc/tomcat/tomcat.conf 파일의 파일 권한이 과도하게 허용적으로 설정되어 있습니다. tomcat 그룹의 로컬 사용자가 이 파일들을 수정하여 시스템 권한을 상승시킬 수 있습니다.
💡 쉬운 설명
Tomcat의 설정 파일들이 너무 느슨한 권한으로 설정되어 있어서, tomcat 그룹 사용자가 이 파일을 수정할 수 있습니다. 그러면 그 사용자가 시스템 관리자처럼 동작하게 됩니다.
🇺🇸 원문 (English)
The Tomcat package on Red Hat Enterprise Linux (RHEL) 5 through 7, JBoss Web Server 3.0, and JBoss EWS 2 uses weak permissions for (1) /etc/sysconfig/tomcat and (2) /etc/tomcat/tomcat.conf, which allows local users to gain privileges by leveraging membership in the tomcat group.
📍 영향받는 시스템
RHEL 5-7, JBoss Web Server 3.0, JBoss EWS 2의 Tomcat 패키지
⚔️ 공격 벡터
로컬 사용자가 tomcat 그룹에 속할 때, /etc/sysconfig/tomcat 또는 /etc/tomcat/tomcat.conf 파일을 수정하여 권한 상승 달성
🛡️ 대응 방법
설정 파일의 권한을 600 또는 640으로 변경 (chmod 640 /etc/sysconfig/tomcat /etc/tomcat/tomcat.conf), 소유자를 root 또는 tomcat으로 설정
🔧 검증 코드
결과의 권한이 -rw-r----- (640) 또는 -rw------- (600)이면 안전함. -rw-r--r-- (644) 이상의 권한이 있으면 취약함
ls -l /etc/sysconfig/tomcat /etc/tomcat/tomcat.conf 2>/dev/null | awk '{print $1, $9}'