{"id":"ae7fbf8e-f3cb-49fd-8db4-5f3bed522c71","title":"Suspicious PowerShell Invocations - Specific","description":"Detects suspicious PowerShell invocation command parameters","author":"Florian Roth (Nextron Systems), Jonhnathan Ribeiro","status":"test","level":"high","date":"2017-03-05","modified":"2025-02-17","tags":["attack.execution","attack.t1059.001"],"technique_ids":["T1059.001"],"logsource":{"product":"windows","category":"ps_script","definition":"Requirements: Script Block Logging must be enabled"},"falsepositives":["Unknown"],"references":["Internal Research","https://github.com/HackTricks-wiki/hacktricks/blob/e4c7b21b8f36c97c35b7c622732b38a189ce18f7/src/windows-hardening/windows-local-privilege-escalation/privilege-escalation-with-autorun-binaries.md"],"source_path":"rules/windows/powershell/powershell_script/posh_ps_susp_invocation_specific.yml","source_sha256":"b951802ebd02b19c0f41ce8fa26f54ce8b5001db21e064dc44a7c831aa7aca96","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/powershell/powershell_script/posh_ps_susp_invocation_specific.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Suspicious PowerShell Invocations - Specific\nid: ae7fbf8e-f3cb-49fd-8db4-5f3bed522c71\nrelated:\n    - id: fce5f582-cc00-41e1-941a-c6fabf0fdb8c\n      type: obsolete\n    - id: 8ff28fdd-e2fa-4dfa-aeda-ef3d61c62090\n      type: similar\n    - id: 536e2947-3729-478c-9903-745aaffe60d2\n      type: similar\nstatus: test\ndescription: Detects suspicious PowerShell invocation command parameters\nreferences:\n    - Internal Research\n    - https://github.com/HackTricks-wiki/hacktricks/blob/e4c7b21b8f36c97c35b7c622732b38a189ce18f7/src/windows-hardening/windows-local-privilege-escalation/privilege-escalation-with-autorun-binaries.md\nauthor: Florian Roth (Nextron Systems), Jonhnathan Ribeiro\ndate: 2017-03-05\nmodified: 2025-02-17\ntags:\n    - attack.execution\n    - attack.t1059.001\nlogsource:\n    product: windows\n    category: ps_script\n    definition: 'Requirements: Script Block Logging must be enabled'\ndetection:\n    selection_convert_b64:\n        ScriptBlockText|contains|all:\n            - '-nop'\n            - ' -w '\n            - 'hidden'\n            - ' -c '\n            - '[Convert]::FromBase64String'\n    selection_iex_selection:\n        ScriptBlockText|contains|all:\n            - ' -w '\n            - 'hidden'\n            - '-noni'\n            - '-nop'\n            - ' -c '\n            - 'iex'\n            - 'New-Object'\n    selection_enc_selection:\n        ScriptBlockText|contains|all:\n            - ' -w '\n            - 'hidden'\n            - '-ep'\n            - 'bypass'\n            - '-Enc'\n    selection_reg_selection:\n        ScriptBlockText|contains|all:\n            - 'powershell'\n            - 'reg'\n            - 'add'\n        ScriptBlockText|contains:\n            - '\\software\\microsoft\\windows\\currentversion\\run'\n            - '\\software\\wow6432node\\microsoft\\windows\\currentversion\\run'\n            - '\\software\\microsoft\\windows\\currentversion\\policies\\explorer\\run'\n    selection_webclient_selection:\n        ScriptBlockText|contains|all:\n            - 'bypass'\n            - '-noprofile'\n            - '-windowstyle'\n            - 'hidden'\n            - 'new-object'\n            - 'system.net.webclient'\n            - '.download'\n    selection_iex_webclient:\n        ScriptBlockText|contains|all:\n            - 'iex'\n            - 'New-Object'\n            - 'Net.WebClient'\n            - '.Download'\n    filter_chocolatey:\n        ScriptBlockText|contains:\n            - \"(New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1\"\n            - \"(New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')\"\n            - 'Write-ChocolateyWarning'\n    condition: 1 of selection_* and not 1 of filter_*\nfalsepositives:\n    - Unknown\nlevel: high\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1059.001","id":"T1059.001","name":"PowerShell","page":"techniques/enterprise/T1059.001/"}],"data_path":"data/detection-rules/ae7fbf8e-f3cb-49fd-8db4-5f3bed522c71.json","kind":"sigma"}
