π SeTakeOwnershipPrivilege
π― Overview
SeTakeOwnershipPrivilege grants users the ability to take ownership of any "securable object" including NTFS files/folders, registry keys, services, processes, and Active Directory objects. This privilege assigns WRITE_OWNER rights, allowing modification of object security descriptors to change ownership.
π Privilege Fundamentals
SeTakeOwnershipPrivilege Capabilities
File/folder ownership takeover on NTFS systems
Registry key ownership modification
Service ownership changes
Process ownership manipulation
Active Directory object ownership control
Assignment Contexts
# Group Policy location:
Computer Configuration β Windows Settings β Security Settings β Local Policies β User Rights Assignment
"Take ownership of files or other objects"Common Assignment Scenarios:
Administrators - assigned by default
Service accounts - backup jobs, VSS snapshots
Specialized roles - often combined with SeBackupPrivilege, SeRestorePrivilege
GPO abuse victims - via SharpGPOAbuse attacks
π Privilege Detection & Enablement
Enumeration
Privilege Activation
Method 1: PowerShell Script
Method 2: Manual Token Manipulation
π― Target File Identification
High-Value Targets
System Configuration Files
Credential Files
Specialized Files
π» File Ownership Attack Technique
Step 1: Target Assessment
Step 2: Ownership Takeover
Step 3: Ownership Verification
Step 4: Access Control Modification
Step 5: File Access
π― HTB Academy Lab Solution
Lab Environment
Target:
10.129.43.43(ACADEMY-WINLPE-SRV01)Credentials:
htb-student:HTB_@cademy_stdnt!Access Method: RDP
Objective: Leverage SeTakeOwnershipPrivilege over
C:\TakeOwn\flag.txt
Detailed Step-by-Step Solution
1. RDP Connection
2. Privilege Verification
3. Privilege Activation
4. Target File Analysis
5. File Ownership Takeover
6. Access Control Modification
7. Flag Retrieval
Alternative Methods
Manual ACL Manipulation
Registry Key Takeover
β οΈ Impact & Considerations
Destructive Nature
Reversion Challenges
Client Communication
π Detection Indicators
File System Events
Process Activity
Registry Monitoring
π‘οΈ Defense Strategies
Privilege Hardening
File System Protection
Monitoring Implementation
π SeTakeOwnershipPrivilege Exploitation Checklist
Prerequisites
Execution Steps
Post-Exploitation
File Targets Priority
π‘ Key Takeaways
SeTakeOwnershipPrivilege enables ownership takeover of any securable object
File system attacks are primary use case for privilege escalation
ACL modification required after ownership change for access
Destructive potential requires careful consideration before execution
Service accounts commonly have this privilege for backup operations
GPO abuse can grant privilege to controlled accounts
Detection possible through file system event monitoring
SeTakeOwnershipPrivilege exploitation provides powerful file system access but should be used with extreme caution due to its potentially destructive nature.
Last updated