Detection rules › Elastic

Shell Execution via Java Parent Process

Source
github.com/elastic/protections-artifacts

This rule detects shell executions spawned by Java parent processes in specific user directories, excluding Oracle SYSMAN schema and Enterprise Management Daemon (EMD) related working directories. Such behavior may indicate exploitation attempts or command execution.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
This rule detects shell executions spawned by Java parent processes in specific user directories, excluding Oracle
SYSMAN schema and Enterprise Management Daemon (EMD) related working directories. Such behavior may indicate
exploitation attempts or command execution.
"""
id = "565c5297-16f2-47aa-8537-2982475d30b2"
license = "Elastic License v2"
name = "Shell Execution via Java Parent Process"
os_list = ["linux"]
reference = [
    "https://www.oracle.com/security-alerts/alert-cve-2025-61882.html",
    "https://www.crowdstrike.com/en-us/blog/crowdstrike-identifies-campaign-targeting-oracle-e-business-suite-zero-day-CVE-2025-61882/",
]
version = "1.0.2"

query = '''
process where event.type == "start" and event.action == "exec" and process.parent.name == "java" and
process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and process.args == "-c" and
process.working_directory like~ "/u0?/*" and user.id == 54321 and not (
  process.working_directory like~ ("/u0*/*/sysman/emd", "/u0?/app/oracle/product/*/dbhome_*", "/u0?/app/oracle/product/*/db_*", "/u01/app/oracle/crsdata/*/cvu/cvutrc") or
  process.command_line == "/bin/sh -c /u01/client_1/client/scheduler/execution_agent/bin/jssu" or
  (process.working_directory == "/u01/domains/bi" and process.command_line like "*weblogic.Server*") or
  process.args like ("/tmp/CVU_19_*/exectask.sh*", "java -cp*/u01/MW/bi/modules/oracle.bi.sysman/scripts/../env/stdout_config.properties*") or
  (
    process.parent.executable like "/u01/app/*grid/jdk/bin/java" and
    process.args like ("/bin/rpm*", "/u01/app/grid/bin/*", "/bin/uname -m", "/u01/app/oracle/product/*/bin/*")
  ) or
  (
    process.parent.executable like "/u01/app/oracle/*/jdk/*bin/java" and
    process.args like ("/u01/app/oracle/product/*/bin/*", "/usr/sbin/lpc*", "stty*")
  )
)
'''

min_endpoint_version = "7.15.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[threat.technique.subtechnique]]
id = "T1059.004"
name = "Unix Shell"
reference = "https://attack.mitre.org/techniques/T1059/004/"


[[threat.technique]]
id = "T1203"
name = "Exploitation for Client Execution"
reference = "https://attack.mitre.org/techniques/T1203/"


[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1071"
name = "Application Layer Protocol"
reference = "https://attack.mitre.org/techniques/T1071/"


[threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"

[internal]
min_endpoint_version = "7.15.0"

Stages and Predicates

Stage 1: process

process where event.type == "start" and event.action == "exec" and process.parent.name == "java" and
process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and process.args == "-c" and
process.working_directory like~ "/u0?/*" and user.id == 54321 and not (
  process.working_directory like~ ("/u0*/*/sysman/emd", "/u0?/app/oracle/product/*/dbhome_*", "/u0?/app/oracle/product/*/db_*", "/u01/app/oracle/crsdata/*/cvu/cvutrc") or
  process.command_line == "/bin/sh -c /u01/client_1/client/scheduler/execution_agent/bin/jssu" or
  (process.working_directory == "/u01/domains/bi" and process.command_line like "*weblogic.Server*") or
  process.args like ("/tmp/CVU_19_*/exectask.sh*", "java -cp*/u01/MW/bi/modules/oracle.bi.sysman/scripts/../env/stdout_config.properties*") or
  (
    process.parent.executable like "/u01/app/*grid/jdk/bin/java" and
    process.args like ("/bin/rpm*", "/u01/app/grid/bin/*", "/bin/uname -m", "/u01/app/oracle/product/*/bin/*")
  ) or
  (
    process.parent.executable like "/u01/app/oracle/*/jdk/*bin/java" and
    process.args like ("/u01/app/oracle/product/*/bin/*", "/usr/sbin/lpc*", "stty*")
  )
)

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.argswildcard/bin/rpm*, /u01/app/grid/bin/*, /bin/uname -m, /u01/app/oracle/product/*/bin/*excludes:process.args
process.parent.executablewildcard/u01/app/*grid/jdk/bin/javaexcludes:process.parent.executable field:"process.parent.executable" value:"/u01/app/*grid/jdk/bin/java"
process.argswildcard/u01/app/oracle/product/*/bin/*, /usr/sbin/lpc*, stty*excludes:process.args field:"process.args" value:"/u01/app/oracle/product/*/bin/*" field:"process.args" value:"/usr/sbin/lpc*" field:"process.args" value:"stty*"
process.parent.executablewildcard/u01/app/oracle/*/jdk/*bin/javaexcludes:process.parent.executable field:"process.parent.executable" value:"/u01/app/oracle/*/jdk/*bin/java"
process.command_linematchweblogic.Serverexcludes:process.command_line field:"process.command_line" value:"weblogic.Server"
process.working_directoryeq/u01/domains/biexcludes:process.working_directory field:"process.working_directory" value:"/u01/domains/bi"
process.argswildcard/tmp/CVU_19_*/exectask.sh*, java -cp*/u01/MW/bi/modules/oracle.bi.sysman/scripts/../env/stdout_config.properties*excludes:process.args field:"process.args" value:"/tmp/CVU_19_*/exectask.sh*" field:"process.args" value:"java -cp*/u01/MW/bi/modules/oracle.bi.sysman/scripts/../env/stdout_config.properties*"
process.command_lineeq/bin/sh -c /u01/client_1/client/scheduler/execution_agent/bin/jssuexcludes:process.command_line field:"process.command_line" value:"/bin/sh -c /u01/client_1/client/scheduler/execution_agent/bin/jssu"
process.working_directorywildcard/u0*/*/sysman/emd, /u0?/app/oracle/product/*/dbhome_*, /u0?/app/oracle/product/*/db_*, /u01/app/oracle/crsdata/*/cvu/cvutrcexcludes:process.working_directory

Indicators

These rows show field, operator, and value matches.