NtFreezeRegistry
Temporarily blocks all registry write operations system-wide, used by VSS for consistent snapshots.
Prototype
NTSTATUS NtFreezeRegistry( ULONG TimeOutInSeconds );
Arguments
| Name | Type | Dir | Description |
|---|---|---|---|
| TimeOutInSeconds | ULONG | in | Maximum number of seconds the freeze may remain active before the kernel auto-thaws. |
Syscall IDs by Windows version
| Windows version | Syscall ID | Build |
|---|---|---|
| Win10 1507 | 0xDF | win10-1507 |
| Win10 1607 | 0xE2 | win10-1607 |
| Win10 1703 | 0xE5 | win10-1703 |
| Win10 1709 | 0xE6 | win10-1709 |
| Win10 1803 | 0xE7 | win10-1803 |
| Win10 1809 | 0xE8 | win10-1809 |
| Win10 1903 | 0xE9 | win10-1903 |
| Win10 1909 | 0xE9 | win10-1909 |
| Win10 2004 | 0xEE | win10-2004 |
| Win10 20H2 | 0xEE | win10-20h2 |
| Win10 21H1 | 0xEE | win10-21h1 |
| Win10 21H2 | 0xEF | win10-21h2 |
| Win10 22H2 | 0xEF | win10-22h2 |
| Win11 21H2 | 0xF4 | win11-21h2 |
| Win11 22H2 | 0xF5 | win11-22h2 |
| Win11 23H2 | 0xF5 | win11-23h2 |
| Win11 24H2 | 0xF7 | win11-24h2 |
| Server 2016 | 0xE2 | winserver-2016 |
| Server 2019 | 0xE8 | winserver-2019 |
| Server 2022 | 0xF3 | winserver-2022 |
| Server 2025 | 0xF7 | winserver-2025 |
Kernel module
Related APIs
Syscall stub
4C 8B D1 mov r10, rcx B8 F7 00 00 00 mov eax, 0xF7 ; Win11 24H2 SSN F6 04 25 08 03 FE 7F 01 test byte ptr [0x7FFE0308], 1 75 03 jne short +3 0F 05 syscall C3 ret CD 2E int 2Eh C3 ret
Undocumented notes
`NtFreezeRegistry` quiesces the configuration manager (`CmpRegistryFreeze`): new writers are stalled and pending lazy-flushes are completed, so that on-disk hives are coherent for the duration of the freeze. The single argument is a safety timeout — if the caller (or whatever it spawns) crashes without calling `NtThawRegistry`, the kernel auto-thaws after `TimeOutInSeconds` to keep the system usable. Requires `SeBackupPrivilege`. The intended consumer is the Volume Shadow Copy Service (VSS) writer for the registry (`%SystemRoot%\System32\Vssapi.dll` registry writer), which freezes the registry, snapshots the hive volume, then thaws.
Common malware usage
Weak in-the-wild signal — there is no publicly documented commodity malware family that calls `NtFreezeRegistry` outright. Research-grade abuse scenarios exist: (1) brief denial-of-service against monitoring tools that poll the registry for state (Sysmon, AV self-protection), (2) winning a TOCTTOU race against an EDR that scans Run keys on a schedule by freezing the registry across the moment of write, (3) ensuring a registry-persistence payload is committed to disk atomically before snapshot collection. All require `SeBackupPrivilege`, which is high-integrity / admin, so this is a post-exploitation primitive, not initial-access.
Detection opportunities
Direct invocation outside of VSSVC.exe / SystemWriter and a small number of backup products (Veeam, Acronis, Veritas, Commvault) is extremely unusual. ETW Microsoft-Windows-Kernel-Registry does not natively log freeze/thaw, but Microsoft-Windows-VolumeSnapshot-Driver and the VSS application log (`Microsoft-Windows-VSS/Operational`) record the orchestration around it. Sysmon Event 1 (process create) showing an unexpected binary holding `SeBackupPrivilege` immediately followed by a registry freeze is a strong tell. Pair with monitoring for a missing `NtThawRegistry` within the timeout window.
Direct syscall examples
cFreeze, flush, thaw — VSS-style
// Requires SeBackupPrivilege already enabled in the token.
NTSTATUS Snapshot(void) {
NTSTATUS st = NtFreezeRegistry(60); // auto-thaw safety: 60s
if (!NT_SUCCESS(st)) return st;
// ... take volume snapshot of the hive partition here ...
return NtThawRegistry();
}asmx64 direct stub
; NtFreezeRegistry direct syscall (Win11 24H2 SSN 0xF7)
NtFreezeRegistry PROC
mov r10, rcx ; TimeOutInSeconds
mov eax, 0F7h
syscall
ret
NtFreezeRegistry ENDPMITRE ATT&CK mappings
Last verified: 2026-05-20