No credential. No certificate. No prior relationship. One IKE packet to UDP 500
or 4500, a certificate payload the daemon was not built to survive, and a
privileged process that holds every tunnel's keys.

Preconditions

An attacker needs an MX on an affected release; IKE enabled with an
RSA-signature policy (certificate authentication, not pre-shared keys); and
reachability to UDP 500 or 4500 on an interface that terminates IKE. On a carrier
edge that is usually the public side, because that is where the peers are.

A router that does not terminate certificate-based IPsec is not on this path.
The first response step is an inventory, not a panic.

The chain

1 — Find the door. Probe UDP 500. A response, or no ICMP port-unreachable,
indicates an IKE responder — ordinary discovery, not exploit traffic.

2 — Start a negotiation. Send an IKE Phase 1 message with a plausible
proposal and a certificate payload: a DER-encoded X.509 certificate, or something
claiming to be one. The daemon has authenticated nothing; it is about to parse
the document to find out who is calling.

3 — Overflow the parser. The certificate contains a field whose length
exceeds the stack buffer kmd copies it into. The copy is not bounded by the
destination, so the saved frame pointer and return address are overwritten.

4a — Crash. If the overwrite does not produce a usable hijack, kmd dies.
Every IPsec tunnel on the chassis drops at once. On a BNG, that is a mass
disconnection event.

4b — Control. If the overwrite is shaped correctly, the attacker gains
instruction-pointer control and executes code in kmd, with its privileges — root
on Junos.

5 — Collect. Root on the Routing Engine gives the configuration, IPsec keys
and certificates, AAA secrets, user accounts and routing policy.

6 — Persist. Add a user, change a key, alter a policy, install a scheduled
command. Junos configuration survives reboot, and a change through the
configuration database looks like an ordinary commit unless someone compares
against a baseline.

7 — Use the position. With the provider's keys and policy, the attacker can
decrypt or redirect traffic customers believe is encrypted, impersonate the
provider, or pivot into management systems that trust the router.

Steps 5 to 7 are inferred from what root on an edge router gives you. The advisory
documents the primitive, not a campaign; no proof of concept and no in-the-wild
exploitation were retrieved.

Two different incidents

Availability. kmd crashes, every tunnel drops, the router may recover, and
the first report is "IPsec is flapping". This is the outcome you notice.

Integrity. kmd keeps running, holding the attacker's code. IKE continues to
work for legitimate peers. No alarm fires. This is the outcome that matters, and
what "execute code as root" describes.

A crash is a denial of service; a silent compromise is a key compromise. The
first needs a restart and a patch, the second key rotation and forensic review.

What the attacker gets

Per device: the running configuration and its secrets; IPsec pre-shared keys and
certificate private keys; IKE identities and peer addresses; routing policy and
prefix filters; local accounts and AAA details; a root shell on the RE.

Per network: the ability to decrypt or redirect enterprise VPN traffic,
impersonate the provider, and pivot into the management network that trusts the
router. Blast radius is measured in customers, not devices — compromising an MX
compromises what customers bought.

What detection looks like

The primary signal is kmd crash and restart. Junos logs daemon restarts, and
a restart without a change ticket is a finding. Secondary signals: IKE packets
from non-peer addresses; malformed IKE or certificate payloads with unusual
lengths; new users, changed keys, modified policy; commits that do not match the
change board; core dumps attributed to kmd.

What is silent: a successful exploit that does not crash the daemon. The router
keeps forwarding, IKE keeps negotiating, and the only evidence is in the
configuration and the keys — which is why config integrity and key rotation are
remediation, not afterthought.

Next: Part 10 — the way out: patch the train, filter the IKE peers, rotate the
keys, and watch the daemon.