Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jalvarezz13/krb5keygen

Krb5KeyGen is a tool designed to generate NTLM and Kerberos AES encryption keys based on user-provided credentials, domain information, and optional iteration counts.
https://github.com/jalvarezz13/krb5keygen

Last synced: about 1 month ago
JSON representation

Krb5KeyGen is a tool designed to generate NTLM and Kerberos AES encryption keys based on user-provided credentials, domain information, and optional iteration counts.

Awesome Lists containing this project

README

        

# Krb5KeyGen

## πŸ“‘ Table of Contents

- [❓ What is Krb5KeyGen?](#-what-is-krb5keygen)
- [⭐ Features](#-features)
- [βš™οΈ Installation](#%EF%B8%8F-installation)
- [▢️ Execution](#%EF%B8%8F-execution)
- [πŸ“œ License](#-license)

## ❓ What is **Krb5KeyGen**?

**Krb5KeyGen** is a tool designed to generate NTLM and Kerberos AES encryption keys based on user-provided credentials, domain information, and optional iteration counts.

## ⭐ Features

- Generate NTLM (RC4-HMAC) key.
- Generate AES128 and AES256 Kerberos keys with specified or default iteration counts.

## βš™οΈ Installation

### Prerequisites

Ensure you have:

- Python 3.7 or higher

### Clone the Repository

```bash
git clone https://github.com/yourusername/Krb5KeyGen.git
cd Krb5KeyGen
```

## ▢️ Execution

To run **Krb5KeyGen**, use the following syntax:

```bash
python krb5_keygen.py [--iterations ]
```

- ``: The case-sensitive username (e.g., `Administrator` is different from `administrator`).
- ``: The user’s password.
- ``: The domain, which can be in uppercase or lowercase (e.g., `CONTOSO.LOCAL` or `contoso.local`).
- `--iterations ` (optional): Specify the number of iterations (default is 4096, commonly used in Kerberos and Active Directory).

### Example Commands

Generate keys with the default iteration count (4096):

```bash
python krb5_keygen.py alice "mypassword123" contoso.local
```

Generate keys with a custom iteration count:

```bash
python krb5_keygen.py alice "mypassword123" contoso.local --iterations 5000
```

### Output

The output will include the following:

- **NTLM Key (RC4-HMAC)**: NTLM hash-based key.
- **AES128 Key**: AES 128-bit key for Kerberos.
- **AES256 Key**: AES 256-bit key for Kerberos.

```bash
$> python .\krb5_keygen.py javier password contoso.local
Key NTLM (RC4-HMAC): 8846f7eaee8fb117ad06bdd830b7586c
Key AES128: 87e00e150694edbf7cedbc4d0ccbca5f
Key AES256: c59c4adaaf06d6758b825e088178aa9fa66639b4dc3b160a6b347704dfd64b9e
```

> **Note**: By default, the tool uses 4096 iterations unless a different value is specified.

## πŸ“œ License

This project is distributed under the [AGPL-3.0 License](LICENSE). Feel free to use, modify, and distribute it as per the license terms.