What is RelayKing?
RelayKing is a comprehensive relay detection and enumeration tool designed to identify relay attack opportunities in Active Directory environments. It performs deep protocol analysis across SMB, LDAP, HTTP, MSSQL, RPC, and more — automatically mapping viable relay attack paths and prioritizing them by impact. Feed Impacket’sntlmrelayx.py a curated target list of detected, relay-able hosts. Never miss a critical, exploitable NTLM relay path in the domain again.
Key capabilities
Protocol Detection
Detect relay vulnerabilities across SMB, HTTP/S, LDAP/S, MSSQL, RPC, SMTP, IMAP, and WinRM — with and without authentication.
AD Audit Mode
Enumerate all computers from Active Directory via LDAP with low-privilege credentials and scan the entire domain automatically.
Relay Path Analysis
Automatically identify and prioritize viable relay attack paths by severity — Critical, High, Medium, and Low.
CVE Detection
Detect CVE-2025-54918, CVE-2019-1040 (Drop the MIC), NTLM reflection, and Ghost SPN vulnerabilities via UBR checks.
Coercion Detection
Identify PetitPotam, PrinterBug, and DFSCoerce coercion vulnerabilities. Mass-coerce with
--coerce-all for NTLMv1 environments.Relay List Generation
Generate NTLMRelayX-compatible target lists in URI format, ready for direct use with ntlmrelayx.py’s
-tf flag.Multiple Output Formats
Output findings as plaintext, JSON, XML, CSV, grep-able, or Markdown. Run once, get all formats simultaneously.
Session Resume
Resume interrupted scans from where they left off using persistent session files. Critical for large domain audits.
Quick example
Run a full-domain audit with recommended flags:How it works
Target acquisition
RelayKing accepts individual hosts, CIDR ranges, IP ranges, target files, or enumerates all computers from Active Directory in
--audit mode using low-privilege LDAP credentials.Protocol scanning
For each target, RelayKing checks configured protocols for relay-relevant configuration: signing requirements, EPA enforcement, channel binding, and authentication support. Use
--proto-portscan to skip closed ports and dramatically speed up scans.Advanced detection
Specialized modules detect NTLM reflection, WebDAV/WebClient, coercion vulnerabilities (PetitPotam, PrinterBug, DFSCoerce), CVEs via UBR registry reads, Ghost SPNs, and NTLMv1 support.
Relay path analysis
The relay analyzer cross-references scan results to identify viable attack paths, assigns severity ratings (Critical → Low), and produces a prioritized report of exploitable relay opportunities.
Get started
Installation
Clone the repo, set up a virtualenv, and install dependencies.
Quickstart
Run your first scan in minutes with real-world examples.
