Skip to content

New Rule : PowerShell Console History File Access - proc_creation#5253

Merged
phantinuss merged 12 commits intoSigmaHQ:masterfrom
EzLucky:powershell_console_history
Sep 22, 2025
Merged

New Rule : PowerShell Console History File Access - proc_creation#5253
phantinuss merged 12 commits intoSigmaHQ:masterfrom
EzLucky:powershell_console_history

Conversation

@EzLucky
Copy link
Copy Markdown
Contributor

@EzLucky EzLucky commented Apr 4, 2025

Summary of the Pull Request

Add a new rule concerning access to the PowerShell console history file.

A red team has been seen using this technique with the following command cmd.exe /q /c powershell.exe "type C:\Users\*\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt" > output_file in order to try to retrieve plaintext passwords that may have been used in PowerShell commands.

Changelog

new: Potential PowerShell Console History File Access Attempt

Example Log Event

Fixed Issues

SigmaHQ Rule Creation Conventions

  • If your PR adds new rules, please consider following and applying these conventions

@github-actions github-actions Bot added Rules Windows Pull request add/update windows related rules labels Apr 4, 2025
@nasbench nasbench added Work In Progress Some changes are needed Author Input Required changes the require information from original author of the rules labels Apr 16, 2025
@EzLucky EzLucky changed the title New Rules : PowerShell Console History File Access - file_access + proc_creation New Rule : PowerShell Console History File Access - proc_creation Apr 24, 2025
@EzLucky EzLucky requested a review from nasbench April 24, 2025 09:15
@EzLucky
Copy link
Copy Markdown
Contributor Author

EzLucky commented Jun 25, 2025

Rule updated @nasbench

@nasbench nasbench added 2nd Review Needed and removed Work In Progress Some changes are needed Author Input Required changes the require information from original author of the rules labels Jun 25, 2025
EzLucky and others added 3 commits June 25, 2025 13:00
…nsole_history_file_access.yml

Co-authored-by: phantinuss <79651203+phantinuss@users.noreply.github.com>
…nsole_history_file_access.yml

Co-authored-by: phantinuss <79651203+phantinuss@users.noreply.github.com>
…nsole_history_file_access.yml

Co-authored-by: phantinuss <79651203+phantinuss@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new Sigma detection rule to identify potential unauthorized access to PowerShell console history files, which can contain sensitive information like plaintext passwords. The rule targets attempts to read the ConsoleHost_history.txt file or retrieve its path.

  • Adds detection for PowerShell console history file access attempts
  • Covers both direct file access and path retrieval methods
  • Targets credential access techniques used by red teams for reconnaissance

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@phantinuss phantinuss merged commit d698b3a into SigmaHQ:master Sep 22, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready to Merge Rules Windows Pull request add/update windows related rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants