Detectionmediumtest
Linux Base64 Encoded Shebang In CLI
Detects the presence of a base64 version of the shebang in the commandline, which could indicate a malicious payload about to be decoded
Convert In Phoenix Studio
Open this Sigma rule in the converter with the YAML preloaded and ready for backend selection.
Launch
Nasreddine Bencherchali (Nextron Systems)Created Thu Sep 15fe2f9663-41cb-47e2-b954-8a228f3b9dfflinux
Log Source
LinuxProcess Creation
ProductLinux← raw: linux
CategoryProcess Creation← raw: process_creation
Events generated when a new process is spawned on the system. Covers command-line arguments, parent/child relationships, and process metadata.
Detection Logic
Detection Logic1 selector
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
Legitimate administration activities
MITRE ATT&CK
Rule Metadata
Rule ID
fe2f9663-41cb-47e2-b954-8a228f3b9dff
Status
test
Level
medium
Type
Detection
Created
Thu Sep 15
Path
rules/linux/process_creation/proc_creation_lnx_base64_shebang_cli.yml
Raw Tags
attack.defense-evasionattack.t1140