Windows PowerShell console history file deleted (PSReadLine ConsoleHost_history.txt)
Flags deletion of the PowerShell PSReadLine ConsoleHost_history.txt file, which can remove command history evidence.
FreeUnreviewedSigmamediumv1
windows-powershell-console-history-file-deleted-psreadline-consolehost-history-t-ff301988
title: Windows PowerShell console history file deleted (PSReadLine ConsoleHost_history.txt)
id: e6d3a475-087b-4944-b4c1-ad91f6c37b9b
status: test
description: This rule identifies deletion events for the PowerShell PSReadLine history file named ConsoleHost_history.txt on Windows. Attackers may remove console history to hinder investigation and reduce available forensic artifacts tied to interactive commands. The detection relies on file deletion telemetry that includes the target filename ending in \PSReadLine\ConsoleHost_history.txt.
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
What it detects
This rule identifies deletion events for the PowerShell PSReadLine history file named ConsoleHost_history.txt on Windows. Attackers may remove console history to hinder investigation and reduce available forensic artifacts tied to interactive commands. The detection relies on file deletion telemetry that includes the target filename ending in \PSReadLine\ConsoleHost_history.txt.
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.