Closed jborean93 closed 4 years ago
so this is with NTLMv2 ? And this indicates that in the dummy signature the sequence number is permanently returning 1 as the value ?
so this is with NTLMv2 ?
Yep, the NTLMSSP_NEGOTIATE_ALWAYS_SIGN
flag indicates that signing is always available using this dummy signature if NTLMSSP_NEGOTIATE_SIGN
or NTLMSSP_NEGOTIATE_SEAL
isn't negotiated. In GSSAPI land this can occur if the GSS_C_INTEG_FLAG
and GSS_C_CONF_FLAG
are not set during the token exchange.
And this indicates that in the dummy signature the sequence number is permanently returning 1 as the value ?
The first 4 bytes for both NTLM and NTLM with ESS indicate the first 4 bytes are the signature version not the sequence number. When generating multiple signatures from the same context the actual SeqNum
part never changes and the signature in this scenario is always 01000000000000000000000000000000
from SSPI.
so this is with NTLMv2 ?
Yep, the
NTLMSSP_NEGOTIATE_ALWAYS_SIGN
flag indicates that signing is always available using this dummy signature ifNTLMSSP_NEGOTIATE_SIGN
orNTLMSSP_NEGOTIATE_SEAL
isn't negotiated. In GSSAPI land this can occur if theGSS_C_INTEG_FLAG
andGSS_C_CONF_FLAG
are not set during the token exchange.
My question was more about: is this the same in NTLMv1 vs NTLMv2 ? The rest is already hanndled correctly here, ie returning all zeros is not an accident it's just the first byte is the sequence number and it is set to 0 as the starting point.
And this indicates that in the dummy signature the sequence number is permanently returning 1 as the value ?
The first 4 bytes for both NTLM and NTLM with ESS indicate the first 4 bytes are the signature version not the sequence number. When generating multiple signatures from the same context the actual
SeqNum
part never changes and the signature in this scenario is always01000000000000000000000000000000
from SSPI.
So I have the signature version handled as well, but apparently not the same way in all cases.
Can you tell me how did you extract the signatures from gssapi ?
Ok found the issue see #21 pls
When a security context does not having signing/integrity negotiated but
NTLMSSP_NEGOTIATE_ALWAYS_SIGN
is set SSPI will generate a signature of\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
. This library generates a signature of\x00 * 16
. I can't find this mentioned anywhere in MS-NLMP but the Davenport NTLM docs does mention this under "Dummy" SigningHere are the various permutations I've tried:
_¹ - 0 means neither ALWAYSSIGN, SIGN, or SEAL is set. _² - SSPI and GSSAPI always sets
NTLMSSP_NEGOTIATE_ALWAYS_SIGN
so I cannot test this there._ ³ - SettingSEAL
will always setSIGN
for SSPI.Just as an FYI, the seq number part of the dummy signature does not increment when signing a 2nd message using SSPI.