Suspicious Clear PowerShell History - PowerShell Module (via ps_module)
This rule detects keywords that could indicate clearing PowerShell history
SigmamediumWindowsv1
sigma
suspicious-clear-powershell-history-powershell-module-via-ps-module
title: Suspicious Clear PowerShell History - PowerShell Module (via ps_module)
id: a6bd37ad-721e-54d3-8852-8df42dc75c21
status: stable
description: This rule detects keywords that could indicate clearing PowerShell history
references:
- https://attack.mitre.org/techniques/T1070/003/
- https://gist.github.com/hook-s3c/7363a856c3cdbadeb71085147f042c1a
author: Huntrule Team
date: 2026-03-09
tags:
- attack.stealth
- attack.t1070.003
logsource:
product: windows
category: ps_module
definition: 0ad03ef1-f21b-4a79-8ce8-e6900c54b65b
detection:
selection_1a_payload:
Payload|contains:
- 'del'
- 'Remove-Item'
- 'rm'
selection_1b_payload:
Payload|contains: '(Get-PSReadlineOption).HistorySavePath'
selection_payload_2:
Payload|contains|all:
- 'Set-PSReadlineOption'
- '–HistorySaveStyle'
- 'SaveNothing'
selection_payload_3:
Payload|contains|all:
- 'Set-PSReadlineOption'
- '-HistorySaveStyle'
- 'SaveNothing'
condition: 1 of selection_payload_* or all of selection_1*
falsepositives:
- Unknown
level: medium
Known false positives
- Unknown
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.