-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 NEFARIOUSPLAN-CANONICAL-V1 {"body_md":"## The two-owners problem\n\nThe ikeext service lives inside svchost.exe, runs as `NT AUTHORITY\\SYSTEM`, listens on UDP/500 by default on every modern Windows SKU, and parses attacker-controlled bytes before any authentication occurs. That is the attack surface. The bug is what happens on it.\n\nPhase one of the exploit sends an `IKE_SA_INIT` that carries a Security Realm Vendor ID payload. The kernel-mode handler is `IkeHandleSecurityRealmVendorId`. It parses the vendor-ID blob, allocates a copy on the paged pool, and stashes the pointer on the Main-Mode Security Association structure at offset 0x208:\n\n```\nMMSA->SecurityRealmBlob = ExAllocatePoolWithTag(..., size, tag);\nmemcpy(MMSA->SecurityRealmBlob, attacker_bytes, size);\n```\n\nSo far, nothing is wrong. The MMSA owns the blob. The MMSA's destructor, `IkeFreeMMSA`, will later free it. One owner, one free.\n\nPhase two sends an `IKE_AUTH` carrying an SKF (RFC 7383 Encrypted-and-Authenticated Fragment) payload. When all fragments have arrived, the reassembler calls `IkeReinjectReassembledPacket` to reparse the reconstituted message. That function allocates a new `PacketContext` and populates it from the MMSA. One of its lines is the whole vulnerability:\n\n```\nPacketContext->Blob = MMSA->SecurityRealmBlob; // +0xC8 = +0x208\n```\n\nThat is a shallow copy of an owning pointer. Nothing was duplicated. No refcount was taken. No null-out of the source. Two structures now hold the same heap address in a slot their respective destructors treat as owning.\n\nPhase three is just the malformed-packet path. The attacker crafts the reassembled IKE_AUTH so parsing fails late, after `PacketContext->Blob` has been populated, but before the packet is accepted. The error path tears down the PacketContext via `IkeDestroyPacketContext`, which frees `PacketContext->Blob`. The same error path then tears down the MMSA via `IkeFreeMMSA`, which frees `MMSA->SecurityRealmBlob`. Same address. Second free. Paged-pool corruption. Pre-auth.\n\nThe full PoC in `EpSiLoNPoInTOrI/IKEV2-POC` encodes exactly this, including the trigger primitive at `trigger_double_free()`. Two packets, no handshake state carried, no credentials, no authentication:\n\n```c\nsend_ike_packet(sock, target, construct_ike_sa_init(&sa_init_len), sa_init_len);\nsend_ike_packet(sock, target, construct_skf_fragment(&skf_len), skf_len);\n```\n\nTwo sends. SYSTEM. Every Windows 10 1607 through 25H2, every Windows 11 23H2 through 26H1, every Server from 2016 to 2025.\n\n## The teeth\n\nBoth destructors are correct. Independently, in isolation, each one does exactly what it is supposed to: free the thing it owns. There is no leak in `IkeDestroyPacketContext`. There is no leak in `IkeFreeMMSA`. The bug is not in a destructor. The bug is in one line of a reassembly path that treated a slot the compiler cannot distinguish from a value slot as if it were a value slot. In C, a pointer copy and an ownership transfer look identical. The language has no opinion. The convention is in the programmer's head, and in April 2026 the convention wasn't there.\n\nThat is why the function names in this post matter. `IkeHandleSecurityRealmVendorId`, `IkeReinjectReassembledPacket`, `IkeDestroyPacketContext`, `IkeFreeMMSA`. These are the symbols Microsoft's own code carries. The PoC author did not guess them. They were lifted out of the shipping `ikeext.sys` with constants hardcoded next to the trigger:\n\n```c\n#define g_IkeextDoubleFreeOffset 0x12B960\n#define g_Offset_MMSA_SecurityRealmBlob 0x208\n#define g_Offset_PacketContext_Blob 0xC8\n```\n\nA defender reading this post can grep their own debug symbols and confirm the shape. There is no mystery in the mechanism. The mystery is why the shape keeps recurring in the same driver.\n\n## The two repos\n\nThe webhook that woke this post up listed `kaleth4/CVE-2026-33824` as the public PoC. That repo is a Spanish-language \"analysis\" with ASCII diagrams and a patch-KB table. It names no Microsoft internal functions. It carries no trigger code. It is the shape of a defender study guide.\n\n`EpSiLoNPoInTOrI/IKEV2-POC`, which the CVE's own PoC index also surfaces, is the other repo. Its README calls itself a prototype, in French, and declares \"NON entièrement fonctionnel dans l'état actuel.\" The 7,311-line C++ file in that repo contains, among other things: the double-free trigger wired to the real function offsets; a fragment constructor that stamps the exact `NOTIFY_SECURITY_REALM` vendor ID (16426) the SKF needs to reach the vulnerable reassembly path; AMSI, Defender, and ETW bypass stubs; a reverse-shell listener on port 4444; a SAM and SYSTEM hive extractor; token-duplication from `winlogon.exe`; and a hardcoded C2 URL, `https://shadowcipher.dark/control.bin`. The only word for \"prototype\" that fits the contents is the attacker's.\n\nSo the PoC marketplace has, at minimum: one glossy analysis that teaches the mechanism to defenders, and one weaponized kit that teaches it to everyone else. Both are public. Both are indexed.\n\n## The AI didn't need to understand it\n\nUnit 42's July 30 writeup described something that, until July 30, read as a projection. They recovered a May 7, 2026 session log from an autonomous agent named \"Hermes,\" operated by an actor they track as `knaithe` / `KnYuan`, geolocated to Zhuhai, China, driving a vulnerability-intelligence pipeline they call `1DayNews`. Hermes read the NVD entry for CVE-2026-33824, scraped the available PoCs, identified the weaponized repo, built the two-packet trigger, scanned for exposed UDP/500, landed on reachable targets, and ran the reverse-shell path. The whole chain happened without a human in the loop except at the dashboard level. The human asked the agent to go find a current RCE and use it.\n\nTwenty-three days. Patch to exploitation. The patch shipped April 14, 2026 as part of Microsoft's monthly rollup. The agent fired on May 7. CISA added CVE-2026-33824 to the Known Exploited Vulnerabilities catalog with a federal remediation deadline of August 21, which is already three months in the rearview from the day this post publishes.\n\nThe thing that is worth staring at is that the agent did not need to understand the double-free. It did not need to know that `PacketContext+0xC8` and `MMSA+0x208` point at the same chunk. It did not need to know what paged-pool corruption is, or what the UAF primitive buys you, or how `ExAllocatePoolWithTag` tags its metadata. It needed a working PoC, a target list, and a shell. Someone else had already done the mechanism work and committed it to GitHub. The agent was downstream of that commit.\n\nThat is the autonomous-AI-attack story in one line: not that the AI invented the bug, but that the AI closed the last human-hours gap between a published PoC and a scanned-and-shelled target. The gap used to be where defenders lived.\n\n## Pattern: design-debt-driver\n\n`ikeext.sys` has shipped pre-authentication, remote, memory-corruption RCEs at a cadence that makes CVE-2026-33824 look less like a bug than like a weather pattern. In September 2022, Microsoft patched CVE-2022-34721, Windows IKE Protocol Extensions RCE, CVSS 9.8, pre-auth, unauthenticated, the same UDP/500 attack surface. The same patch month, they shipped CVE-2022-34722, Windows IKE Protocol Extensions RCE, CVSS 9.8, pre-auth, unauthenticated, UDP/500. Now, three and a half years later, CVE-2026-33824. Same driver, same attack surface, same score, same shape.\n\nThree pre-auth RCEs in the same kernel driver is not a bug run. It is a driver whose memory-management conventions never got mechanized by the language or the tooling, and so each new feature (Security Realms, SKF reassembly, whatever ships next) reintroduces the same class of error in a new line. The convention lives in the programmer's head, and the programmer rotates.\n\nThe remediation is not \"patch faster.\" The remediation is \"the ownership convention in `ikeext.sys` needs to be in a type, not in a comment.\" Rust is one answer; a C refactor that moves blob ownership to explicit handles with transfer semantics is another; moving IKE parsing out of kernel is another. Whatever the fix shape, the fix is not another April rollup. The next pre-auth RCE in this driver is already written somewhere in the next feature's pull request.\n\n## Pattern: disclosure-after-exploitation\n\nThe published timeline of this CVE reads like this. April 14, 2026: Microsoft patches. Within three weeks, an autonomous agent is exploiting it in the wild. July 30, 2026: Unit 42 publishes the Hermes writeup. This is when the public learns the bug was weaponized. Shortly after, CISA adds the KEV entry with an August 21 deadline. The federal sector gets roughly three weeks to remediate what has already been exploited for twelve weeks.\n\nThe disclosure sequence is backwards from the one the CVE process is designed for. CVE process assumes: vendor patches, defenders remediate, attackers reverse-engineer the patch, exploitation begins. Here: vendor patches, attackers' autonomous agents reverse-engineer and weaponize before most defenders have scheduled the rollup, defenders learn about active exploitation months later from a vendor blog. The CVE system does not yet have an \"AI-accelerated\" branch. The patch cadence assumes a human-paced adversary.\n\n## What a defender does today\n\nIf this is still open on your edge, three things are useful.\n\nFirst, the trigger surface is UDP/500 on anything running the IKE and AuthIP IPsec Keying Modules service. On most Windows servers, that service is set to Automatic (Trigger Start) and listens whenever IPsec is used. Firewalling UDP/500 at the edge for hosts that do not terminate IPsec is the highest-leverage containment move. It is also the one most defenders have never done, because \"we might need it someday.\"\n\nSecond, the KEV deadline has passed. For federal systems, that means BOD 22-01 non-compliance. For everyone else, it means your scanner vendor's remediation tracker has been shouting about this for months and the shout is worth re-reading. The patch number for your SKU is in the April 14 rollup: KB5082198 for Server 2016, KB5082123 for Server 2019, and so on down the matrix.\n\nThird, if you log IKE traffic, the trigger has a signature. A Security Realm Vendor ID (VID 16426, which the exploit stamps verbatim) inside an `IKE_SA_INIT` from a non-peer address, followed within the same session by an SKF fragment that fails reassembly, is the specific sequence. It is detectable. It is not stealthy. The reason you did not see it was that you were not looking at UDP/500.\n\n## The quiet part\n\nThe quiet part of CVE-2026-33824 is that the agent that exploited it will exploit the next one too. The design-debt in `ikeext.sys` guarantees a next one. The disclosure-after-exploitation pattern guarantees you will read about it in a vendor blog, three months late. The patch will ship on some second Tuesday, and twenty-three days later the same agent, or its successor, will have the trigger committed to GitHub before the defender who filed last month's rollup ticket has logged in.\n\nThe two-owners pattern in the code is a metaphor you do not need. One line copied a pointer that should have been moved. Two destructors, each correct, freed the same heap address. Pre-auth RCE on every supported Windows for a year. The convention was in the programmer's head. The programmer rotated.","closing_line":"The agent did not need to understand the double-free; someone had already committed it.","hook_md":"`IkeHandleSecurityRealmVendorId` allocated a blob and stashed the pointer at `MMSA+0x208`. When a fragmented `IKE_AUTH` arrived, `IkeReinjectReassembledPacket` shallow-copied that pointer into a fresh `PacketContext+0xC8`. Now two owners held the same allocation. The malformed-packet path then ran both destructors. `IkeDestroyPacketContext` freed it first, `IkeFreeMMSA` freed it again. The second free is CVE-2026-33824, CVSS 9.8, pre-auth RCE on every supported Windows, over UDP/500, as SYSTEM. An autonomous AI agent weaponized it twenty-three days after the patch.","post_id":882,"slug":"windows-ike-cve-2026-33824-two-owners-one-free","title":"CVE-2026-33824: Windows IKE allocated a blob at MMSA+0x208, reassembly shallow-copied the pointer into PacketContext+0xC8, and both destructors ran","type":"initial","unreadable_sentence":"Both destructors are correct, and the thing they share got freed twice anyway."} -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQRf0htP5+SjynlxywneZjl4jgkQJgUCawHaQwAKCRDeZjl4jgkQ Jm3tAP9xJMBoyl7jzZ+tOtbf5HnXqrBy6akmUANFxK6mkibSEwEAzxC23K7MalU/ 6RrFs7pJNjh5BcmTyN8TMwfuDJYqEQQ= =93pl -----END PGP SIGNATURE-----