Sigma rule: Linux Base64 Encoded Shebang In CLI
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-ea50d657c678, updated 2022-09-15T00:00:00.000Z.
Rule
- Title
- Linux Base64 Encoded Shebang In CLI
- Status
- test
- Level
- medium
- Author
- Nasreddine Bencherchali (Nextron Systems)
- Date
- 2022-09-15
- File
- rules/linux/process_creation/proc_creation_lnx_base64_shebang_cli.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects the presence of a base64 version of the shebang in the commandline, which could indicate a malicious payload about to be decoded
Log source
- product
- linux
- category
- process_creation
Detection
selection:
CommandLine|contains:
- "IyEvYmluL2Jhc2" # Note: #!/bin/bash"
- "IyEvYmluL2Rhc2" # Note: #!/bin/dash"
- "IyEvYmluL3pza" # Note: #!/bin/zsh"
- "IyEvYmluL2Zpc2" # Note: #!/bin/fish
- "IyEvYmluL3No" # Note: # !/bin/sh"
condition: selectionFalse positives (as the rule lists them)
- Legitimate administration activities
Tags
- attack.stealth
- attack.t1140
MITRE ATT&CK ids this rule names
References
- https://www.trendmicro.com/pl_pl/research/20/i/the-evolution-of-malicious-shell-scripts.html
- https://github.com/carlospolop/PEASS-ng/tree/master/linPEAS
Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/linux/process_creation/proc_creation_lnx_base64_shebang_cli.yml
Sources and licences
SigmaHQ
"Linux Base64 Encoded Shebang In CLI" by Nasreddine Bencherchali (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/linux/process_creation/proc_creation_lnx_base64_shebang_cli.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: Linux Base64 Encoded Shebang In CLI",
entity page, dataset version ref-ea50d657c678, updated 2022-09-15T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/fe2f9663-41cb-47e2-b954-8a228f3b9dff (accessed 2026-11-03).
Underlying source: SigmaHQ rule fe2f9663-41cb-47e2-b954-8a228f3b9dff, 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.