-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service name from SPN is incorrectly dropped #63
Comments
Interesting, Do you have a network trace that shows a Windows clients setting a host name with the full service name part? |
Note that changing this behavior is not that simple, because there are assumptions that server_name is just a domain name in various part of the code, see for example: Line 761 in 1cbc124
|
Here's a Wireshark trace from Windows 11 making the request to Windows Server 2022 machine: ntlm_spn.zip The relevant part: Both Windows and macOS produce the service name there. I am not sure what possible compatibility implications could it have. |
Uhmm, this may require substantial surgery, |
Is that enough or do you want some other fields as well? |
For reference, this is the .NET runtime code that sets the SPN name through GSSAPI. It is later passed to |
Thanks, I just saw you linked a trace and was looking at it. |
Ok, I will see what can be done here ... the surgery may not be pretty, but shouldn't be overly difficult |
Thanks. |
Btw, the test server is intentionally set up to use all kinds of different names for various fields to test enterprise scenarios. The real DNS address from the outside world is |
Thanks for the explanation, I assumed it was a test harness indeed. |
Now the interesting thing is that we never encode the target_name ... in the target_info structure, sooo is there another place where this popped up ? |
Do you see a failure in ntlm_process_target_info() by chance ? |
Just as an FYI I've recently had someone come across this in jborean93/smbprotocol#169. They have the policy https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/microsoft-network-server-server-spn-target-name-validation-level which enforces SPN validation of this field on the remote host so the field is definitely being used in some places. |
Nice, glad this is fixed then, perhaps I should make at least a Fedora release? |
I wouldn't say no to a new release :) Will test out the changes when I get a chance tomorrow to verify it works in the scenario I've had reported. |
The SPN named imported using GSS_C_NT_HOSTBASED_SERVICE drops the service name (
gss-ntlmssp/src/gss_names.c
Lines 297 to 300 in 9b6493b
SERVICE@HOST
format intoSERVICE/HOST
format which is the included in full in the AVID structure (MsvAvTargetName).The text was updated successfully, but these errors were encountered: