RelayKing’s MSSQL detector checks SQL Server instances on port 1433 for Extended Protection for Authentication (EPA) enforcement. If EPA is not enforced, an attacker who captures NTLM authentication can relay it directly to the SQL Server instance.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/depthsecurity/RelayKing-Depth/llms.txt
Use this file to discover all available pages before exploring further.
What is checked
| Check | Auth required | Notes |
|---|---|---|
| Port open | No | Quick 3-second socket probe before any further checks |
| EPA enforcement | Yes | Attempted login; response inspected for channel binding / extended protection error strings |
Relay condition
epa_enforced = None (unknown) is treated conservatively — the host is not included in the relay list when the result cannot be determined.
EPA detection logic
RelayKing uses impacket’sMSSQL class to attempt a login and inspects the error response:
| Login outcome | epa_enforced value | Notes |
|---|---|---|
| Login succeeds | False | EPA not enforced |
Error contains channel binding or extended protection | True | EPA enforced |
Error contains encryption required | True (ENFORCED (encryption required)) | Encryption requirement indicates EPA |
Login fails with login failed or authentication failed | False (NOT_ENFORCED (auth failed)) | Auth failure not caused by EPA; EPA likely not enforced but unconfirmed |
--null-auth mode | None | Cannot test EPA without credentials |
| Kerberos auth failure | Error string returned | Kerberos fallback to NTLM is suppressed to prevent lockout |
When credentials are provided but authentication fails with a generic login error (bad password, account locked out, etc.), RelayKing records
NOT_ENFORCED (auth failed) rather than ENFORCED. This reflects that the failure was due to credentials, not EPA. Confirm with valid credentials when possible.Flags and port
| Parameter | Value |
|---|---|
--protocols value | mssql |
| Default port | 1433 |
| Auth required | Yes (for reliable EPA check) |
--protocols mssql or include it in a comma-separated list.
Example commands
- Full audit including MSSQL
- Single target MSSQL check
- MSSQL with pass-the-hash
Relay list output
SQL Server instances whereepa_enforced == False are included in the relay list generated by --gen-relay-list. Relaying to MSSQL enables executing queries under the relayed user’s SQL permissions — including xp_cmdshell if the user has sysadmin rights.
