Disable Powershell Command History
testhighlog source: windows · ps_scriptauthor Ali Alwashalidate 2022-08-21
01
description
What this is, in brief.
Detects scripts or commands that disabled the Powershell command history by removing psreadline module
02
tags
attack.stealthattack.t1070.003
03
rule source (YAML)
title: Disable Powershell Command History
id: 602f5669-6927-4688-84db-0d4b7afb2150
status: test
description: Detects scripts or commands that disabled the Powershell command history by removing psreadline module
references:
- https://twitter.com/DissectMalware/status/1062879286749773824
author: Ali Alwashali
date: 2022-08-21
tags:
- attack.stealth
- attack.t1070.003
logsource:
product: windows
category: ps_script
definition: 'Requirements: Script Block Logging must be enabled'
detection:
selection:
ScriptBlockText|contains|all:
- Remove-Module
- psreadline
condition: selection
falsepositives:
- Legitimate script that disables the command history
level: high
04
detects techniques (1)
ATT&CK techniques this enables or maps to.
05
references
External citations — patches, advisories, analysis.