{"id":"26b692dc-1722-49b2-b496-a8258aa6371d","title":"Clear PowerShell History - PowerShell","description":"Detects keywords that could indicate clearing PowerShell history","author":"Ilyas Ochkov, Jonhnathan Ribeiro, Daniil Yugoslavskiy, oscd.community","status":"test","level":"medium","date":"2022-01-25","modified":"2022-12-02","tags":["attack.stealth","attack.t1070.003"],"technique_ids":["T1070.003"],"logsource":{"product":"windows","category":"ps_script","definition":"Requirements: Script Block Logging must be enabled"},"falsepositives":["Legitimate PowerShell scripts"],"references":["https://gist.github.com/hook-s3c/7363a856c3cdbadeb71085147f042c1a"],"source_path":"rules/windows/powershell/powershell_script/posh_ps_clear_powershell_history.yml","source_sha256":"a7d884c70b1e2e37e1e1f1e8287712718c63ce5502d0c415344c260354419597","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/powershell/powershell_script/posh_ps_clear_powershell_history.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Clear PowerShell History - PowerShell\nid: 26b692dc-1722-49b2-b496-a8258aa6371d\nrelated:\n    - id: dfba4ce1-e0ea-495f-986e-97140f31af2d\n      type: derived\nstatus: test\ndescription: Detects keywords that could indicate clearing PowerShell history\nreferences:\n    - https://gist.github.com/hook-s3c/7363a856c3cdbadeb71085147f042c1a\nauthor: Ilyas Ochkov, Jonhnathan Ribeiro, Daniil Yugoslavskiy, oscd.community\ndate: 2022-01-25\nmodified: 2022-12-02\ntags:\n    - attack.stealth\n    - attack.t1070.003\nlogsource:\n    product: windows\n    category: ps_script\n    definition: 'Requirements: Script Block Logging must be enabled'\ndetection:\n    selection1a:\n        ScriptBlockText|contains:\n            - 'del'\n            - 'Remove-Item'\n            - 'rm'\n    selection1b:\n        ScriptBlockText|contains: '(Get-PSReadlineOption).HistorySavePath'\n    selection_2:\n        ScriptBlockText|contains|all:\n            - 'Set-PSReadlineOption'\n            - '–HistorySaveStyle'  # not sure if the homoglyph –/- is intended, just checking for both\n            - 'SaveNothing'\n    selection_3:\n        ScriptBlockText|contains|all:\n            - 'Set-PSReadlineOption'\n            - '-HistorySaveStyle'\n            - 'SaveNothing'\n    condition: 1 of selection_* or all of selection1*\nfalsepositives:\n    - Legitimate PowerShell scripts\nlevel: medium\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1070.003","id":"T1070.003","name":"Clear Command History","page":"techniques/enterprise/T1070.003/"}],"data_path":"data/detection-rules/26b692dc-1722-49b2-b496-a8258aa6371d.json","kind":"sigma"}
