Replace mssql_cbt with mssql_epa for full Extended Protection enforcement check#1209
Replace mssql_cbt with mssql_epa for full Extended Protection enforcement check#1209NoahDSJP wants to merge 2 commits into
Conversation
|
Thanks for the PR! |
|
Alright thanks for the PR! So here is the thing:
Let me know :) |
- Add Kerberos auth path using impacket's kerberosLogin with cbt_fake_value - Force Encryption ON: test CBT (bogus + missing) like NTLM CBT case - Force Encryption OFF + Kerberos: report N/A (MSSQL does not validate Kerberos channel bindings without TLS, and Kerberos has no service-binding equivalent of NTLM's MsvAvTargetName) - Credit @Dfte (mssql_cbt author) in module docstring
|
@Dfte Thank you for your question. Regarding the second question, my explanation might have been a little confusing, so let me clarify. Originally, MSSQL's EPA can be verified with the authentication credentials of any domain user. Without authentication, the EPA cannot be enumerated. For the reasons above, it is difficult to incorporate the EPA check into Force Encryption : No(Kerberos Authentication) Force Encryption : Yes / Extended Protection : Off(Kerberos Authentication) Force Encryption : Yes / Extended Protection : Allowed(Kerberos Authentication) Force Encryption : Yes / Extended Protection : Required(Kerberos Authentication) |
|
Thanks for the detailed explanation and no worries about the english, that is perfectly fine. Regarding the second paragraph, so this basically means you need to have valid Domain credentials to be able to determine a valid NTLM authentication in combination with the service binding, but it does not need access to the MSSQL service itself right? Then we indeed need valid (domain) credentials and I agree, that should then be a module and not incorporated into the NetExec enumeration part. |
|
Yes, that understanding is completely correct. To be precise:
The NetExec module only executes after a successful SQL Login, so the need for SQL Login is a consequence of that; it's not a technical constraint. Thank you for agreeing to keep this as a module. |




Description
This PR description and any comments are written by me in Japanese
and translated to English using a translation tool (Google Translation).
This PR is a continuation of #1206.
Following @Dfte's suggestion to merge mssql_cbt and mssql_epa into a single module (and using mssql_epa as the name).
The purpose of this PR is to remove mssql_cbt and add the mssql_epa module, which performs more comprehensive EPA checks.
mssql_cbt only detects whether CBT is required.
mssql_epa is more comprehensive, distinguishing between three EPA enforcement levels (Off/Allowed/Required) and also covering SPN-based paths that apply when mandatory encryption is disabled. This cannot be checked with mssql_cbt.
mssql_epa functionality:
Detect EPA enforcement:
The tool this module is based on:
https://github.com/NoahDSJP/mssql_epa_check
Notes
Wiki updates will be submitted separately to https://github.com/Pennyw0rth/NetExec-Wiki
AI Assistance Disclosure
Developed using Claude Code (Anthropic, Opus 4.7).
All code has been manually reviewed and tested by me.
Type of change
Setup guide for the review
Reproduce:
Expected output (one of):
Screenshots (if appropriate):
Checklist:
poetry run ruff check ., use--fixto automatically fix what it can)tests/e2e_commands.txtfile if necessary (new modules or features are required to be added to the e2e tests)