Windows API reference

NtProtectVirtualMemory

Changes the protection of committed pages in a specified process virtual address space; the native equivalent of VirtualProtectEx.

Library
Ntdll.dll
Suspicion
high

Detection summary

Commonly used to flip shellcode pages from RW to RX or RWX after NtWriteVirtualMemory; detect ETW-TI protection-change events, private executable memory, PAGE_EXECUTE_READWRITE allocations, and allocation-write-protect-thread/APC sequences. EDR memory scans should flag executable regions not backed by a mapped image. Direct syscalls bypass user-mode hooks.

Sources and documentation

Not yet human-reviewed. Page metadata generated .

Legitimate use

Runtimes, debuggers and security tools that change memory protection natively.

Open NtProtectVirtualMemory in the interactive atlas