Skip to content
HackIndex logo

HackIndex

IKE Weak Transform Set Detection

4 min read Mar 30, 2026

A gateway that accepts weak cryptographic transforms exposes negotiated tunnels to decryption, and increases the probability that a cracked PSK leads to full session compromise. The presence of weak transforms is a separate finding from PSK cracking — even if a PSK is never cracked, a gateway accepting DES or DH group 2 is misconfigured and should be documented.

This page covers proving specific weak transforms are accepted. Transform enumeration is covered in IKE Transform Set Enumeration — run that first and bring the results here for classification.

What Counts as Weak

Algorithm

Status

Reason

DES (Enc=1)

Broken

56-bit key, trivially brute-forced

3DES (Enc=5)

Deprecated

112-bit effective security, slow, better options exist

MD5 (Hash=1)

Weak

Collision vulnerabilities, should not be used for authentication

SHA1 (Hash=2)

Deprecated

Collision vulnerabilities demonstrated, deprecated in most standards

DH Group 1 — modp768

Broken

768-bit, within range of nation-state precomputation

DH Group 2 — modp1024

Weak

1024-bit, widely considered inadequate, deprecated by RFC 8247

DH Group 5 — modp1536

Marginal

1536-bit, below current recommendations

Any gateway accepting DES, DH group 1, or DH group 2 has a clear misconfiguration finding. 3DES and SHA1 are weaker findings but still reportable as deprecated algorithm use.

Confirm Specific Weak Transforms

Test each weak combination individually to confirm the gateway accepts it:

DES with MD5 and PSK over DH group 1:

┌──(kali㉿kali)-[~]
└─$ sudo ike-scan --trans=1,1,1,1 $TARGET_IP
Explain command
--trans=1,1,1,1 Manually specify IKE transform: enc=DES, hash=MD5, auth=PSK, DH group=1
$TARGET_IP Target IP address to send IKE probes to

3DES with MD5 and PSK over DH group 2:

┌──(kali㉿kali)-[~]
└─$ sudo ike-scan --trans=5,1,1,2 $TARGET_IP
Explain command
--trans=5,1,1,2 Manually specify IKE transform: enc=3DES, hash=MD5, auth=preshared, DH=2
$TARGET_IP Target IP address to probe for IKE/ISAKMP service

3DES with SHA1 and PSK over DH group 2:

┌──(kali㉿kali)-[~]
└─$ sudo ike-scan --trans=5,2,1,2 $TARGET_IP
Explain command
--trans=5,2,1,2 Manually specify IKE transform: enc=3DES, hash=SHA1, auth=PSK, DH group=2
$TARGET_IP Target IP address variable for the IKE scan

AES-128 with MD5 (weak hash even with modern cipher):

┌──(kali㉿kali)-[~]
└─$ sudo ike-scan --trans=7,1,1,2 $TARGET_IP
Explain command
--trans=7,1,1,2 Specify IKE transform: Enc=3DES, Hash=MD5, Auth=pre-shared, DH Group=2
$TARGET_IP Target IP address variable for the IKE scan.

A Handshake returned response for any of these confirms that combination is accepted. Record the exact transforms that produce a handshake.

Confirm DH Group Weakness Specifically

Weak DH groups are independent of cipher strength. A gateway may use AES-256 but accept DH group 2 for the key exchange — the key exchange is the weak point. Test DH groups directly by varying only the group parameter:

┌──(kali㉿kali)-[~]
└─$ sudo ike-scan --trans=7,2,1,2 $TARGET_IP # AES with DH2
┌──(kali㉿kali)-[~]
└─$ sudo ike-scan --trans=7,2,1,5 $TARGET_IP # AES with DH5
┌──(kali㉿kali)-[~]
└─$ sudo ike-scan --trans=7,2,1,14 $TARGET_IP # AES with DH14 (acceptable)
Explain command
--trans=7,2,1,2 Transform: AES enc, SHA1 hash, pre-shared key auth, DH group 2
--trans=7,2,1,5 Transform: AES enc, SHA1 hash, pre-shared key auth, DH group 5
--trans=7,2,1,14 Transform: AES enc, SHA1 hash, pre-shared key auth, DH group 14
$TARGET_IP Target host IP address to send IKE probes to

If the gateway accepts DH group 2 but also DH group 14, document that both are accepted — the weak group creates a downgrade path.

Check for Downgrade Acceptance

A gateway that accepts both strong and weak transforms can be forced to negotiate the weaker one by an active attacker who can intercept and modify the initial proposal. Confirm this by verifying the gateway accepts at least one weak option:

┌──(kali㉿kali)-[~]
└─$ sudo ike-scan --trans=5,1,1,2 $TARGET_IP && echo "Weak transform accepted — downgrade possible"
Explain command
--trans=5,1,1,2 Specifies IKE transform: DES enc, MD5 hash, pre-shared key, DH group 2.
$TARGET_IP Target IP address variable for the IKE scan.

Document the Finding

For each accepted weak transform, record:

  • Exact transform string (e.g. Enc=3DES Hash=MD5 Auth=PSK Group=2)

  • Classification (broken / deprecated / weak)

  • Whether the auth method is PSK — weak transforms combined with PSK amplify the PSK cracking risk

Weak transforms accepted with PSK authentication feed directly into IKEv1 Aggressive Mode PSK Capture and Cracking and Weak Transform Set VPN Connection.

References