This repository contains a Python script to automate the process of exploiting digital certificates using various tools. The script performs tasks such as setting up a relay with Certipy, coercing authentication with PetitPotam, acquiring certificates, and dumping user hashes.
- Python 3.x
- Certipy
- PetitPotam
- Mimikatz
- Impacket
-
Clone the repository:
git clone https://github.com/yourusername/certificate-exploitation-automation.git cd certificate-exploitation-automation
-
Install required tools:
- Certipy: Certipy Installation Guide
- PetitPotam: PetitPotam Installation Guide
- Mimikatz: Mimikatz Installation Guide
- Impacket: Impacket Installation Guide
-
Install Python dependencies:
pip install -r requirements.txt
-
Run the script:
python exploit.py
-
Follow the prompts to enter the required information:
- Domain Controller IP
- CA Server Name
- Listener IP
- Target IP
- Username
- Password
- Domain
- Path to Certificate
- Hash
The script performs the following tasks:
- Setup Certipy Relay:
- Sets up a relay using Certipy to intercept and relay authentication requests.
- Coerce Authentication:
- Uses PetitPotam to coerce the domain controller into authenticating against the attacker's server.
- Acquire Certificate:
- Uses Certipy to obtain the certificate of the domain controller's machine account.
- Dump User Hashes:
- Utilizes Impacket's secretsdump tool to dump user hashes from the domain controller.
This script is intended for educational purposes and authorized penetration testing only. Unauthorized use of this script may be illegal and unethical. Use responsibly.
Contributions are welcome! Please fork the repository and submit a pull request with your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
By following the instructions provided, you can automate the process of exploiting digital certificates within a network environment for educational or authorized testing purposes.