Detection: Linux Java Spawning Shell

REMOVED DETECTION

This detection has been removed from the Splunk Threat Research content library and is no longer maintained or supported.

Reason: Detection has been deprecated in favor of a more broad and generic logic that aims to reduce overhead and increase coverage.

Removed in version: 5.20.0

Replacement: Web or Application Server Spawning a Shell

If you have any questions or concerns, please reach out to us at research@splunk.com.

Description

The following analytic detects instances where Java, or Tomcat processes spawn a Linux shell, which may indicate exploitation attempts, such as those related to CVE-2021-44228 (Log4Shell). This detection leverages Endpoint Detection and Response (EDR) telemetry, focusing on process names and parent-child process relationships. This activity is significant as it can signify a compromised Java application, potentially leading to unauthorized shell access. If confirmed malicious, attackers could execute arbitrary commands, escalate privileges, or maintain persistent access, posing a severe threat to the environment.

 1
 2| tstats `security_content_summariesonly` 
 3  count min(_time) as firstTime 
 4        max(_time) as lastTime 
 5
 6from datamodel=Endpoint.Processes where 
 7
 8Processes.parent_process_name IN ("java", "tomcat")
 9`linux_shells` 
10
11by Processes.action Processes.dest Processes.original_file_name Processes.parent_process
12   Processes.parent_process_exec Processes.parent_process_guid Processes.parent_process_id
13   Processes.parent_process_name Processes.parent_process_path Processes.process Processes.process_exec 
14   Processes.process_guid Processes.process_hash Processes.process_id Processes.process_integrity_level 
15   Processes.process_name Processes.process_path Processes.user Processes.user_id Processes.vendor_product
16
17
18| `drop_dm_object_name(Processes)` 
19
20| `security_content_ctime(firstTime)` 
21
22| `security_content_ctime(lastTime)`
23
24| `linux_java_spawning_shell_filter`

Data Source

Name Platform Sourcetype Source
Sysmon for Linux EventID 1 Linux icon Linux 'sysmon:linux' 'Syslog:Linux-Sysmon/Operational'

Macros Used

Name Value
security_content_summariesonly summariesonly=summariesonly_config allow_old_summaries=oldsummaries_config fillnull_value=fillnull_config``
linux_java_spawning_shell_filter ``
linux_java_spawning_shell_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

- MITRE ATT&CK
+ Kill Chain Phases
+ NIST
+ CIS
- Threat Actors
ID Technique Tactic
T1133 External Remote Services Initial Access
T1190 Exploit Public-Facing Application Persistence

CVE

Default Configuration

This detection is configured by default in Splunk Enterprise Security to run with the following settings:

Setting Value
Disabled true
Cron Schedule N/A
Earliest Time N/A
Latest Time N/A
Schedule Window N/A
Creates Finding (Notable) No
Creates Intermediate Finding (Risk Event) No
TTP detections generate a Finding (Notable) and may generate Intermediate Findings (Risk Events) for associated entities.

Implementation

The detection is based on data that originates from Endpoint Detection and Response (EDR) agents. These agents are designed to provide security-related telemetry from the endpoints where the agent is installed. To implement this search, you must ingest logs that contain the process GUID, process name, and parent process. Additionally, you must ingest complete command-line executions. These logs must be processed using the appropriate Splunk Technology Add-ons that are specific to the EDR product. The logs must also be mapped to the Processes node of the Endpoint data model. Use the Splunk Common Information Model (CIM) to normalize the field names and speed up the data modeling process.

Known False Positives

Filtering may be required on internal developer build systems or classify assets as web facing and restrict the analytic based on asset type.

Associated Analytic Story

References

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Not Applicable N/A N/A N/A
Unit Not Applicable N/A N/A N/A
Integration Not Applicable N/A N/A N/A

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range


Source: GitHub |

Version: 10