Possible PowerShell Console History Access Attempt through History File (via process_creation)

This rule detects potential access attempts to the PowerShell console history directly via history file (ConsoleHost_history.txt). This can give access to plaintext passwords used in PowerShell commands or used for general reconnaissance.

SigmamediumWindowsv1
sigma
title: Possible PowerShell Console History Access Attempt through History File (via process_creation)
id: b721ae9e-857f-5014-b0ba-eb2b85901d8c
status: stable
description: This rule detects potential access attempts to the PowerShell console history directly via history file (ConsoleHost_history.txt). This can give access to plaintext passwords used in PowerShell commands or used for general reconnaissance.
references:
    - https://attack.mitre.org/techniques/T1552/001/
    - https://0xdf.gitlab.io/2018/11/08/powershell-history-file.html
author: Huntrule Team
date: 2026-03-20
tags:
    - attack.credential-access
    - attack.t1552.001
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        CommandLine|contains:
            - 'ConsoleHost_history.txt'
            - '(Get-PSReadLineOption).HistorySavePath'
    condition: selection
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.