← Back to SOC feed Coverage →

Shell Execution via Git - Linux

sigma HIGH SigmaHQ
T1059
imProcessCreate
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at SigmaHQ →
Retrieved: 2026-03-25T02:50:08Z · Confidence: medium

Hunt Hypothesis

Adversaries may execute shell commands via Git to exfiltrate data or establish persistence on Linux systems. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential command and control activities or data theft attempts leveraging Git as a covert channel.

Detection Rule

Sigma (Original)

title: Shell Execution via Git - Linux
id: 47b3bbd4-1bf7-48cc-84ab-995362aaa75a
status: test
description: |
    Detects the use of the "git" utility to execute a shell. Such behavior may be associated with privilege escalation, unauthorized command execution, or to break out from restricted environments.
references:
    - https://gtfobins.github.io/gtfobins/git/#shell
author: Li Ling, Andy Parkidomo, Robert Rakowski, Blake Hartstein (Bloomberg L.P.)
date: 2024-09-02
tags:
    - attack.execution
    - attack.t1059
logsource:
    category: process_creation
    product: linux
detection:
    selection:
        ParentImage|endswith: '/git'
        ParentCommandLine|contains|all:
            - ' -p '
            - 'help'
        CommandLine|contains:
            - 'bash 0<&1'
            - 'dash 0<&1'
            - 'sh 0<&1'
    condition: selection
falsepositives:
    - Unknown
level: high

KQL (Azure Sentinel)

imProcessCreate
| where (ParentProcessName endswith "/git" or ActingProcessName endswith "/git") and (ActingProcessCommandLine contains " -p " and ActingProcessCommandLine contains "help") and (TargetProcessCommandLine contains "bash 0<&1" or TargetProcessCommandLine contains "dash 0<&1" or TargetProcessCommandLine contains "sh 0<&1")

False Positive Guidance

MITRE ATT&CK Context

Original source: https://github.com/SigmaHQ/sigma/blob/master/rules/linux/process_creation/proc_creation_lnx_git_shell_execution.yml