• ID: DT002
  • Created: 25th May 2024
  • Updated: 14th June 2024
  • Platform: Windows
  • Contributor: The ITM Team

ConsoleHost_history.txt File Missing

If the ConsoleHost_history.txt file located in C:\Users\%username%\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine, is missing, this indicates that the file has been deleted. This may represent an anti-forensics technique if the subject in question is known to have used PowerShell any time.

Sections

ID Name Description
AF001Hiding or Destroying Command History

A subject deliberately clears, modifies, hides, or suppresses command history records to conceal commands executed during activities associated with an infringement. This may involve deleting existing command history files, clearing session histories, modifying shell configurations, or preventing command history from being recorded.

 

Command history may contain evidence of file access, software execution, system configuration changes, data collection, or other activities relevant to an investigation. The subject may interfere with history mechanisms associated with command-line environments such as Bash, PowerShell, Zsh, or Python to prevent investigators from reconstructing the commands executed.

 

These actions may hinder forensic examination by removing or reducing locally available command execution records. However, command activity may remain recoverable through independent system logs, endpoint telemetry, or other forensic artifacts.

AF001.001Clear PowerShell History

A subject deliberately deletes, clears, or suppresses PowerShell command history to hinder reconstruction of commands executed during activities associated with an infringement.

 

Interactive PowerShell sessions may retain command history through the PSReadLine module. On Windows, the default history file for the ConsoleHost is commonly located at %APPDATA%\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt, although the location and persistence behavior depend on the environment and configuration.

 

The subject may remove the history file, modify PSReadLine settings, or otherwise interfere with the persistence of commands. Clearing the active session's history through Clear-History does not necessarily remove commands retained in the PSReadLine history file.

 

Investigators should establish whether command history was expected to exist and correlate any gaps with PowerShell logging, process execution records, endpoint telemetry, and other available evidence. Missing history does not independently establish deliberate deletion.

IF027.002Ransomware Deployment

The subject deploys ransomware within the organization’s environment, resulting in the encryption, locking, or destructive alteration of organizational data, systems, or backups. Ransomware used by insiders may be obtained from public repositories, affiliate programs (e.g. RaaS platforms), or compiled independently using commodity builder kits. Unlike external actors who rely on phishing or remote exploitation, insiders often bypass perimeter controls by detonating ransomware from within trusted systems using local access.

 

Ransomware payloads are typically compiled as executables, occasionally obfuscated using packers or crypters to evade detection. Execution may be initiated via command-line, scheduled task, script wrapper, or automated loader. Encryption routines often target common file extensions recursively across accessible volumes, mapped drives, and cloud sync folders. In advanced deployments, the subject may disable volume shadow copies (vssadmin delete shadows) or stop backup agents (net stop) prior to detonation to increase impact.

 

In some insider scenarios, ransomware is executed selectively: targeting specific departments, shares, or systems, rather than broad detonation. This behavior may indicate intent to send a message, sabotage selectively, or avoid attribution. Payment demands may be issued internally, externally, or omitted entirely if disruption is the primary motive.