# IKE Weak Transform Set Detection

- **URL:** https://hackindex.io/services/ike/vulnerability-discovery/ike-weak-transform-sets
- **Path:** IKE > Vulnerability Discovery
- **Up:** [Vulnerability Discovery](https://hackindex.io/services/ike/vulnerability-discovery.md)
- **Published:** 2026-03-16
- **Updated:** 2026-03-30

## IKE Weak Cipher Detection

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](https://hackindex.io/services/ike/enumeration/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:

```bash
sudo ike-scan --trans=1,1,1,1 $TARGET_IP
```

3DES with MD5 and PSK over DH group 2:

```bash
sudo ike-scan --trans=5,1,1,2 $TARGET_IP
```

3DES with SHA1 and PSK over DH group 2:

```bash
sudo ike-scan --trans=5,2,1,2 $TARGET_IP
```

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

```bash
sudo ike-scan --trans=7,1,1,2 $TARGET_IP
```

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:

```bash
sudo ike-scan --trans=7,2,1,2 $TARGET_IP    # AES with DH2
sudo ike-scan --trans=7,2,1,5 $TARGET_IP    # AES with DH5
sudo ike-scan --trans=7,2,1,14 $TARGET_IP   # AES with DH14 (acceptable)
```

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:

```bash
sudo ike-scan --trans=5,1,1,2 $TARGET_IP && echo "Weak transform accepted: downgrade possible"
```

## 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](https://hackindex.io/services/ike/exploitation/ike-aggressive-mode-psk-capture) and [Weak Transform Set VPN Connection](https://hackindex.io/services/ike/exploitation/ike-weak-cipher-connection).

## References

- [RFC 8247: Algorithm Implementation Requirements for IKEv2](https://www.rfc-editor.org/rfc/rfc8247) - Defines which algorithms are required, recommended, and deprecated for IKE
- [NTA Monitor: ike-scan](https://www.nta-monitor.com/tools-resources/security-tools/ike-scan) - --trans flag syntax and attribute value reference
