{"id":"2d22a514-e024-4428-9dba-41505bd63a5b","title":"Indirect Command Execution From Script File Via Bash.EXE","description":"Detects execution of Microsoft bash launcher without any flags to execute the content of a bash script directly.\nThis can be used to potentially bypass defenses and execute Linux or Windows-based binaries directly via bash.\n","author":"Nasreddine Bencherchali (Nextron Systems)","status":"test","level":"medium","date":"2023-08-15","modified":"","tags":["attack.stealth","attack.t1202"],"technique_ids":["T1202"],"logsource":{"category":"process_creation","product":"windows"},"falsepositives":["Unknown"],"references":["https://lolbas-project.github.io/lolbas/Binaries/Bash/","https://linux.die.net/man/1/bash","Internal Research"],"source_path":"rules/windows/process_creation/proc_creation_win_bash_file_execution.yml","source_sha256":"4f3d42a34cc5268abb329f42cbc4b85c3270d99558b071d9e107b54980c1628e","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/process_creation/proc_creation_win_bash_file_execution.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Indirect Command Execution From Script File Via Bash.EXE\nid: 2d22a514-e024-4428-9dba-41505bd63a5b\nrelated:\n    - id: 5edc2273-c26f-406c-83f3-f4d948e740dd\n      type: similar\nstatus: test\ndescription: |\n    Detects execution of Microsoft bash launcher without any flags to execute the content of a bash script directly.\n    This can be used to potentially bypass defenses and execute Linux or Windows-based binaries directly via bash.\nreferences:\n    - https://lolbas-project.github.io/lolbas/Binaries/Bash/\n    - https://linux.die.net/man/1/bash\n    - Internal Research\nauthor: Nasreddine Bencherchali (Nextron Systems)\ndate: 2023-08-15\ntags:\n    - attack.stealth\n    - attack.t1202\nlogsource:\n    category: process_creation\n    product: windows\ndetection:\n    selection:\n        - Image|endswith:\n              - ':\\Windows\\System32\\bash.exe'\n              - ':\\Windows\\SysWOW64\\bash.exe'\n        - OriginalFileName: 'Bash.exe'\n    filter_main_cli_flag:\n        CommandLine|contains:\n            # Note: we're not interested in flags being passed first\n            - 'bash.exe -'\n            - 'bash -'\n    filter_main_no_cli:\n        CommandLine: null\n    filter_main_empty:\n        CommandLine: ''\n    filter_main_no_flag:\n        CommandLine:\n            - 'bash.exe'\n            - 'bash'\n    condition: selection and not 1 of filter_main_*\nfalsepositives:\n    - Unknown\nlevel: medium\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1202","id":"T1202","name":"Indirect Command Execution","page":"techniques/enterprise/T1202/"}],"data_path":"data/detection-rules/2d22a514-e024-4428-9dba-41505bd63a5b.json","kind":"sigma"}
