Pentesting Tools

KrbRelayEx : Mastering Kerberos Ticket Relay Attacks In Active Directory Environments

KrbRelayEx is a sophisticated tool designed for performing Man-in-the-Middle (MitM) attacks by relaying Kerberos AP-REQ tickets.

It is particularly useful in scenarios where an attacker seeks to exploit vulnerabilities in Active Directory environments, especially those related to DNS manipulation and Kerberos authentication.

Key Features Of KrbRelayEx

  • Kerberos AP-REQ Ticket Relay: The tool captures and relays Kerberos authentication tickets to access SMB shares or HTTP Active Directory Certificate Services (ADCS) endpoints on behalf of the victim.
  • Fake RPC/DCOM Server: KrbRelayEx implements a fake RPC/DCOM server that listens for authenticated requests, extracts dynamic port bindings, and forwards victim requests transparently.
  • Cross-Platform Compatibility: Built with .NET 8.0, it supports both Windows and GNU/Linux platforms.
  • Multithreaded Operations: Offers interactive or background SMB consoles for managing multiple connections and supports multithreaded port forwarding for additional traffic.

Usage And Scenarios

  1. Interactive SMB Console: bashKrbRelayEx.exe -spn CIFS/target.domain.com -console -redirecthost <ip_target_host>
  2. List SMB Shares: bashKrbRelayEx.exe -spn CIFS/target.domain.com -list
  3. Dump SAM & LSA Secrets: bashKrbRelayEx.exe -spn CIFS/target.domain.com -secrets -redirecthost <ip_target_host>

Exploitation Scenarios

  • DnsAdmins Group: Members can modify DNS records, enabling DNS spoofing attacks.
  • Insecure DNS Updates: Allows unauthorized DNS updates, potentially leading to domain takeover.
  • HOSTS File Manipulation: Redirects hostname-based traffic by modifying client HOSTS files.

Important Considerations

  • Legitimate Use Only: This tool is intended for authorized penetration testing and security research purposes.
  • Configuration: Ensure proper configuration of HOSTS file entries to target IP addresses.

To use KrbRelayEx, you need to install the .NET 8.0 runtime. On Windows, download from the official .NET site, and on Ubuntu, use sudo apt install dotnet8.

Required files include KrbRelayEx.dll, KrbRelayEx.runtimeconfig.json, and optionally KrbRelayEx.exe for Windows.

Varshini

Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies.

Recent Posts

How to Install Docker on Ubuntu (Step-by-Step Guide)

Docker is a powerful open-source containerization platform that allows developers to build, test, and deploy…

2 days ago

Uninstall Docker on Ubuntu

Docker is one of the most widely used containerization platforms. But there may come a…

2 days ago

Admin Panel Dorks : A Complete List of Google Dorks

Introduction Google Dorking is a technique where advanced search operators are used to uncover information…

3 days ago

Log Analysis Fundamentals

Introduction In cybersecurity and IT operations, logging fundamentals form the backbone of monitoring, forensics, and…

4 days ago

Networking Devices 101: Understanding Routers, Switches, Hubs, and More

What is Networking? Networking brings together devices like computers, servers, routers, and switches so they…

4 days ago

Sock Puppets in OSINT: How to Build and Use Research Accounts

Introduction In the world of Open Source Intelligence (OSINT), anonymity and operational security (OPSEC) are…

4 days ago