Skip to content

Add NTLM SIGN flag for SMB Server - #1826

Merged
gabrielg5 merged 1 commit into
fortra:masterfrom
jborean93:smb-ntlm-flags
Jan 6, 2025
Merged

Add NTLM SIGN flag for SMB Server#1826
gabrielg5 merged 1 commit into
fortra:masterfrom
jborean93:smb-ntlm-flags

Conversation

@jborean93

Copy link
Copy Markdown
Contributor

Adds the NTLMSSP_NEGOTIATE_SIGN flag to the NTLM CHALLENGE message returned by the SMB server. This is needeed for clients that generate a SPNEGO mechListMIC which require signing to be enabled on the NTLM context.

Some background information, a client that sends an NTLM token wrapped in a SPNEGO payload can set the mechListMIC but the MS-NLMP docs are unclear what the signature behaviour is without the NTLMSSP_NEGOTIATE_SIGN or NTLMSSP_NEGOTIATE_ALWAYS_SIGN flags. I've interpreted it as signing isn't supported and thus the mechListMIC field cannot be computed. What should happen is if the client itself specified the NTLMSSP_NEGOTIATE_SIGN flag then the challenge should also respond with it which this change does. This is backed up by the protocol docs for CHALLENGE_MESSAGE

If the client has set the NTLMSSP_NEGOTIATE_SIGN in the NEGOTIATE_MESSAGE the
Server MUST return it.

Adds the NTLMSSP_NEGOTIATE_SIGN flag to the NTLM CHALLENGE message
returned by the SMB server. This is needeed for clients that generate a
SPNEGO mechListMIC which require signing to be enabled on the NTLM
context.
@anadrianmanrique anadrianmanrique self-assigned this Oct 10, 2024
@anadrianmanrique anadrianmanrique added the in review This issue or pull request is being analyzed label Oct 10, 2024
@gabrielg5
gabrielg5 merged commit 2d2e562 into fortra:master Jan 6, 2025
@gabrielg5

Copy link
Copy Markdown
Collaborator

Merging...
Thanks @jborean93!

@jborean93
jborean93 deleted the smb-ntlm-flags branch January 6, 2025 18:07
NtAlexio2 pushed a commit to NtAlexio2/impacket that referenced this pull request Jul 13, 2025
Adds the NTLMSSP_NEGOTIATE_SIGN flag to the NTLM CHALLENGE message
returned by the SMB server. This is needeed for clients that generate a
SPNEGO mechListMIC which require signing to be enabled on the NTLM
context.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in review This issue or pull request is being analyzed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants