VORANT. Threat Intelligence Research Create a free account

Ghostcat flaw in Apache Tomcat AJP exploited

Published Vorant ratinghigh vulnerability TechnologyGovernment (National)

Vorant's rating weighs the evidence in the report: confirmed exploitation, victims claimed, CVSS and EPSS, and how many sources agree. It rates the report, not your assets.

A file-inclusion vulnerability in Apache Tomcat's AJP protocol has public exploit code and can lead to arbitrary file read or remote code execution.

Sourceipa.go.jp — open the original

What to check

Applies to
The 1 CVE named below. Whether you run an affected version is not assessed: check the versions the source lists.
Exploitation
CISA lists CVE-2020-1938 as exploited in the wild.

The Information-technology Promotion Agency (IPA) of Japan issued an alert regarding a vulnerability in Apache Tomcat, the servlet container developed under the Apache Software Foundation's Jakarta project. The flaw, related to how Tomcat processes AJP (Apache JServ Protocol) requests, allows a malicious actor to send crafted AJP requests to read arbitrary files located within the web application's root directory, including sensitive configuration files and source code.

In environments where the affected web application permits file upload or file storage functionality, this file-read primitive can be escalated by an attacker to achieve remote code execution. IPA notes that proof-of-concept exploit code for this vulnerability has already been publicly disclosed, increasing the likelihood of widespread exploitation attempts. Organizations running affected Tomcat versions are urged to apply vendor-supplied patches immediately, with version-specific remediation guidance available through IPA's security center.

This issue corresponds to what is publicly known as the Ghostcat vulnerability (CVE-2020-1938), affecting the Tomcat AJP connector. Given the widespread deployment of Apache Tomcat across enterprise and government web infrastructure, and the availability of public exploit code at the time of disclosure, prompt patching was strongly advised.

Mentioned in this report

Vulnerabilities CVE-2020-1938KEV

Detection guidance

Suspicious External Connection to Tomcat AJP Connector Port (Possible Ghostcat CVE-2020-1938 Exploitation)

ATT&CK T1190 · status experimental · needs windows network_connection logs · generated from the report, not run against telemetry

A behavioural hunt for the technique in general, not a signature for the CVEs this report names.

Detects network connections to the Tomcat AJP connector port (8009) originating from remote/non-loopback hosts, which is unusual since AJP is intended for internal reverse-proxy communication and its exposure enables Ghostcat file-read/RCE exploitation. Auto-generated starting point — validate and tune in your environment before deploying. IOC matches can false-positive on shared infrastructure and decay as adversary infrastructure rotates.

title: Suspicious External Connection to Tomcat AJP Connector Port
logsource:
  category: network_connection
  product: windows
detection:
  selection:
    DestinationPort: 8009
  filter_local:
    DestinationIp|startswith:
    - '127.'
    - '10.'
    - 172.16.
    - 172.17.
    - 172.18.
    - 172.19.
    - 172.20.
    - 172.21.
    - 172.22.
    - 172.23.
    - 172.24.
    - 172.25.
    - 172.26.
    - 172.27.
    - 172.28.
    - 172.29.
    - 172.30.
    - 172.31.
    - 192.168.
  condition: selection and not filter_local
falsepositives:
- Legitimate internal reverse proxy (e.g. mod_jk, mod_proxy_ajp) connecting to Tomcat
  over AJP from within the trusted network segment
- Load balancer health checks configured to use the AJP port internally
level: medium
tags:
- attack.t1190
- attack.initial-access
id: 8687f994-2059-5fcf-a3c1-f79801f9384b
status: experimental
author: Vorant

Tomcat Java Process Spawning Command Shell (Possible Ghostcat Post-Exploitation)

ATT&CK T1005 · status experimental · needs windows process_creation logs · generated from the report, not run against telemetry

A behavioural hunt for the technique in general, not a signature for the CVEs this report names.

Detects a Tomcat/Catalina Java process spawning a command interpreter or scripting engine, consistent with post-exploitation activity after leveraging the Ghostcat AJP file-read primitive (CVE-2020-1938) combined with file-upload functionality to achieve remote code execution and access local files. Auto-generated starting point — validate and tune in your environment before deploying. IOC matches can false-positive on shared infrastructure and decay as adversary infrastructure rotates.

title: Tomcat Process Spawning Command Shell
logsource:
  category: process_creation
  product: windows
detection:
  selection_parent:
    ParentImage|endswith:
    - \java.exe
    - \javaw.exe
    ParentCommandLine|contains:
    - catalina
    - Tomcat
  selection_child:
    Image|endswith:
    - \cmd.exe
    - \powershell.exe
    - \wscript.exe
    - \cscript.exe
    - \bash.exe
    - \sh.exe
  condition: selection_parent and selection_child
falsepositives:
- Administrative scripts intentionally invoked by Tomcat management scripts or deployment
  automation
- Custom Tomcat servlets that legitimately shell out to OS utilities for reporting
  or maintenance tasks
level: high
tags:
- attack.t1005
- attack.execution
- attack.t1190
id: 49d009e2-bbcc-53bf-818a-a7d5d620e6c4
status: experimental
author: Vorant

Behavioural rules are generated from public reporting — validate in your environment before deploying.

Source reporting: https://www.ipa.go.jp/archive/security/security-alert/2019/alert20200225.html

Free public brief. The detections with Splunk SPL already written (plus Elastic and KQL where they apply) are in the app with a free account, no card. Slack alerts on the vendors you run come with the paid plans, and a new account gets three days of them.

What this brief leaves out

This page is the free tier: the write-up, the severity, the names. In the app the same report carries its detections (Splunk SPL already written, plus Elastic and Microsoft KQL where they apply) and live profiles of the CVEs it names. The paid plans add the security research and news reporting the free tier leaves out.

It sits in a corpus of 16,436 reports from 149 sources, 661 of them written in the last seven days, and it grows through the day.

A new account starts with three days of all of it, no card, then keeps the government and CERT reporting free. Slack alerts are a paid-plan feature: name the vendors you run and Slack hears about the reports that touch them, not the rest of the week's. Nothing is charged unless you subscribe.

Create a free account   What it costs