Skip to content

Small python script that automates the take over of an AD object where we have 'WriteOwner' permissions on

Notifications You must be signed in to change notification settings

Rival420/Abuse-WriteOwner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Abuse-WriteOwner

Overview

Abuse-WriteOwner is a Python script designed to automate the exploitation of the WriteOwner permission in Active Directory (AD) objects. This tool allows security professionals to:

  1. Take ownership of an AD object.
  2. Assign themselves GenericAll permissions on the object.
  3. Reset the object's password.
  4. Optionally clean up changes by removing GenericAll permissions.

This tool is intended for authorized penetration testing and red team operations only. Unauthorized use is illegal.


Features

  • Automates privilege escalation using WriteOwner in AD.
  • Uses Impacket tools to modify ownership and permissions.
  • Integrates the net command for password changes.
  • Provides optional cleanup functionality.

Requirements

Tools

Environment

  • Python 3.6 or higher.
  • Operating system: Kali Linux or similar security-focused distributions.

Permissions

  • Attacker account must have WriteOwner permissions on the target AD object.

Installation

  1. Clone this repository:

    git clone https://github.com/your-username/WriteOwner-Abuse.git
    cd WriteOwner-Abuse
  2. Install Impacket if not already installed:

    pip install impacket
  3. Ensure owneredit.py and dacledit.py are in the script's directory.


Usage

Command Syntax

python writeowner_abuse.py \
  -d <domain_name> \
  -u <attacker_username> \
  -p <attacker_password> \
  -vu <victim_username> \
  -dc <domain_controller_fqdn> \
  -np <new_password>

Cleanup

When prompted, you can choose to remove the added GenericAll permissions:

[?] Do you want to remove the added permissions? (yes/no): yes

Legal Disclaimer

This tool is for educational purposes and authorized security assessments only. Unauthorized use of this tool against systems without explicit permission is illegal and unethical.


About

Small python script that automates the take over of an AD object where we have 'WriteOwner' permissions on

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages