Windows PowerShell Console History File Deleted (PSReadLine)
Flags deletion of the PowerShell PSReadLine ConsoleHost_history.txt file, which can remove command history evidence.
FreeReviewedSigma · Medium · v2
- Product
- windows
- Category
- file_delete
- Author
- Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
- Published
- 2023-02-15
- Updated
- 2026-07-31
ATT&CK techniques
Defense EvasionRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule identifies deletion of the PowerShell PSReadLine console history file named ConsoleHost_history.txt on Windows. Attackers may remove this artifact to hinder recovery of previously executed commands and reduce forensic visibility. Detection relies on file deletion telemetry that reports when a specific target filename is removed.
Reporting behind it
Changelog
v2- v2Candidate ingested via manual entry.2026-07-31
- v1No changelog recorded for this version.2026-07-30
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
windows-powershell-console-history-file-deleted-psreadline-consolehost-history-t-ff301988
title: Windows PowerShell Console History File Deleted (PSReadLine)
id: e6d3a475-087b-4944-b4c1-ad91f6c37b9b
status: test
description: This rule identifies deletion of the PowerShell PSReadLine console history file named ConsoleHost_history.txt on Windows. Attackers may remove this artifact to hinder recovery of previously executed commands and reduce forensic visibility. Detection relies on file deletion telemetry that reports when a specific target filename is removed.
references:
- Internal Research
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/file/file_delete/file_delete_win_delete_powershell_command_history.yml
author: Nasreddine Bencherchali (Nextron Systems), Huntrule Team
date: 2023-02-15
tags:
- attack.stealth
- attack.t1070
logsource:
category: file_delete
product: windows
detection:
selection:
TargetFilename|endswith: \PSReadLine\ConsoleHost_history.txt
condition: selection
falsepositives:
- Unknown
level: medium
license: DRL-1.1
related:
- id: ff301988-c231-4bd0-834c-ac9d73b86586
type: derived