{"id":"b6b49cd1-34d6-4ead-b1bf-176e9edba9a4","title":"Potential PowerShell Obfuscation Via Reversed Commands","description":"Detects the presence of reversed PowerShell commands in the CommandLine. This is often used as a method of obfuscation by attackers","author":"Teymur Kheirkhabarov (idea), Vasiliy Burov (rule), oscd.community, Tim Shelton","status":"test","level":"high","date":"2020-10-11","modified":"2023-05-31","tags":["attack.stealth","attack.t1027","attack.execution","attack.t1059.001"],"technique_ids":["T1027","T1059.001"],"logsource":{"category":"process_creation","product":"windows"},"falsepositives":["Unlikely"],"references":["https://2019.offzone.moscow/ru/report/hunting-for-powershell-abuses/","https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse?slide=66"],"source_path":"rules/windows/process_creation/proc_creation_win_powershell_cmdline_reversed_strings.yml","source_sha256":"818ee3163046778cad6f1cbab391361d9c4bdefbfd514db08896b614e2f01794","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/process_creation/proc_creation_win_powershell_cmdline_reversed_strings.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Potential PowerShell Obfuscation Via Reversed Commands\nid: b6b49cd1-34d6-4ead-b1bf-176e9edba9a4\nstatus: test\ndescription: Detects the presence of reversed PowerShell commands in the CommandLine. This is often used as a method of obfuscation by attackers\nreferences:\n    - https://2019.offzone.moscow/ru/report/hunting-for-powershell-abuses/\n    - https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse?slide=66\nauthor: Teymur Kheirkhabarov (idea), Vasiliy Burov (rule), oscd.community, Tim Shelton\ndate: 2020-10-11\nmodified: 2023-05-31\ntags:\n    - attack.stealth\n    - attack.t1027\n    - attack.execution\n    - attack.t1059.001\nlogsource:\n    category: process_creation\n    product: windows\ndetection:\n    selection_img:\n        - Image|endswith:\n              - '\\powershell.exe'\n              - '\\pwsh.exe'\n        - OriginalFileName:\n              - 'PowerShell.EXE'\n              - 'pwsh.dll'\n    selection_cli:\n        CommandLine|contains:\n            - 'hctac'\n            - 'kaerb'\n            - 'dnammoc'\n            - 'ekovn' # Also covers 'ekovni'\n            - 'eliFd'\n            - 'rahc'\n            - 'etirw'\n            - 'golon'\n            - 'tninon'\n            - 'eddih'\n            - 'tpircS'\n            - 'ssecorp'\n            - 'llehsrewop'\n            - 'esnopser'\n            - 'daolnwod'\n            - 'tneilCbeW'\n            - 'tneilc'\n            - 'ptth'\n            - 'elifotevas'\n            - '46esab'\n            - 'htaPpmeTteG'\n            - 'tcejbO'\n            - 'maerts'\n            - 'hcaerof'\n            - 'retupmoc'\n    filter_main_encoded_keyword:\n        # We exclude usage of encoded commands as they might generate FPs as shown here:\n        #   https://github.com/SigmaHQ/sigma/pull/2720\n        #   https://github.com/SigmaHQ/sigma/issues/4270\n        CommandLine|contains:\n            - ' -EncodedCommand '\n            - ' -enc '\n    condition: all of selection_* and not 1 of filter_main_*\nfalsepositives:\n    - Unlikely\nlevel: high\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1027","id":"T1027","name":"Obfuscated Files or Information","page":"techniques/enterprise/T1027/"},{"key":"enterprise/T1059.001","id":"T1059.001","name":"PowerShell","page":"techniques/enterprise/T1059.001/"}],"data_path":"data/detection-rules/b6b49cd1-34d6-4ead-b1bf-176e9edba9a4.json","kind":"sigma"}
