Detectionhightest

Shell Invocation via Env Command - Linux

Detects the use of the env command to invoke a shell. This may indicate an attempt to bypass restricted environments, escalate privileges, or execute arbitrary commands.

Open in Detection LabConvert ruleBuild Package
Li Ling, Andy Parkidomo, Robert Rakowski, Blake Hartstein (Bloomberg L.P.)Created 2024-09-02Updated 2026-01-08bed978f8-7f3a-432b-82c5-9286a9b3031alinux
Log Source
LinuxProcess Creation
ProductLinux← raw: linux
CategoryProcess Creation← raw: process_creation

Events generated when a new process is spawned on the system. Covers command-line arguments, parent/child relationships, and process metadata.

Detection Logic
Detection Logic1 selector
detection:
    selection:
        Image|endswith: '/env'
        CommandLine|contains:
            - '/bin/bash'
            - '/bin/dash'
            - '/bin/fish'
            - '/bin/sh'
            - '/bin/zsh'
    condition: selection
False Positives

Github operations such as ghe-backup

MITRE ATT&CK
Rule Metadata
Rule ID
bed978f8-7f3a-432b-82c5-9286a9b3031a
Status
test
Level
high
Type
Detection
Created
2024-09-02
Modified
2026-01-08
Path
rules/linux/process_creation/proc_creation_lnx_env_shell_invocation.yml
Raw Tags
attack.executionattack.t1059.004
View on GitHub