Conversation
Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/a74b69ad-c93f-4941-b700-c8d1ee0a5f0b Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/a74b69ad-c93f-4941-b700-c8d1ee0a5f0b Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
…add tests Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/cb00a60a-2ef0-41c5-bbea-04959593dc38 Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/cb00a60a-2ef0-41c5-bbea-04959593dc38 Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
…test link Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/7ba12010-cf5a-429b-aadb-39b98025c95e Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/9756222e-9c44-40ad-a024-917391821207 Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/9756222e-9c44-40ad-a024-917391821207 Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
… fix grouping Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/1d660bed-e1bc-4fc9-abb3-97e572d18ec7 Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/1d660bed-e1bc-4fc9-abb3-97e572d18ec7 Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
…ES, fix gettsreq Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/546c4471-ad4e-4fc2-bc82-8982e94453e9 Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
Fixed in 6b45d4a — three root causes: |
…eadtsreq Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/eda203d1-3275-4df8-bfa2-cb5ef1be5de0 Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
…pubKeyAuth Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/f6820118-d147-4d26-8888-97e216ecd442 Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
|
Re-tested on the latest revision: [...after a while...] |
…ithout ESS Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/a98be0c6-ab2e-4ac1-901a-f6c3bf3e069f Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
|
@copilot CI tests are failing. Also, re-tested against the live Windows 11 machine, |
Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/c65e7b77-6fb5-464b-9116-c1beae548a01 Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/58955cb2-2f9a-4aed-b282-db3da18fc678 Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/f3815d96-286b-4323-9883-2f4e3f600712 Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
nla.c
Outdated
| enum | ||
| { | ||
| /* NTLM NegotiateFlags (subset used here) */ | ||
| NfUnicode = 0x00000001, /* NTLMSSP_NEGOTIATE_UNICODE */ |
There was a problem hiding this comment.
update the flag definition to use (1<<n) syntax so it is easier to perceive which bit number it sets.
There was a problem hiding this comment.
Done in acd19af — all seven flag constants now use (1<<N) notation.
…x flag defs Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/a71a69eb-c49f-4c88-887c-81bdcfaa1285 Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
... The hang at Phase D was caused by using CredSSP v2 (no clientNonce). Windows 11 authenticates NTLM (Phase A–C) but then drops the TLS connection before Phase D if the client didn't send a clientNonce in Phase A. Fixed in acd19af — upgraded to CredSSP v5:
... The "tls error" at Phase B is also caused by the CredSSP v2 issue — Windows 11 servers configured to require CredSSP v5 close the TLS connection immediately on receiving a v2 Phase A, before even sending Phase B. Fixed in acd19af (same CredSSP v5 upgrade described above). CI tests were passing on the latest commit (26c3a91 showed green); the upgrade to v5 in acd19af keeps all existing tests passing since |
Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/d1ad494a-0b72-42a2-8a93-ac27c8f4c124 Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
- Add getntargetinfo: extract TargetInfo AvPairs from NTLM Challenge - Add getavtimestamp: find MsvAvTimestamp in TargetInfo (for NTLMv2 blob) - Add ntv2frompasswd: compute NTLMv2 NT/LM responses and ExportedSessionKey (ResponseKeyNT = HMAC_MD5(NT_hash, UNICODE(uppercase(user)||domain)), NtProofStr = HMAC_MD5(ResponseKeyNT, svchal||blob), ExportedSessionKey = HMAC_MD5(ResponseKeyNT, NtProofStr)) - Modify mkntauth: accept variable-length NT response (NTLMv2 is >24 bytes); remove ESS flag conditional (NTLMv2 does not use NTLMSSP_NEGOTIATE_ESS) - Modify nlafinish: accept pre-computed ExportedSessionKey parameter instead of re-deriving from password (NTLMv2 key depends on NtProofStr) - Update nlahandshake: extract TargetInfo, generate 8-byte client challenge, call ntv2frompasswd, pass ExportedSessionKey to nlafinish; keep factotum mschap NTLMv1 fallback (24-byte response) for non-password auth paths - Update fns.h prototypes; update nla_test.c for new mkntauth signature Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/10669e98-e03f-4d33-8726-9303072cd21f Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/10669e98-e03f-4d33-8726-9303072cd21f Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
When the NTLM Challenge TargetInfo contains MsvAvTimestamp (AvId=7), MS-NLMP §3.1.5.1.2.3 requires the AUTHENTICATE_MESSAGE to include a MIC (Message Integrity Code). Without it, Windows accepts the NTLM authentication (logs event 4624) but closes the CredSSP TLS connection before sending Phase D pubKeyAuth. Changes: - ntv2frompasswd: build a modified TargetInfo copy for the blob by inserting MsvAvFlags=2 AvPair before the EOL (signals MIC is present). The server verifies NtChallengeResponse against the blob we send, so ExportedSessionKey is now derived from the modified TargetInfo. - mkntauth: add Version placeholder (8 zero bytes, offset 64) and MIC placeholder (16 zero bytes, offset 72) to AUTHENTICATE_MESSAGE; payload offsets shift from 64 to 88. - nlahandshake: save ntnego length in nnego; for NTLMv2 path, compute MIC = HMAC_MD5(ExportedSessionKey, nego||chal||auth_with_mic_zeroed) and fill ntauth[72..87] before writing Phase C. - nla_test.c: adjust minimum-size check 64→88. Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/45a843fa-a8f4-4cc4-8d17-6ab2320a0893 Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
… structure Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/89b1f853-b0d4-4e66-95b6-74ee95207650 Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
…SSP Phase D Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/c58a7288-50ba-4aeb-9212-a07ad4010bbb Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/c58a7288-50ba-4aeb-9212-a07ad4010bbb Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
… line 289) Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/ada06c42-774d-4807-b48c-eb04df00514e Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
…ch each off by one) Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/a7221936-776c-44a5-9d0f-357e79286335 Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
…) to NTLMv2 blob Root cause of Phase D hang: Windows 11 22H2 requires EPA (Extended Protection for Authentication). The NtChallengeResponse blob was missing MsvAvChannelBindings (AvId=10, TLS channel binding hash) and MsvAvTargetName (AvId=9, SPN like "TERMSRV/hostname") in its AvPairs. Changes: - dat.h: add char *server to Rdp struct (for SPN construction) - rd.c: set c->server = server (argv[0]) - nla.c: add tlscbind() to compute MD5(gss_channel_bindings_struct) from the server TLS cert per RFC 5929 "tls-server-end-point"; extend ntv2frompasswd() to accept cert/certlen/spn and insert MsvAvChannelBindings and MsvAvTargetName AvPairs before EOL; grow blob/mti buffers with MaxNTLMClientAvExtra; update NTv2RespMax - fns.h: update ntv2frompasswd declaration - rpc.c: build "TERMSRV/<host>" SPN from c->server (stripping dial prefix), pass c->tlscert/c->tlscertlen/spn to ntv2frompasswd; grow ntv2resp buffer Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/968fff8c-5204-42a2-b26c-77d99fab2021 Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/32ec66be-fb93-4ac8-8e37-ed2139f2522f Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
Agent-Logs-Url: https://github.com/yrk-lab/rd/sessions/9bb1fd7b-34b5-45f9-b5c8-33462261fc6a Co-authored-by: yrk-lab <11537279+yrk-lab@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.