🏠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

  1. SeTakeOwnershipPrivilege enables ownership takeover of any securable object

  2. File system attacks are primary use case for privilege escalation

  3. ACL modification required after ownership change for access

  4. Destructive potential requires careful consideration before execution

  5. Service accounts commonly have this privilege for backup operations

  6. GPO abuse can grant privilege to controlled accounts

  7. 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