title: Java Process Spawns a Shell or Download/Network Tool on Linux
id: fad8056d-436f-46d9-a89c-d4d78b56e5cd
status: experimental
description: |
    Detects a Java process (an executable whose path ends in /java or /javaw) starting a shell, curl, wget, a netcat variant, python3 or perl on Linux.
    This is post-exploitation behaviour: it is what code running inside a Java process often does next, whatever the first-stage flaw was.
    It does not detect CVE-2026-114938 or any other flaw itself. It misses a renamed java binary, other child programs and payloads that run entirely inside the Java process, and it fires on build servers, installers and applications that shell out by design.
    Needs process creation events with the parent image (Sysmon for Linux event 1, or auditd execve with the parent resolved).
    Tested only on synthetic lab lines, never on a real capture of the flaw; lab run 2026-11-22 with pySigma parsing and the lab's own evaluator, not a SIEM.
references:
    - https://cyray.io/attack-to-detection/t1190-java4shell-openjdk-base64-rce
author: CyRay
date: 2026-11-22
tags:
    - attack.execution
    - attack.t1059.004
logsource:
    category: process_creation
    product: linux
detection:
    selection_parent:
        ParentImage|endswith:
            - '/java'
            - '/javaw'
    selection_child:
        Image|endswith:
            - '/sh'
            - '/bash'
            - '/dash'
            - '/zsh'
            - '/curl'
            - '/wget'
            - '/nc'
            - '/ncat'
            - '/python3'
            - '/perl'
    condition: all of selection_*
falsepositives:
    - Build servers, installers and application servers that start a shell or download tool by design (filter by child command line once a baseline exists)
    - Java applications that call curl or a script for housekeeping
level: medium
