Hiding
Encrypted Hidden Storage: Rootkit File Systems in a File
How Windows kernel rootkits keep tools and data in encrypted containers only their driver can open: Snake's covert store, ZeroAccess's volumes. Traces, checks.
- Goal
- Hiding
- Layer
- Kernel
- Platforms
- Windows
- Also known as
- Hidden file system, Covert store, Virtual file system
- Used by
- SnakeZeroAccess
- Checked by
- None: no module reads its traces
Overview
Rootkits need somewhere to keep their components, configuration, tools and collected data. Ordinary files on the Windows volume are what scanners and triage read first, so some kernel rootkits keep everything in an encrypted container that only their own driver can open: a file that holds a whole NTFS or FAT file system, or a folder locked against everyone but the rootkit. On disk it is an opaque, high-entropy blob or an inaccessible directory; through the rootkit's driver it is a working volume.
ESET's 2012 study of hidden encrypted storage lists what it gives the malware: its data kept "secret and stealthy", a standard file interface for payloads, and a way around security software. MITRE ATT&CK tracks it as Hidden File System (T1564.005), with Snake among its examples, and notes that it "cannot be easily mitigated with preventive controls".
This page covers containers kept inside the Windows file system. Bootkits keep theirs in disk sectors outside any partition, which bootkits.dev covers under hidden storage outside the partitions.
How it works
| Form | Where the bytes are | How the rootkit uses it |
|---|---|---|
| Container file holding a file system | A file on the Windows volume, encrypted block by block | The kernel driver exposes it as a device or volume and decrypts on the fly, so payloads use normal file APIs |
| Locked folder | A directory under the Windows folder with its access control entries removed and a reparse point | Reached only through the rootkit's link or as SYSTEM; its files are encrypted |
| Encrypted flat file | A single file with an internal structure, without a file system | Read and written by the rootkit's components through the kernel module |
| Registry value | A large binary value | Keys, IVs or paths for the files above |
| Alternate data streams | Named streams attached to a legitimate file | Code stored where a normal directory listing does not show it |
Three properties make the storage hard to see. The contents are encrypted with keys held in the driver or the registry, so neither strings nor file signatures match. The container's name is random or ordinary. And the kernel driver, which already hides itself, also hides the container from directory listings and refuses or fakes access to it, while serving it to its own components.
How families use it
Snake. G DATA's 2014 Red Paper describes two virtual file systems, one NTFS and one FAT, stored in a .dat file with a random name next to the driver in %SYSTEMROOT%\$Ntuninstall[Random_ID]$. They are encrypted with CAST-128, with the NTFS volume's key hard-coded in the driver, reachable through the devices \Device\RawDisk1 and \Device\RawDisk2 and the volumes \\.\Hd1 and \\.\Hd2, and they held the attackers' scripts, logs, tools and queue files. The driver hooks ObOpenObjectByName to hide them. CISA's 2023 advisory calls the same design the covert store: "a file-backed NTFS (usually) or FAT-16 (rarely) filesystem", encrypted with CAST-128 in CBC mode, with the key hard-coded or read from the registry. In recent versions, it says, the covert store is gone and the queue file sits directly on disk:
| Artefact (2023) | Typical location | Notes |
|---|---|---|
| Queue file | %windows%\Registration\<RANDOM_GUID>.<RANDOM_GUID>.crmlog | Hidden, system and archive attributes; high entropy; items, and in some versions the whole file, encrypted with CAST-128 |
| Driver and loader | %windows%\system32\Com\comadmin.dat | AES-encrypted |
| Registry blob | HKLM\SOFTWARE\Classes\.wav\OpenWithProgIds | AES key, IV and path; elsewhere, a value of at least 0x1000 bytes with entropy of at least 7.9 |
CISA notes that the kernel module mediates every request between Snake's user-mode components and this storage, which is encrypted with a key unique to each implant, so signatures for host components are less effective.
ZeroAccess. Each generation of the kernel-mode rootkit used a different store:
- The Prevx analysis of April 2011 describes a volume backed by a file in
System32\configwith a random name, encrypted sector by sector with RC4, which the dropper formatted as NTFS through a fake disk device. Symantec places the Type I store at%System%\config\fmaqiqfv. It held the clean copy of the driver the rootkit had replaced. - Symantec's Type II and III variants used
%Windir%\$NtUninstallKB42423$\, with "restrictive access control lists" and "a superfluous reparse point that confuses the file system". Microsoft describes a reparse-point folder%SystemRoot%\$NtUninstallKB<number>whose files "are encrypted, and are not generally accessible". ESET places it insystem32and adds that the rootkit strips the folder's ACL, leaving it reachable only through a symbolic link and by the System account that owns it. - Prevx reports that the version of 2009 kept its code in alternate data streams of
win32k.sys.
The sources disagree on the exact folder for the $NtUninstallKB store; look in both the Windows folder and System32.
Traces it leaves
| Trace | Where | Notes |
|---|---|---|
| High-entropy files with no recognisable header | Next to the driver, Windows\Registration, System32\Com, System32\config | Snake's .dat, .crmlog and comadmin.dat; ZeroAccess's container |
| Folders with no usable ACL or a reparse point | C:\Windows\$Ntuninstall…$, $NtUninstallKB… | Access denied even to administrators |
| A large high-entropy registry value | SOFTWARE hive | Snake's blob |
| Named streams on a system file | win32k.sys:1, win32k.sys:2 | ZeroAccess, 2009 |
| MFT records | $MFT | Creation times, sizes and attributes of the containers, readable even when the files cannot be opened |
| Devices and handles | Memory | Snake's RawDisk devices; ZeroAccess's fake disk device; handles held open on the container |
How to check a host
Offline, from an image read on another machine, where the driver cannot hide or guard anything:
- List the paths above, with their attributes, sizes and times from the MFT. A file in
System32\configthat is not a registry hive or log deserves a look. - Run CISA's YARA rules, which flag files with entropy of at least 7.0, over the queue-file pattern,
comadmin.datand other candidates; the advisory also givesfindand PowerShell commands to locate them. - Search the SOFTWARE hive for large binary values with high entropy.
- Check alternate data streams on system files, and folders under
Windowswhose ACLs are empty or that are reparse points. - To read the contents, the key is needed: CISA describes checking a candidate covert store by encrypting the expected file system header with the implant's key and comparing it with the file, and Prevx publishes the RC4 key of the sample it analysed.
Live, as a first look only, since the driver hides and guards its storage:
Get-ChildItem -Force C:\Windows\Registration -Filter *.crmlog | Select-Object Name, Length, Attributes, LastWriteTime
Get-ChildItem -Force C:\Windows\System32\Com -Filter comadmin.dat
Get-ChildItem -Force C:\Windows, C:\Windows\System32 -Directory -Filter '$Nt*' | Select-Object FullName, Attributes, LinkType
Get-ChildItem -Force C:\Windows\System32\config -File | Select-Object Name, Length, LastWriteTime
Get-Item -Force C:\Windows\System32\win32k.sys -Stream *
A memory image shows what the driver has open: Volatility 3's windows.devicetree lists device objects such as Snake's RawDisk devices, windows.handles and windows.filescan show the files the rootkit keeps open, and CISA calls memory analysis the most effective way to detect Snake.
What these checks cannot prove: a high-entropy file can be a legitimate encrypted or compressed file, and the names are easy to change; CISA gives high confidence only when several artefacts line up.
What the checker looks for
No module reads this storage, so checks is empty. windrivers reads .sys files, the SYSTEM hive, Amcache and the System and CodeIntegrity logs; it does not list folders, alternate data streams or registry values in the SOFTWARE hive, and it computes no entropy. What it sees is the driver that opens the storage:
- for Snake's 2014 generation, the
Ultra3driver service, whoseImagePathpoints into the$Ntuninstall…$folder that also holds the.datfiles. The checker treats that folder as a Windows folder and raises no path finding, so read theImagePathcolumn; the driver file, if collected, raises "An unsigned kernel driver" when it carries no signature; - for ZeroAccess, the replaced Windows driver, as described under system driver replacement.
Snake's 2023 generation stores its driver encrypted in comadmin.dat and loads it from a user-mode service, so the module has nothing to read.
Mitigation and recovery
There is no setting that prevents a program from writing an encrypted file, which is why ATT&CK sees no easy preventive control. The defence is upstream: keep the driver that hides and serves the storage out of the kernel, with driver signature enforcement, memory integrity (HVCI), the vulnerable driver blocklist and fewer administrators.
Recovery: preserve the containers, the hives and a memory image before anything else. The storage holds what the attackers kept on the host, tools, logs and queued commands, and decrypting it with the key from the driver, the registry or memory is how its contents are scoped. Then rebuild the host from known-good media: deleting the container leaves the driver, and on ZeroAccess, Symantec notes a shutdown handler that restored removed components.
Sources
Primary public reports, newest first.
- 2026-05-12Hide Artifacts: Hidden File System (T1564.005)MITRE ATT&CK
- 2023-05-09Hunting Russian Intelligence "Snake" Malware (AA23-129A)CISA
- 2014-02-28Uroburos: Highly complex espionage software with Russian roots (Red Paper)G DATA
- 2013-10-04ZeroAccess IndepthSymantec
- 2012-09-26Defeating Anti-Forensics in Contemporary Complex ThreatsESET (Virus Bulletin 2012)
- 2012-04-12Win32/Sirefef threat descriptionMicrosoft
See also
Related techniques
- Replacing a Windows system driverGetting into the kernel
- Kernel hooks on Windows (inline, SSDT, IRP)Hiding
Families that use it
- SnakeWindows kernel rootkit
- ZeroAccessWindows kernel rootkit