OT / ICS security research · Case study

D(HE)at Denial-of-Service via Diffie-Hellman

(CVE-2022-40735)

  • Industrial & OT Cybersecurity
  • Published
  • 16 min read

CVSS 3.1 base score

7.5/10

High

Availability impact only · Network · No privileges

Case study

1. Metadata & Identification

FieldValue
CVE IDCVE-2022-40735
TitleDiffie-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 score7.5 (High)
CVSS vectorAV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Impact dimensionAvailability only (no confidentiality or integrity impact)
Attack vectorNetwork; no privileges, no user interaction
Affected technologyAny 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 nameD(HE)at
Related CVEsCVE-2002-20001 (the D(HE)at attack), CVE-2024-41996 (additional implementation issue)
Public proof-of-conceptYes. "D(HE)ater" (dheat), an open-source testing tool, is published on PyPI and GitLab under Apache-2.0
Listed on CISA KEVNo
Document scopeOT/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.)

  1. The attacker opens many connections to a server that allows DHE.
  2. Each connection triggers the DH step, performed cheaply on the attacker's side (short exponents, or simply firing handshake requests without completing them).
  3. The server is forced to perform the heavy modular exponentiation every time.
  4. 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 / toolInputOutputFeeds the next step
WHOIS / RDAP (whois, DomainTools)domainRegistrant org, contacts, name serversConfirms ownership; contacts seed later phishing
ASN / netblock lookup (bgp.he.net, ARIN/RIPE/APNIC)org namePublic IP ranges ownedThe core target list (CIDR blocks)
DNS enumeration (dig, dnsrecon, dnsx, Amass, Subfinder)domainSubdomains 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)domainEvery TLS certificate issued, revealing hostnames never meant to be publicReveals internal-ish names; confirms hosts that terminate TLS (DHE candidates)
Shodan / Censys / FOFA / ZoomEyeIP ranges, org, locationPre-scanned inventory: open ports, banners, product/versions, TLS details, geoRichest source; often names the historian product and shows DHE without scanning
Search-engine dorking (Google/Bing operators, filetype:)domainExposed portals, manuals, config leaksIdentifies the historian/SCADA vendor and exposed web UIs
Job boards + LinkedInorg name, locationPostings naming "AVEVA PI / GE Proficy / Wonderware / Siemens WinCC"; staff rolesReveals the exact OT stack and the engineers
GitHub / paste sites / breach dumpsorg, domainLeaked configs, endpoints, hardcoded hosts, old credentialsInternal hostnames, VPN endpoints, credentials for an IT pivot
Geolocation / maps / regional ISPplant addressRegional ISP serving the site, imagery, site-specific netblockLinks 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), and ssl.cipher fields, 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)

ToolWhat it sendsOutputDecision it drives
nmap (-sV, -Pn, scripts)TCP connect / SYN to specific portsOpen ports, service and version, OS guessWhich hosts are live and what is listening
nmap ssl-enum-ciphers / testssl.sh / sslscanA few TLS handshakesFull cipher list: whether DHE/DHE-RSA is offered, and DH parameter sizeGo/no-go for D(HE)at
ssh-auditOne SSH handshakeOffered KEX algorithms including diffie-hellman-group*Confirms SSH as a target
ike-scanIKE probe to 500/4500VPN gateway present, DH groups supportedConfirms the VPN / remote-access target
CryptoLyzer / ScanigmaProtocol-aware handshakeDHE support across TLS/SSH, parameter detailsCross-protocol confirmation
whatweb / favicon hashHTTP requestsConfirms the historian's web front-end and versionConfirms identity and CPU-class guess

Recon funnel in one line each:

  1. Domain + location → WHOIS/ASN → IP ranges owned
  2. IP ranges → DNS + CT logs + Shodan → named hosts, products, DMZ/VPN endpoints
  3. Named hosts → job posts + dorking → confirmed OT stack
  4. Shortlist → nmap / testssl / ssh-audit → confirmed DHE + CPU class
  5. → 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)
  1. InternetInternetWhere the attacker starts.
  2. BoundaryPerimeter firewall / WAF
  3. L5 / L4Enterprise ITCorporate web, email, AD, user VPN.
  4. BoundaryIT → DMZ firewall
  5. L3.5 · OT DMZOT DMZHistorian (mirror) · remote-access jump host · patch/AV · vendor gateway. The historian pulls data up from L3.
  6. BoundaryDMZ → OT firewall
  7. L3Site operations (OT)Primary historian, SCADA servers, engineering-workstation services.
    1. L2HMI / supervisory
    2. L1PLC / RTU
    3. 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):

  1. Directly published serviceA misconfiguration or a stale NAT rule exposes the DMZ host to the internet.
  2. 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.
  3. 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.
  4. Supply-chain / vendor channelCompromise an integrator whose gateway holds a standing tunnel into the DMZ.
  5. 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 doesImpact when CPU-saturatedReach into OT
DMZ historian (L3.5)Mirrors production data up to ITReporting, KPIs, and compliance/batch records go blind; up-flow stallsShallow: OT keeps running, but operators and management lose visibility, with data gaps
Primary historian (L3)System of record for all process dataLogging gaps; trends and alarms unreliable mid-eventMedium: no control loss, but decisions are blinded during an incident
Remote-access / jump host (L3.5)Sanctioned IT→OT entryRemote support and engineering cut offMedium: no one can remote in to fix anything, forcing slow on-site response
Vendor gateway (L3.5)Standing vendor tunnelVendor monitoring and managed services go blindMedium: loss of oversight, missed predictive-maintenance signals
SCADA server (L3/L2)Supervisory control and acquisitionHMIs may lag or lose the server linkHigh: operators may lose supervisory control and live view
HMI web UI (L2)Operator window into the plantOperator screen unresponsiveHigh: "flying blind" at the console
PLC/RTU embedded web/mgmt (L1)Device config and diagnostics, sometimes commsTiny CPU; saturates fastest, may stall scan/commHighest: 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)

ActionWhat it doesNote
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 methodThis 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 smallKeeps 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 handshakePartial 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 & zoneCan you reconfigure its crypto?Primary mitigationCompensating controls
DMZ historian web front-end (L3.5)Usually yesDisable DHE, ECDHE-only; rate-limitHardened reverse proxy; restrict source IPs to known IT consumers
Remote-access / VPN gateway (L3.5)Often yesExclude modp* IKE groups; enable IKE cookie and block thresholdsFirmware patch; IP/geo allow-listing; perimeter rate control
Vendor gateway (L3.5)Sometimes (vendor-controlled)Request vendor-side ECDHE and rate limitsRestrict the tunnel to specific endpoints; monitor handshakes
Primary historian / SCADA (L3/L2)Often yes, under change controlECDHE-only on management and comms TLS and SSH; connection limitsTest 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 proxyRestrict to the operator VLAN; ACL to named stations
PLC / RTU embedded service (L1)Usually no (fixed firmware)Isolation is the mitigationNever 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.

Security case study · Industrial & OT Cybersecurity · Published Jun 20, 2026

Back to top ↑

Back to all case studies