{"id":"fe2f9663-41cb-47e2-b954-8a228f3b9dff","title":"Linux Base64 Encoded Shebang In CLI","description":"Detects the presence of a base64 version of the shebang in the commandline, which could indicate a malicious payload about to be decoded","author":"Nasreddine Bencherchali (Nextron Systems)","status":"test","level":"medium","date":"2022-09-15","modified":"","tags":["attack.stealth","attack.t1140"],"technique_ids":["T1140"],"logsource":{"product":"linux","category":"process_creation"},"falsepositives":["Legitimate administration activities"],"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"],"source_path":"rules/linux/process_creation/proc_creation_lnx_base64_shebang_cli.yml","source_sha256":"d15be8f68f508302af3c81e03407aab24c0558ed145005e12ad5a357439a0db3","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/linux/process_creation/proc_creation_lnx_base64_shebang_cli.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Linux Base64 Encoded Shebang In CLI\nid: fe2f9663-41cb-47e2-b954-8a228f3b9dff\nstatus: test\ndescription: Detects the presence of a base64 version of the shebang in the commandline, which could indicate a malicious payload about to be decoded\nreferences:\n    - https://www.trendmicro.com/pl_pl/research/20/i/the-evolution-of-malicious-shell-scripts.html\n    - https://github.com/carlospolop/PEASS-ng/tree/master/linPEAS\nauthor: Nasreddine Bencherchali (Nextron Systems)\ndate: 2022-09-15\ntags:\n    - attack.stealth\n    - attack.t1140\nlogsource:\n    product: linux\n    category: process_creation\ndetection:\n    selection:\n        CommandLine|contains:\n            - \"IyEvYmluL2Jhc2\" # Note: #!/bin/bash\"\n            - \"IyEvYmluL2Rhc2\" # Note: #!/bin/dash\"\n            - \"IyEvYmluL3pza\" # Note: #!/bin/zsh\"\n            - \"IyEvYmluL2Zpc2\" # Note: #!/bin/fish\n            - \"IyEvYmluL3No\" # Note: # !/bin/sh\"\n    condition: selection\nfalsepositives:\n    - Legitimate administration activities\nlevel: medium\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1140","id":"T1140","name":"Deobfuscate/Decode Files or Information","page":"techniques/enterprise/T1140/"}],"data_path":"data/detection-rules/fe2f9663-41cb-47e2-b954-8a228f3b9dff.json","kind":"sigma"}
