Overview
SeRestorePrivilege grants write to any file/folder, bypassing NTFS ACLs (it also grants implicit WRITE_DAC/WRITE_OWNER). Effectively arbitrary write as SYSTEM: overwrite protected binaries, plant DLLs in System32, modify scheduled tasks.
Default on Administrators (elevated), Backup Operators, SYSTEM, and Server Operators on a DC.
Check if Enabled
AdjustTokenPrivileges, see PowerShell method).
Replace Accessibility Binary — SYSTEM Shell at Login
Accessibility binaries launch as SYSTEM from the lock/login screen. Replace withcmd.exe.
Win+L) → click Ease of Access → SYSTEM shell. Works pre-auth over RDP (xfreerdp3 /v:TARGET /cert:ignore).
Same technique for every accessibility binary:
Cleanup: restore the
.bak.
Overwrite Service Binary
DLL Hijack — System32 / PATH
Write a malicious DLL where a SYSTEM service expects one. Find missing DLLs with Procmon (Result = NAME NOT FOUND, ends .dll).
Scheduled Task Hijack
Task XML lives inC:\Windows\System32\Tasks. Overwrite a SYSTEM task’s command.
Modify hosts File
C:\Windows\System32\drivers\etc\hosts is normally protected. Redirect internal hostnames to a Responder host to capture Net-NTLMv2.
Write SSH authorized_keys
If OpenSSH Server is installed (sc query sshd), plant your key for passwordless access.
PowerShell Method (Backup Semantics)
Whencopy fails due to WRP, enable the privilege at runtime and write via .NET with FILE_FLAG_BACKUP_SEMANTICS (0x02000000). Enable the privilege with the standard AdjustTokenPrivileges P/Invoke (see the snippet on SeCreateTokenPrivilege), then: