Sigma rule: Indirect Command Execution From Script File Via Bash.EXE
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-358a01eba469, updated 2023-08-15T00:00:00.000Z.
Rule
- Title
- Indirect Command Execution From Script File Via Bash.EXE
- Status
- test
- Level
- medium
- Author
- Nasreddine Bencherchali (Nextron Systems)
- Date
- 2023-08-15
- File
- rules/windows/process_creation/proc_creation_win_bash_file_execution.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
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.
Log source
- product
- windows
- category
- process_creation
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_*False positives (as the rule lists them)
- Unknown
Tags
- attack.stealth
- attack.t1202
MITRE ATT&CK ids this rule names
Related rules
References
- https://lolbas-project.github.io/lolbas/Binaries/Bash/
- https://linux.die.net/man/1/bash
- Internal Research
Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_bash_file_execution.yml
Sources and licences
SigmaHQ
"Indirect Command Execution From Script File Via Bash.EXE" by Nasreddine Bencherchali (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_bash_file_execution.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: Indirect Command Execution From Script File Via Bash.EXE",
entity page, dataset version ref-358a01eba469, updated 2023-08-15T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/2d22a514-e024-4428-9dba-41505bd63a5b (accessed 2026-11-03).
Underlying source: SigmaHQ rule 2d22a514-e024-4428-9dba-41505bd63a5b, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.
Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.