{"id":"bed978f8-7f3a-432b-82c5-9286a9b3031a","title":"Shell Invocation via Env Command - Linux","description":"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.\n","author":"Li Ling, Andy Parkidomo, Robert Rakowski, Blake Hartstein (Bloomberg L.P.)","status":"test","level":"high","date":"2024-09-02","modified":"2026-01-08","tags":["attack.execution","attack.t1059.004"],"technique_ids":["T1059.004"],"logsource":{"category":"process_creation","product":"linux"},"falsepositives":["Github operations such as ghe-backup"],"references":["https://gtfobins.github.io/gtfobins/env/#shell","https://www.elastic.co/guide/en/security/current/linux-restricted-shell-breakout-via-linux-binary-s.html"],"source_path":"rules/linux/process_creation/proc_creation_lnx_env_shell_invocation.yml","source_sha256":"180ca9f21e2a573cb944b32c60414c70f8fb1f003dafabbb40b60bc1e165670c","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/linux/process_creation/proc_creation_lnx_env_shell_invocation.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Shell Invocation via Env Command - Linux\nid: bed978f8-7f3a-432b-82c5-9286a9b3031a\nstatus: test\ndescription: |\n    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.\nreferences:\n    - https://gtfobins.github.io/gtfobins/env/#shell\n    - https://www.elastic.co/guide/en/security/current/linux-restricted-shell-breakout-via-linux-binary-s.html\nauthor: Li Ling, Andy Parkidomo, Robert Rakowski, Blake Hartstein (Bloomberg L.P.)\ndate: 2024-09-02\nmodified: 2026-01-08\ntags:\n    - attack.execution\n    - attack.t1059.004\nlogsource:\n    category: process_creation\n    product: linux\ndetection:\n    selection:\n        Image|endswith: '/env'\n        CommandLine|contains:\n            - '/bin/bash'\n            - '/bin/dash'\n            - '/bin/fish'\n            - '/bin/sh'\n            - '/bin/zsh'\n    condition: selection\nfalsepositives:\n    - Github operations such as ghe-backup\nlevel: high\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1059.004","id":"T1059.004","name":"Unix Shell","page":"techniques/enterprise/T1059.004/"}],"data_path":"data/detection-rules/bed978f8-7f3a-432b-82c5-9286a9b3031a.json","kind":"sigma"}
