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
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