Detection rules › Sigma
Shell Process Spawned by Java.EXE
Detects shell spawned from Java host process, which could be a sign of exploitation (e.g. log4j exploitation)
Known false positives
- Legitimate calls to system binaries
- Company specific internal usage
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Initial Access | No specific technique |
| Persistence | No specific technique |
| Privilege Escalation | No specific technique |
Telemetry coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule body
title: Shell Process Spawned by Java.EXE
id: dff1e1cc-d3fd-47c8-bfc2-aeb878a754c0
related:
- id: 0d34ed8b-1c12-4ff2-828c-16fc860b766d
type: similar
status: test
description: Detects shell spawned from Java host process, which could be a sign of exploitation (e.g. log4j exploitation)
references:
- https://web.archive.org/web/20231230220738/https://www.lunasec.io/docs/blog/log4j-zero-day/
author: Andreas Hunkeler (@Karneades), Nasreddine Bencherchali
date: 2021-12-17
modified: 2024-01-18
tags:
- attack.initial-access
- attack.persistence
- attack.privilege-escalation
logsource:
category: process_creation
product: windows
detection:
selection:
ParentImage|endswith: '\java.exe'
Image|endswith:
- '\bash.exe'
- '\cmd.exe'
- '\powershell.exe'
- '\pwsh.exe'
filter_main_build:
ParentImage|contains: 'build' # excluding CI build agents
CommandLine|contains: 'build' # excluding CI build agents
condition: selection and not 1 of filter_main_*
falsepositives:
- Legitimate calls to system binaries
- Company specific internal usage
level: medium
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_*Stage 1: selection
selection:
ParentImage|endswith: '\java.exe'
Image|endswith:
- '\bash.exe'
- '\cmd.exe'
- '\powershell.exe'
- '\pwsh.exe'
Stage 2: not filter_main_build
filter_main_build:
ParentImage|contains: 'build'
CommandLine|contains: 'build'
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
CommandLine | match | build | excludes:CommandLine field:"CommandLine" value:"build" |
ParentImage | match | build | excludes:ParentImage field:"ParentImage" value:"build" |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Image | ends_with |
| field:"Image" kind:ends_with |
ParentImage | ends_with |
| field:"ParentImage" kind:ends_with value:"\java.exe" |