Overview
SeTakeOwnershipPrivilege allows a user to take ownership of any securable object in Windows without being granted discretionary access. Once you own an object, you can grant yourself full control over it — files, registry keys, services, AD objects, anything with a security descriptor.
The attack chain is always the same: take ownership → modify DACL → exploit the object.
Who Has It by Default
If you compromised a local admin that is not yet SYSTEM, or a service account with this privilege assigned via GPO, this is your path.
Check if Enabled
Disabled, you need to enable it in your current token before using it. See Enabling the Privilege below.
How It Works Technically
Every securable object in Windows (file, folder, registry key, service, AD object, named pipe, process, etc.) has a security descriptor containing:WRITE_OWNER permission can change the owner. SeTakeOwnershipPrivilege bypasses this entirely — it grants implicit WRITE_OWNER on every object regardless of its DACL.
The exploitation flow:
SetNamedSecurityInfo / SetSecurityInfo with OWNER_SECURITY_INFORMATION. The takeown.exe and icacls.exe utilities wrap this API.
Take Ownership of SAM/SYSTEM Files
Dump local hashes by taking ownership of the SAM and SYSTEM registry hives.Via Registry (Preferred — Avoids File Locks)
The SAM and SYSTEM files underC:\Windows\System32\config\ are locked by the OS. Use registry save instead:
Via File System
If you need the raw files (e.g., for offline cracking with Volume Shadow Copy):Crack the Hashes
Take Ownership of Service Registry Keys
Modify a service’sImagePath to point to your payload. The service runs as SYSTEM — so does your payload.
Step 1 — Find a Target Service
LocalSystem:
SERVICE_START_NAME : LocalSystem.
Step 2 — Take Ownership of the Registry Key
/r flag recurses into subkeys. If takeown does not support registry paths on your OS version, use PowerShell:
Step 3 — Grant Full Control
Step 4 — Modify ImagePath
Step 5 — Restart Service
Take Ownership of Service Binaries
Replace the actual binary a service executes.Step 1 — Find the Binary Path
Step 2 — Take Ownership and Replace
Step 3 — Replace Binary
Step 4 — Restart
Take Ownership of Scheduled Task Files
Scheduled tasks running as SYSTEM often execute scripts or binaries. Replace them.Find Scheduled Tasks Running as SYSTEM
Replace the Task Binary
Take Ownership of Startup Folder Locations
Binaries in startup folders execute when any user (or all users) log in.Target Paths
Take Ownership and Plant Payload
All-users startup:Take Ownership of Registry Run Keys
Run keys execute binaries at user logon. Take ownership of HKLM keys to affect all users.Step 1 — Take Ownership
Step 2 — Grant Full Control
Step 3 — Add Payload
Take Ownership of AD Objects (Domain Context)
In a domain environment,SeTakeOwnershipPrivilege on a Domain Controller (or via PowerView remotely with the privilege) lets you take ownership of AD objects — users, groups, OUs, GPOs.
Take Ownership of a User Object (Reset Password)
Take Ownership of a Group (Add Yourself)
Take Ownership of a GPO (Backdoor via Group Policy)
Using PowerView
Using takeown.exe + icacls
The built-in tools for the most common operations.takeown.exe
icacls.exe
One-Liner (Take Ownership + Full Control)
Using PowerShell Set-Acl
Native PowerShell approach without external tools.Files and Folders
Registry Keys
Reusable Function
Using SetNamedSecurityInfo API
Direct Win32 API call via P/Invoke. Use whentakeown.exe is blocked or unavailable.
Enabling a Disabled Privilege
Ifwhoami /priv shows SeTakeOwnershipPrivilege as Disabled, the privilege exists in your token but must be enabled before use. takeown.exe enables it automatically. For PowerShell and API methods, enable it manually:
Full Chain Walkthrough: TakeOwnership to SYSTEM
Step-by-step example taking ownership of a service registry key, modifying the image path, and getting a SYSTEM shell.1. Confirm the Privilege
2. Enumerate Services Running as SYSTEM
StartMode = Auto.