{"id":"602f5669-6927-4688-84db-0d4b7afb2150","title":"Disable Powershell Command History","description":"Detects scripts or commands that disabled the Powershell command history by removing psreadline module","author":"Ali Alwashali","status":"test","level":"high","date":"2022-08-21","modified":"","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 script that disables the command history"],"references":["https://twitter.com/DissectMalware/status/1062879286749773824"],"source_path":"rules/windows/powershell/powershell_script/posh_ps_disable_psreadline_command_history.yml","source_sha256":"ae6120323224966c232f0b83a5b1cd078f6669ddfe289230b5e954f40f2f0762","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/powershell/powershell_script/posh_ps_disable_psreadline_command_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: Disable Powershell Command History\nid: 602f5669-6927-4688-84db-0d4b7afb2150\nstatus: test\ndescription: Detects scripts or commands that disabled the Powershell command history by removing psreadline module\nreferences:\n    - https://twitter.com/DissectMalware/status/1062879286749773824\nauthor: Ali Alwashali\ndate: 2022-08-21\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    selection:\n        ScriptBlockText|contains|all:\n            - Remove-Module\n            - psreadline\n    condition: selection\nfalsepositives:\n    - Legitimate script that disables the command history\nlevel: high\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/602f5669-6927-4688-84db-0d4b7afb2150.json","kind":"sigma"}
