A low-level utility to force-change file ownership using direct Windows API calls.
This project is a technical demonstration of interacting with the Windows Security Subsystem using Visual Basic 6.0. It solves a specific administrative limitation: while the native takeown command only allows a user to take ownership for themselves, this tool enables an administrator to assign ownership to any arbitrary user or group by manually elevating process privileges.
- Privilege Escalation: Programmatically enables SeRestorePrivilege to allow ownership assignment.
- Direct API Integration: Uses advapi32.dll to manipulate Security Identifiers (SIDs) and Security Descriptors.
- Zero Dependencies: A standalone executable that does not require the .NET runtime.
- Language: Visual Basic 6.0
- APIs: Win32 API (Advapi32, Kernel32)
- Platform: Windows XP / Windows Server 2003 Legacy Enviornment
Follow these instructions to get a local copy of the project up and running.
- Visual Basic 6.0 IDE (to compile from source).
- Administrative privileges (required to adjust token privileges).
-
Clone the repository
git clone https://github.com/abanta1/own.git
-
Navigate to the project directory
cd own -
Open
Own.vbpin the VB6 IDE. -
Go to
File > Make Own.exe
\\ example usage
own.exe C:\Path\To\Folder,Username