T1564.005 Elastic Security · Elastic

Detect Hidden File System in Elastic Security

Adversaries may use a hidden file system to conceal malicious activity from users and security tools. Hidden file systems operate outside normal OS file system abstractions — adversaries write raw data to unused disk space, inside volume slack space, inside NTFS extended attributes, or in specially crafted partitions that aren't mounted by the OS. The Equation Group APT, ComRAT v4, Regin rootkit, and BOOTRASH VBR bootkit all use hidden file systems. This technique makes data invisible to standard forensic tools and EDR sensors that operate at the file system API level.

MITRE ATT&CK

Tactic
Defense Evasion
Technique
T1564 Hide Artifacts
Sub-technique
T1564.005 Hidden File System
Canonical reference
https://attack.mitre.org/techniques/T1564/005/

Elastic Detection Query

Elastic Security (Elastic)
eql
sequence by host.id with maxspan=5m
  [process where event.type == "start" and
    process.name in~ ("diskpart.exe", "format.com", "bcdedit.exe") and
    process.parent.name in~ ("cmd.exe", "powershell.exe", "wscript.exe", "cscript.exe")]
  [process where event.type == "start" and
    process.name in~ ("diskpart.exe", "format.com", "bcdedit.exe")]
union
process where event.type == "start" and
  process.name in~ ("powershell.exe", "cmd.exe") and
  process.args : ("*\\\\.\\PhysicalDrive*", "*\\Device\\HarddiskVolume*", "*\\Device\\Harddisk*", "*CreateFile*\\\\.\\*")
high severity medium confidence

Detects hidden file system creation via raw disk access tools (diskpart, format, bcdedit) launched from scripting engines, or direct physical disk device path access via PowerShell/cmd. Matches behavior of Equation Group, ComRAT v4, and BOOTRASH rootkit-style hidden partition creation.

Data Sources

Elastic Endpoint SecurityWinlogbeat with SysmonAuditbeat

Required Tables

logs-endpoint.events.process-*winlogbeat-*

False Positives & Tuning

  • Legitimate disk management operations by system administrators using diskpart or format.com in maintenance windows
  • bcdedit.exe invoked by legitimate backup and recovery software (e.g., Acronis, Veeam, Windows Recovery Environment) modifying BCD store
  • IT provisioning scripts that automate disk partitioning during OS imaging or bare-metal builds
Download portable Sigma rule (.yml)

Other platforms for T1564.005


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Raw Physical Disk Access via PowerShell

    Expected signal: Sysmon Event ID 1: powershell.exe with PhysicalDrive in command line. Security Event ID 4688. No disk modification occurs — only read access.

  2. Test 2Diskpart Script Execution

    Expected signal: Sysmon Event ID 1: diskpart.exe with /s flag and script path. Security Event ID 4688 for diskpart.exe. Script file creation in Temp (Sysmon EventCode=11).

  3. Test 3BCDEdit Query for Boot Configuration

    Expected signal: Sysmon Event ID 1: bcdedit.exe with /enum flag. Security Event ID 4688. Output shows all boot entries including any hidden or non-standard entries.

Unlock Pro Content

Get the full detection package for T1564.005 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections