MIC check always fails on accept context #86
Replies: 8 comments 4 replies
-
So this is a windows client failing mic verification? |
Beta Was this translation helpful? Give feedback.
-
Server calls second time accept context on auth leg, and fails on first mic
check
1: client sends negotitate
2: server sends challenge
3: client sends authenticate
Server code iteracts with winbind in gssntlm_accept_context and fails on
mic verification.
ср, 8 февр. 2023 г., 00:31 Simo Sorce ***@***.***>:
… So this is a windows client failing mic verification?
Or is this your server failing to verify the MIC sent by the client?
—
Reply to this email directly, view it on GitHub
<#86 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AP3CSEX4EIZRNUIHCHULIY3WWK5KHANCNFSM6AAAAAAUUOBGA4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
In debuging of gssntlmssp & network data I see following: Windows client : pkt privacy Server on Linux (gssntlmssp) replys: Client has sent 'auth' and Server handles it with: key_exchange_key from after and then gssntlmssp calls
nego_msg, 40: chal_msg, 148: auth_msg, 400: ntlm_mic at ntlm_crypto.c: 996 |
Beta Was this translation helpful? Give feedback.
-
Simple test with data collected from debugging and network |
Beta Was this translation helpful? Give feedback.
-
I assume you are using Winbind integration because you are trying to interoperate in a Windows domain. The interface between Winbindd and gss-ntlmssp is good but not perfect, because winbindd makes some assumptions I cannot always influence through the available interface (I knew a lot more when I wrote that code, but forgot a bit since then). And I know there are some situations where MIC can indeed fail. So it would be good to first rule out general issues by simplifying the problem by removing winbindd from the picture, and adding it back is we are sure it works otherwise. |
Beta Was this translation helpful? Give feedback.
-
yes, winbindd.
and gssntlmssp goes into
then ok, i will try it out with NTLM_USER_FILE |
Beta Was this translation helpful? Give feedback.
-
Thanks, |
Beta Was this translation helpful? Give feedback.
-
I dont think code is wrong, may be spec from msft is not complete.
чт, 9 мар. 2023 г., 17:32 Simo Sorce ***@***.***>:
… This is really interesting.
It means when we set timestamp we are not calculating the MIC as expected.
I will try to recheck the MS NLMP
<https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-nlmp/>
docs again to see if I missed anything.
If you spot something in there let me know.
—
Reply to this email directly, view it on GitHub
<#86 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AP3CSEWL7OD62K4UO2O4HKLW3HLVXANCNFSM6AAAAAAUUOBGA4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
gss-ntlmssp/src/gss_sec_ctx.c
Line 972 in a2517e5
I wrote small server on Linux (DCE/RPC server with NTLM authentication) using gssapi and ntlmssp (1.1.0) mech to handle client connections from Windows 10.
on connect a new client everything looks ok except MIC verification. in debugger I see all headers were parsed in right way (wireshark exposes all headers exactly the same), also winbind returned with OK for user
but computed MIC doesn't match to provided with packet from Windows
I think issue has root in what source of data is used in computation (length, incorrect start position or something like that)
because algorithms code looks good from first view.
I glad to hear any help or idea for research .
Beta Was this translation helpful? Give feedback.
All reactions