Skip to content
KitploitKITPLOIT
도구익스플로잇블로그
Log in
제출
도구익스플로잇블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

피드문의개인정보© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
Apache-Tomcat-CVE-2020-9484 — Analysis of CVE-2020-9484 in Apache Tomcat: patch diff review, lab setup with PersistentManager/FileStore, and JDWP debugging to trace the session path traversal to deserialization RCE. | Kitploit
도구/GitHubGitHub/crieheiki/apache-tomcat-cve-2020-9484
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationDebuggersWeb SecurityPapers & ResearchLearning & EducationLabs & Practice
GitHubcrieheiki/apache-tomcat-cve-2020-9484

Apache-Tomcat-CVE-2020-9484

Analysis of CVE-2020-9484 in Apache Tomcat: patch diff review, lab setup with PersistentManager/FileStore, and JDWP debugging to trace the session path traversal to deserialization RCE.

저장소 보기
2026년 12월 4일아직 검토되지 않음

관련 도구

  • nuclei

    빠른 YAML 기반 취약점 스캐너로, 템플릿 기반 탐지 엔진을 통해 웹 애플리케이션, API, 네트워크, DNS, 클라우드 인프라 전반에 걸친 자동화된 보안 테스트를 수행합니다.

  • zaproxy

    자동 취약점 탐지, 수동 침투 테스트, 그리고 프록시 기반 가로채기 엔진을 이용한 API 보안 테스트를 위한 오픈소스 웹 애플리케이션 보안 스캐너입니다.

  • openvas-scanner

    이 저장소에는 Greenbone Community Edition용 스캐너 구성 요소가 포함되어 있습니다.

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

  • 1

    ghostlock-app

    yukonga/ghostlock-app

    # GhostLock 원탭 실행 앱 (CVE-2026-43499)

    750
  • 2

    IMSIcatcher

    28zaaky/imsicatcher

    SMS를 가로채고, 메시지를 주입하며, 모바일 기기를 추적하기 위해 악성 GSM 셀을 배포하는 IMSI Catcher 플랫폼

    739
  • 3

    Callisto

    jetp1ane/callisto

    Ghidra를 통해 실행 파일을 디컴파일하고, Semgrep으로 의사 C 코드를 스캔하며, GPT-3.5-Turbo를 사용하여 결과를 검증해 거짓 양성을 줄이는 자동화된 바이너리 취약점 분석 도구입니다.

    585
  • 4

    opencti

    opencti-platform/opencti

    오픈 사이버 위협 인텔리전스 플랫폼

    550
  • 5

    DFRoot

    a2333c/dfroot

    삼성 Galaxy S25 Ultra(SM-S938B)용 Android 루트 도구로, DirtyFrag CVE-2026-43284와 CVE-2026-43499를 연쇄하여 KernelSU를 통해 부팅 시 자동으로 루트 권한을 획득합니다.

    414
  • 6

    ARTEX

    baarai/artex

    LLM 멀티 에이전트 자율 침투 테스트 플랫폼으로, 플래너/워커 에이전트, 자산 및 탐색 그래프, MITM 트래픽 기록, 취약점 재테스트 기능을 제공합니다.

    409

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유
요청한 언어로 콘텐츠를 사용할 수 없습니다. 영어 버전을 표시합니다.

Apache-Tomcat-CVE-2020-9484

Introduction

CVE-2020-9484 is a security vulnerability belonging to the Insecure Deserialization class, present in Apache Tomcat's session persistence mechanism. This vulnerability can allow an attacker to achieve Remote Code Execution (RCE) under certain conditions.

The affected Apache Tomcat versions include:

  • Apache Tomcat 10.0.0-M1 to 10.0.0-M4
  • Apache Tomcat 9.0.0.M1 to 9.0.34
  • Apache Tomcat 8.5.0 to 8.5.54
  • Apache Tomcat 7.0.0 to 7.0.103

To successfully exploit the vulnerability, the following conditions must be met simultaneously:

  • The attacker is able to control the content and name of a file that exists on the server (for example, through a File Upload feature that is not strictly validated).
  • The server is configured to use PersistentManager in combination with FileStore.
  • PersistentManager is configured with sessionAttributeValueClassNameFilter="null" or a filter loose enough to allow deserialization of attacker-supplied objects.
  • The attacker knows the relative path from the FileStore session storage directory to the file controlled by the attacker.

The root cause of CVE-2020-9484 lies in the fact that FileStore uses the client-controlled Session ID to construct the path to the session file without fully validating the storage directory boundary. When PersistentManager attempts to restore a session that does not exist in memory, an attacker can leverage Path Traversal to cause Tomcat to read and deserialize a malicious file located outside the session-store, thereby leading to RCE if the exploitation conditions are met.

Patch Analysis

The CVE-2020-9484 patch adds a file path validation mechanism in the file(String id) method of the FileStore class.

private File file(String id) throws IOException {
-    if (this.directory == null) {
+    File storageDir = directory();
+    if (storageDir == null) {
         return null;
     }

     String filename = id + FILE_EXT;
-    File file = new File(directory(), filename);
+    File file = new File(storageDir, filename);
+
+    // Check the file is within the storage directory
+    if (!file.getCanonicalPath().startsWith(storageDir.getCanonicalPath())) {
+        log.warn(sm.getString("fileStore.invalid", file.getPath(), id));
+        return null;
+    }

     return file;
}

Before being patched, FileStore.file(String id) used the Session ID directly to construct the path to the session file without checking whether the resulting path still resided within the storage directory. This allowed an attacker to use Path Traversal to access files outside the session-store.

To fix this, the patch adds a comparison of file.getCanonicalPath() with storageDir.getCanonicalPath(). If the file path does not start with the storage directory path, the method logs a warning and returns null.

Thus, the patch aims to prevent the Session ID from being used to reference files located outside the session storage directory.

Environment Setup

To analyze CVE-2020-9484, I built a test environment using Apache Tomcat 9.0.34, a version affected by the vulnerability. The environment was deployed on an Ubuntu Server virtual machine via VirtualBox, while a Windows 11 machine served to send HTTP requests and perform remote debugging with IntelliJ IDEA.

The components used in the test environment include:

ComponentConfiguration
Host OSWindows 11
VirtualizationVirtualBox
Guest OSUbuntu Server
Apache Tomcat9.0.34
JavaEclipse Temurin JDK 8u514
Build ToolApache Ant 1.10.18
DebuggerIntelliJ IDEA
NetworkNAT + Host-only
Target IP192.168.56.103
HTTP Port8080
Debug Port5005

1. Apache Tomcat Configuration

Apache Tomcat 9.0.34 was compiled directly from source code using Apache Ant to support source code analysis and breakpoint setting.

Tomcat is configured with two paths:

  • CATALINA_HOME=/opt/tomcat-lab/runtime/build
  • CATALINA_BASE=/opt/tomcat-lab/instance/cve-2020-9484

To meet the exploitation conditions for CVE-2020-9484, Tomcat is configured to use PersistentManager in combination with FileStore instead of the default session management mechanism.

The session storage directory is set at:

/opt/tomcat-lab/instance/cve-2020-9484/session-store

In addition, I deployed a simple web application named session-lab, accessible at:

http://192.168.56.103:8080/session-lab/

This application supports two functions:

  • action=set: Creates or accesses a session and stores a value in a session attribute.
  • action=read: Accesses an existing session and reads the stored session attribute value.

The application is used to generate HTTP requests for observing the session handling process inside Tomcat.

2. Attacker-Controlled File

Outside Tomcat's session storage directory, I planned to create a separate directory on the Ubuntu Server to hold a file named exploit.session.

For example, the directory structure in the lab is as follows:

/opt/tomcat-lab/
├── runtime/
│   └── build/
├── instance/
│   └── cve-2020-9484/
│       ├── conf/
│       ├── logs/
│       ├── webapps/
│       ├── work/
│       └── session-store/
└── attacker-files/
    └── exploit.session

Where:

  • session-store/: The directory configured in FileStore for storing application sessions.
  • attacker-files/: A separate directory simulating a location where an attacker could potentially control file contents on the system.
  • exploit.session: A file prepared to simulate attacker-controlled data, for researching deserialization behavior.

In this scenario, I assume the attacker already has the ability to place a file with a controlled name and content onto the server's filesystem, and that the file can be read by the Tomcat process. The process of uploading or writing the file to the server is outside the scope of the test.

Unlike the session files normally stored by Tomcat, exploit.session is placed outside the session-store directory. The purpose of this arrangement is to test whether a client-supplied Session ID can cause Tomcat to access a file located outside the configured session storage directory.

3. Remote Debugging

To monitor the execution process, Tomcat is started with Java Debug Wire Protocol (JDWP), using port 5005 on the Ubuntu Server.

The Windows machine connects to the debugger through an SSH tunnel, forwarding port 127.0.0.1:5005 on Windows to the JDWP port of the virtual machine.

Then, IntelliJ IDEA is configured with Remote JVM Debug to connect to the running Tomcat process.

With this environment, I can send HTTP requests from Windows to the session-lab application, while using breakpoints in IntelliJ IDEA to observe how Tomcat processes the Session ID and interacts with session files on the filesystem.

In particular, the separately placed exploit.session file serves the process of examining and identifying the root cause of CVE-2020-9484 in the Debugging & Root Cause Analysis section.

Understanding Session Persistence

CoyoteAdapter is the intermediary component between the HTTP protocol handling layer (Coyote) and the Servlet Container layer (Catalina) of Apache Tomcat. This class is responsible for preparing the HTTP request before it is passed into the Servlet Container's processing.

During request processing, the postParseRequest() method is responsible for determining the Session ID supplied by the client through the configured session tracking mechanisms, such as URL, Cookie, or SSL.

After the Session ID is extracted, this value is stored in the requestedSessionId attribute of the Request object. However, this does not mean that the corresponding session already exists or is valid.

When the application requests access to a session, Tomcat uses the doGetSession(boolean create) method in the Request class to look up or create a session.

도구 다운로드