🇰🇷 한글 설명
Apache Tomcat의 AJP 커넥터가 기본적으로 모든 IP에서 접속 가능하도록 설정되어 있어 발생하는 취약점입니다. 공격자는 이를 통해 웹 애플리케이션 내 임의 파일을 읽거나 파일을 JSP로 실행하여 원격 코드 실행(RCE)을 수행할 수 있습니다.
💡 쉬운 설명
서버의 뒷문 역할을 하는 통로(AJP)가 아무나 들어올 수 있게 열려 있어 발생하는 문제입니다. 해커가 이 통로를 통해 서버에 몰래 명령을 내리거나 중요한 파일을 훔쳐갈 수 있습니다.
🇺🇸 원문 (English)
When using the Apache JServ Protocol (AJP), care must be taken when trusting incoming connections to Apache Tomcat. Tomcat treats AJP connections as having higher trust than, for example, a similar HTTP connection. If such connections are available to an attacker, they can be exploited in ways that may be surprising. In Apache Tomcat 9.0.0.M1 to 9.0.0.30, 8.5.0 to 8.5.50 and 7.0.0 to 7.0.99, Tomcat shipped with an AJP Connector enabled by default that listened on all configured IP addresses. It was expected (and recommended in the security guide) that this Connector would be disabled if not required. This vulnerability report identified a mechanism that allowed: - returning arbitrary files from anywhere in the web application - processing any file in the web application as a JSP Further, if the web application allowed file upload and stored those files within the web application (or the attacker was able to control the content of the web application by some other means) then this, along with the ability to process a file as a JSP, made remote code execution possible. It is important to note that mitigation is only required if an AJP port is accessible to untrusted users. Users wishing to take a defence-in-depth approach and block the vector that permits returning arbitrary files and execution as JSP may upgrade to Apache Tomcat 9.0.31, 8.5.51 or 7.0.100 or later. A number of changes were made to the default AJP Connector configuration in 9.0.31 to harden the default configuration. It is likely that users upgrading to 9.0.31, 8.5.51 or 7.0.100 or later will need to make small changes to their configurations.
📍 영향받는 시스템
Apache Tomcat 9.0.0.M1-9.0.0.30, 8.5.0-8.5.50, 7.0.0-7.0.99
⚔️ 공격 벡터
신뢰할 수 없는 네트워크에서 AJP 포트(기본 8009)로 특수하게 조작된 요청을 전송
🛡️ 대응 방법
Apache Tomcat을 9.0.31, 8.5.51, 7.0.100 이상 버전으로 업그레이드하거나 사용하지 않는 AJP 커넥터를 비활성화
🔧 검증 코드
8009 포트가 LISTEN 상태로 외부 접근이 가능한지 확인하여 취약한 AJP 커넥터 활성화 여부를 판단합니다.