Case study
1. Metadata & Identification
| Field | Value |
|---|---|
| CVE ID | CVE-2022-40735 |
| Title | Diffie-Hellman Key Agreement Protocol: use of unnecessarily long private exponents |
| Vulnerability class (CWE) | CWE-400 Uncontrolled Resource Consumption (resource-exhaustion class) |
| CVSS 3.1 base score | 7.5 (High) |
| CVSS vector | AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| Impact dimension | Availability only (no confidentiality or integrity impact) |
| Attack vector | Network; no privileges, no user interaction |
| Affected technology | Any service offering ephemeral finite-field Diffie-Hellman (DHE): TLS, SSH, IKE/IPsec, and the OT services built on them (historian web front-ends, SCADA/HMI web UIs, OPC UA, and PLC/RTU embedded interfaces) |
| Associated attack name | D(HE)at |
| Related CVEs | CVE-2002-20001 (the D(HE)at attack), CVE-2024-41996 (additional implementation issue) |
| Public proof-of-concept | Yes. "D(HE)ater" (dheat), an open-source testing tool, is published on PyPI and GitLab under Apache-2.0 |
| Listed on CISA KEV | No |
| Document scope | OT/ICS exposure, attack path to a DMZ historian, and zone-aware remediation |
Why this vulnerability is tracked and studied even though it is availability-only, and no victim is named. The absence of a famous breach does not make this a minor issue, for four reasons. First, it is a protocol-level weakness, so a single vendor patch cannot fully close it; every organization that offers DHE must act on its own configuration. Second, a public, ready-to-run testing tool exists (D(HE)ater), so the barrier to exploitation is low. Third, the weakness is trivially discoverable: it appears in almost every routine TLS/SSH vulnerability scan, which is why it surfaces constantly in compliance and audit findings. Fourth, denial-of-service attacks are usually opportunistic and unattributed: victims rarely disclose a short outage, and attackers are rarely named, so "no public victim" reflects low reporting rather than low risk. For an OT operator, the relevant question is not "who else was hit" but "which of our servers would answer an attacker's handshake".
2. Executive Summary
CVE-2022-40735 is a weakness in the Diffie-Hellman (DH) key exchange, the handshake two machines use to agree on a shared secret when setting up an encrypted connection. The flaw lets a remote, unauthenticated attacker force a server to perform expensive cryptographic calculations on every handshake, while the attacker spends almost nothing. Flooded with handshake requests, the server's CPU saturates and the service stops responding. It is the implementation issue that amplifies the publicly named "D(HE)at" attack.
The impact is denial of service only: no data is stolen and no code is run. In an OT environment, however, availability is the priority asset. The same cheap attack can blind a data historian, cut off remote engineering access, or, against a weak field device, disturb the control loop itself. The attack needs no login, only network reachability to a service that offers DHE.
The central finding is therefore architectural rather than purely cryptographic: the mitigation is as much about who can reach the service as about which ciphers the service offers. Where the TLS/SSH stack can be reconfigured (most IT and DMZ servers), the fix is to disable finite-field DHE and move to ECDHE. Where it cannot (most lower-zone OT devices), the fix is segmentation and reachability control, so the vulnerable handshake is never offered to an attacker.
3. Technical Analysis & Root Cause
What the vulnerability exploits. It exploits the cost asymmetry of an ephemeral Diffie-Hellman (DHE) handshake. Completing, or even just starting, the key exchange is cheap for the client to request but expensive for the server to compute (a large modular exponentiation). The attacker weaponizes that imbalance.
Root cause. The Diffie-Hellman protocol, as commonly implemented, permits the use of unnecessarily long private exponents. Longer exponents make the server's modular-exponentiation step far more costly than it needs to be, which magnifies the per-handshake load an attacker can inflict. This is a resource-consumption flaw, not a memory-safety or logic flaw.
How exploitation works, step by step. (For background on the handshake itself, see Diffie-Hellman key exchange.)
- The attacker opens many connections to a server that allows DHE.
- Each connection triggers the DH step, performed cheaply on the attacker's side (short exponents, or simply firing handshake requests without completing them).
- The server is forced to perform the heavy modular exponentiation every time.
- Multiplied across thousands of requests, the server's CPU reaches saturation and legitimate requests are starved.
Two intuitive "fixes" that do not work, and why.
- Authentication and client certificates do not help. The server performs the DH computation before it verifies who the client is. The CPU is already spent by the time any identity check would occur.
- Shrinking the key does not help. Even a 2048-bit DH key remains exploitable, and smaller keys weaken the cryptography. The effective levers are the type of key exchange (finite-field DHE versus elliptic-curve ECDHE) and the private-exponent length, not the key size.
4. Proof of Concept (PoC) / Attack Vector
This section documents the attack-vector methodology, that is, the reconnaissance and the path, at the level needed for defensive planning. A public testing tool (D(HE)ater) implements the final flooding step; this document does not reproduce it.
4.1 Reconnaissance: finding a reachable DHE target
Reconnaissance is a funnel: each step's output is the next step's input, narrowing from "the whole organization" to "this one IP, port 443, offers DHE-RSA, weak CPU". The attacker is assumed to begin with only the domain name and the plant's physical location, and moves from passive (nothing touches the target) to active (brief, targeted probes).
Phase 1: Passive OSINT (no packets to the target)
| Resource / tool | Input | Output | Feeds the next step |
|---|---|---|---|
| WHOIS / RDAP (whois, DomainTools) | domain | Registrant org, contacts, name servers | Confirms ownership; contacts seed later phishing |
| ASN / netblock lookup (bgp.he.net, ARIN/RIPE/APNIC) | org name | Public IP ranges owned | The core target list (CIDR blocks) |
| DNS enumeration (dig, dnsrecon, dnsx, Amass, Subfinder) | domain | Subdomains and IPs such as vpn., remote., historian., pi., dmz., portal. | OT-flavored names point at DMZ and remote-access hosts |
| Certificate Transparency logs (crt.sh, Censys certs) | domain | Every TLS certificate issued, revealing hostnames never meant to be public | Reveals internal-ish names; confirms hosts that terminate TLS (DHE candidates) |
| Shodan / Censys / FOFA / ZoomEye | IP ranges, org, location | Pre-scanned inventory: open ports, banners, product/versions, TLS details, geo | Richest source; often names the historian product and shows DHE without scanning |
Search-engine dorking (Google/Bing operators, filetype:) | domain | Exposed portals, manuals, config leaks | Identifies the historian/SCADA vendor and exposed web UIs |
| Job boards + LinkedIn | org name, location | Postings naming "AVEVA PI / GE Proficy / Wonderware / Siemens WinCC"; staff roles | Reveals the exact OT stack and the engineers |
| GitHub / paste sites / breach dumps | org, domain | Leaked configs, endpoints, hardcoded hosts, old credentials | Internal hostnames, VPN endpoints, credentials for an IT pivot |
| Geolocation / maps / regional ISP | plant address | Regional ISP serving the site, imagery, site-specific netblock | Links the physical site to a specific IP range |
After Phase 1: candidate hostnames and IPs, a strong guess at the historian product and OT stack, likely VPN and remote-access endpoints, and named staff and vendors, all without sending a single packet.
Phase 2: Semi-passive enrichment (querying third parties, not the target)
- Scan-database pivoting: filter the org's netblocks in Shodan/Censys for
port:443,8443,5450(PI Web API),500/4500(IKE), andssl.cipherfields, yielding live, crypto-speaking hosts with banners. - Historical / passive DNS (SecurityTrails, PassiveTotal): IPs a hostname used to resolve to, exposing forgotten or staging hosts and hidden netblocks.
- Reverse-IP / virtual-host mapping: what else shares the IP, revealing the DMZ's neighbors.
Output: a narrowed set, for example historian.corp.example.com → 203.0.113.42, 443 open, cert CN mentions "PIWebAPI".
Phase 3: Active confirmation (the first detectable step)
| Tool | What it sends | Output | Decision it drives |
|---|---|---|---|
nmap (-sV, -Pn, scripts) | TCP connect / SYN to specific ports | Open ports, service and version, OS guess | Which hosts are live and what is listening |
nmap ssl-enum-ciphers / testssl.sh / sslscan | A few TLS handshakes | Full cipher list: whether DHE/DHE-RSA is offered, and DH parameter size | Go/no-go for D(HE)at |
| ssh-audit | One SSH handshake | Offered KEX algorithms including diffie-hellman-group* | Confirms SSH as a target |
| ike-scan | IKE probe to 500/4500 | VPN gateway present, DH groups supported | Confirms the VPN / remote-access target |
| CryptoLyzer / Scanigma | Protocol-aware handshake | DHE support across TLS/SSH, parameter details | Cross-protocol confirmation |
| whatweb / favicon hash | HTTP requests | Confirms the historian's web front-end and version | Confirms identity and CPU-class guess |
Recon funnel in one line each:
- Domain + location → WHOIS/ASN → IP ranges owned
- IP ranges → DNS + CT logs + Shodan → named hosts, products, DMZ/VPN endpoints
- Named hosts → job posts + dorking → confirmed OT stack
- Shortlist → nmap / testssl / ssh-audit → confirmed DHE + CPU class
- → Target selected for the D(HE)at flood
Teaching point: roughly 80% of this (Phases 1 and 2) is invisible to the defender. Only the brief Phase-3 probes touch the target, and they resemble ordinary internet background scanning. The target is often found not by a clever scan but by a hostname sitting in a certificate, a job post naming the product, or a stale NAT rule in Shodan. External-attack-surface management is therefore a root-cause control.
4.2 Attack Path: Internet → DMZ Historian → OT
Reference architecture (Purdue model):
Flow diagram: Internet → DMZ Historian → OT
Primary target: DMZ historian (dual-facing)- InternetInternetWhere the attacker starts.
- BoundaryPerimeter firewall / WAF
- L5 / L4Enterprise ITCorporate web, email, AD, user VPN.
- BoundaryIT → DMZ firewall
- L3.5 · OT DMZOT DMZHistorian (mirror) · remote-access jump host · patch/AV · vendor gateway. The historian pulls data up from L3.
- BoundaryDMZ → OT firewall
- L3Site operations (OT)Primary historian, SCADA servers, engineering-workstation services.
-
- L2HMI / supervisory
- L1PLC / RTU
- L0Field devices
The DMZ historian is the classic target because it is built to be dual-facing: IT users and dashboards pull from it, and it pulls production data up from the L3 historian. That makes it both reachable and consequential.
Ways to reach the DMZ (easiest to hardest):
- Directly published serviceA misconfiguration or a stale NAT rule exposes the DMZ host to the internet.
- Through the remote-access pathThe VPN or vendor-support gateway terminating at the DMZ is itself a DHE service, so reaching it is enough to flood its handshakes.
- IT pivotPhish an engineer or steal VPN credentials to land on IT, from where the IT→DMZ firewall allows business apps to query the historian.
- Supply-chain / vendor channelCompromise an integrator whose gateway holds a standing tunnel into the DMZ.
- Weak or flat segmentationA dual-homed host, a shared management VLAN, or an over-permissive rule makes the "internal-only" historian reachable. This is usually the real finding.
The attack step (D(HE)at). Once the server is reachable, the attacker opens many TLS/SSH/IKE connections, triggers the ephemeral-DH step on each, and forces the server to perform the heavy modular exponentiation repeatedly. A single modest sender can drive the target's CPU to saturation. There is no login, no payload, and no data access; the historian simply stops answering. Because this is a network-layer denial of service, reachability alone is the whole battle, which is why segmentation is the decisive control for the first step.
5. Impact Assessment
The blast radius depends entirely on which server is flooded.
| Target server (zone) | What it does | Impact when CPU-saturated | Reach into OT |
|---|---|---|---|
| DMZ historian (L3.5) | Mirrors production data up to IT | Reporting, KPIs, and compliance/batch records go blind; up-flow stalls | Shallow: OT keeps running, but operators and management lose visibility, with data gaps |
| Primary historian (L3) | System of record for all process data | Logging gaps; trends and alarms unreliable mid-event | Medium: no control loss, but decisions are blinded during an incident |
| Remote-access / jump host (L3.5) | Sanctioned IT→OT entry | Remote support and engineering cut off | Medium: no one can remote in to fix anything, forcing slow on-site response |
| Vendor gateway (L3.5) | Standing vendor tunnel | Vendor monitoring and managed services go blind | Medium: loss of oversight, missed predictive-maintenance signals |
| SCADA server (L3/L2) | Supervisory control and acquisition | HMIs may lag or lose the server link | High: operators may lose supervisory control and live view |
| HMI web UI (L2) | Operator window into the plant | Operator screen unresponsive | High: "flying blind" at the console |
| PLC/RTU embedded web/mgmt (L1) | Device config and diagnostics, sometimes comms | Tiny CPU; saturates fastest, may stall scan/comm | Highest: can disturb the control loop itself, with a potential trip or safety reaction |
Pattern: the deeper the zone, the smaller the CPU and the more directly it touches control. The same cheap flood escalates from "lost dashboards" at L3.5 to "disturbed control loop" at L1, and the attacker never defeated any authentication.
6. Remediation & Mitigation
The controls fall into four groups, applied together: fix the cryptography where you can, blunt the flood where you cannot, choose the right control for each zone, and wrap it in OT change-management.
6.1 Cryptographic fix: reconfigure the key exchange (where you control the server)
| Action | What it does | Note |
|---|---|---|
Disable finite-field DHE (!kDHE in the cipher string; remove diffie-hellman-group* from SSH KexAlgorithms; exclude modp* in IKE) | Stops the server from offering the expensive key-exchange method | This does not turn off encryption. DHE is only one way to agree the session key; with it disabled, the connection simply negotiates ECDHE instead, which provides the same confidentiality and the same forward secrecy, but using cheap elliptic-curve math. The connection stays fully encrypted; only the costly method is removed. It is a genuine remediation, not a trade-off against security. |
Prefer ECDHE and pin named curves (x25519:secp256r1:x448) | Makes elliptic-curve key exchange the default, so the per-handshake cost to the server is small | Keeps forward secrecy, unlike falling back to RSA key exchange |
| If DHE must stay: set a short private exponent (with safe-prime groups, per NIST SP 800-57) | Addresses the root cause (long exponents) by reducing the server's work per handshake | Partial mitigation only. Verify it took effect: OpenSSL 3.x with custom DH parameters can still use long exponents unless set explicitly. |
6.2 Traffic and resource controls: blunt the flood (where you cannot change the crypto)
Short, plain versions of each control:
- Rate-limit new connections per source, so one attacker cannot open thousands of handshakes. (SSH:
MaxStartups,PerSourceMaxStartups; Postfix: session-rate limits; strongSwan IKE:cookie_threshold,block_threshold.) - Make the client do work first, so the cost is no longer one-sided (proof-of-work or client-puzzle, where supported).
- Auto-block an IP that is clearly flooding (for example, Fail2Ban). Use carefully on shared or NAT addresses, which can affect many users at once.
- Put a strong, modern proxy in front of weak devices, so the proxy absorbs the handshake load instead of the fragile endpoint.
- Add DDoS and rate controls at the perimeter and at the firewalls between zones.
6.3 Zone-based mitigation: choose the right control per target
| Target & zone | Can you reconfigure its crypto? | Primary mitigation | Compensating controls |
|---|---|---|---|
| DMZ historian web front-end (L3.5) | Usually yes | Disable DHE, ECDHE-only; rate-limit | Hardened reverse proxy; restrict source IPs to known IT consumers |
| Remote-access / VPN gateway (L3.5) | Often yes | Exclude modp* IKE groups; enable IKE cookie and block thresholds | Firmware patch; IP/geo allow-listing; perimeter rate control |
| Vendor gateway (L3.5) | Sometimes (vendor-controlled) | Request vendor-side ECDHE and rate limits | Restrict the tunnel to specific endpoints; monitor handshakes |
| Primary historian / SCADA (L3/L2) | Often yes, under change control | ECDHE-only on management and comms TLS and SSH; connection limits | Test in a maintenance window; segment so only HMIs and eng-stations can reach it |
| HMI web UI (L2) | Sometimes (embedded) | Harden if the device allows; otherwise front it with a proxy | Restrict to the operator VLAN; ACL to named stations |
| PLC / RTU embedded service (L1) | Usually no (fixed firmware) | Isolation is the mitigation | Never expose; allow-list only engineering stations; block all other sources; monitor for scan and flood |
Rule of thumb: the deeper the zone, the less you can fix the cryptography and the more you must fix the reachability. At L3.5 you re-key the server; at L1 you make sure the attacker can never send it a handshake.
6.4 OT process controls: change management and verification
- Change control. Any TLS/SSH reconfiguration on a production SCADA server or historian goes through dual approval and a tested maintenance window, because a bad cipher change can break legitimate HMI-to-server communication.
- Legacy reality. Some devices speak only DHE and cannot be updated. For those, isolation plus a fronting proxy is the only answer; document them as accepted-risk-with-compensating-control.
- Verify, do not assume. Re-run
testssl.sh,ssh-audit, or CryptoLyzer after changes to confirm DHE is gone and ECDHE is in use. - Detection. Deploy IDS and flow rules for handshake floods and OT-port scanning, plus CPU-utilization alerting on fragile endpoints, so an attempt surfaces instead of degrading service quietly.
One-line summary: you cannot authenticate or key-size your way out of D(HE)at. Where you own the TLS stack, switch finite-field DHE off and use ECDHE; where you do not (most of OT's lower zones), the mitigation is reachability: segment, allow-list, proxy, and rate-limit, so the vulnerable handshake is never offered to an attacker.
7. References & Credits
Credits. The D(HE)at attack and the D(HE)ater proof-of-concept tool are the work of Szilárd Pfeiffer (Balasys). The attack is assigned under CVE-2002-20001, with CVE-2022-40735 and CVE-2024-41996 as contributing implementation issues. MITRE ATT&CK for ICS is maintained by MITRE.
References.
- NVD: CVE-2022-40735 (Diffie-Hellman Key Agreement Protocol)
- D(HE)at attack project and its mitigations page
- D(HE)ater proof-of-concept tool (PyPI)
- Related: CVE-2002-20001 (the D(HE)at attack), CVE-2024-41996
- wolfSSL: "DHE Vulnerability of CVE-2022-40735"
- Fortinet: Technical Tip, Definition of CVE-2022-40735
- Greenbone forum: Diffie-Hellman Ephemeral KEX DoS
- Mozilla SSL Configuration Generator (hardening syntax)
- NIST SP 800-57 Part 1 (key-size guidance)
- Diffie-Hellman key exchange (background)
- Purdue Enterprise Reference Architecture (Purdue model)
- MITRE ATT&CK for ICS: Reconnaissance, Initial Access (TA0108), Discovery (TA0102)
Security case study · Industrial & OT Cybersecurity · Published Jun 20, 2026