Disable Powershell Command History

Detects scripts or commands that disabled the Powershell command history by removing psreadline module

Sigma rule (View on GitHub)

 1title: Disable Powershell Command History
 2id: 602f5669-6927-4688-84db-0d4b7afb2150
 3status: test
 4description: Detects scripts or commands that disabled the Powershell command history by removing psreadline module
 5references:
 6    - https://twitter.com/DissectMalware/status/1062879286749773824
 7author: Ali Alwashali
 8date: 2022/08/21
 9tags:
10    - attack.defense_evasion
11    - attack.t1070.003
12logsource:
13    product: windows
14    category: ps_script
15    definition: 'Requirements: Script Block Logging must be enabled'
16detection:
17    selection:
18        ScriptBlockText|contains|all:
19            - Remove-Module
20            - psreadline
21    condition: selection
22falsepositives:
23    - Legitimate script that disables the command history
24level: high

References

Related rules

to-top