1200KM / sigma-rule
Indirect Command Execution From Script File Via Bash.EXE — Sigma Rule
Sigma rule 2d22a514-e024-4428-9dba-41505bd63a5b. Indirect Command Execution From Script File Via Bash.EXE — Sigma Rule. Detects execution of Microsoft bash launcher without any flags to execute the content of a bash script directly. This can be used to potentially bypass defenses and execute Linux or Windows-based binaries directly via bash.
Rule metadata and linked tags
Author: Nasreddine Bencherchali (Nextron Systems). Source status: test; severity: medium. Source dates: 2023-08-15 / not supplied.
{
"category": "process_creation",
"product": "windows"
}Pinned original Sigma rule · Detection Rule License 1.1
Source SHA-256: 4f3d42a34cc5268abb329f42cbc4b85c3270d99558b071d9e107b54980c1628e
Detection logic
Original source YAML. Source-tag agreement is not proof of complete semantic coverage. This rule has not been compiled for a SIEM backend or validated against live telemetry here.
title: Indirect Command Execution From Script File Via Bash.EXE
id: 2d22a514-e024-4428-9dba-41505bd63a5b
related:
- id: 5edc2273-c26f-406c-83f3-f4d948e740dd
type: similar
status: test
description: |
Detects execution of Microsoft bash launcher without any flags to execute the content of a bash script directly.
This can be used to potentially bypass defenses and execute Linux or Windows-based binaries directly via bash.
references:
- https://lolbas-project.github.io/lolbas/Binaries/Bash/
- https://linux.die.net/man/1/bash
- Internal Research
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-08-15
tags:
- attack.stealth
- attack.t1202
logsource:
category: process_creation
product: windows
detection:
selection:
- Image|endswith:
- ':\Windows\System32\bash.exe'
- ':\Windows\SysWOW64\bash.exe'
- OriginalFileName: 'Bash.exe'
filter_main_cli_flag:
CommandLine|contains:
# Note: we're not interested in flags being passed first
- 'bash.exe -'
- 'bash -'
filter_main_no_cli:
CommandLine: null
filter_main_empty:
CommandLine: ''
filter_main_no_flag:
CommandLine:
- 'bash.exe'
- 'bash'
condition: selection and not 1 of filter_main_*
falsepositives:
- Unknown
level: medium
False positives
- Unknown
Source references
- https://lolbas-project.github.io/lolbas/Binaries/Bash/
- https://linux.die.net/man/1/bash
- Internal Research (source note; no public URL supplied)
Connected ecosystem references
Exact source-tagged techniques
Telemetry review
Read the original logsource above, then inspect the linked detection workspaces for technique-level sensor context. No per-rule telemetry equivalence is inferred.
Pinned research references. No browser attack runner, live simulation result or validated detector is asserted. Source mappings and validation limits are preserved. ATT&CK / Atomic provenance · Detection provenance.