How to change Diffle-Hellman Modulus setting on Cisco ASA
Recently our auditor has observed vulnerability in our Cisco ASA firewall and asked us to fix the issue. The reported issue was SSL/TLS Diffie-Hellman Modulus <= 1024 Bits (Logjam) is used in ASA. In our case, DH-Group 2 was used for AnyConnect connection.
The risk of using 1024 Bits Diffie-Hellman Modulus is SSL/TLS connection can be established by remote host.
Proposed solution by Audit team was to use Diffie Hellman Modulus 2048 bit or higher. This article explains how to change Diffie Hellman Modulus setting.
How to check what group of Diffle-Hellman is used
Firstly, let’s check actually which DH-Group is configured on your ASA. It can be checked by the sh ssl command.
As you can see on the high-lighted line, DH Group group2 (1024-bit modulus) is configured.
Accept connections using SSLv3 or greater and negotiate to TLSv1 or greater
Start connections using TLSv1 and negotiate to TLSv1 or greater
SSL DH Group: group2 (1024-bit modulus)
SSL ECDH Group: group19 (256-bit EC)
SSL trust-points:
Self-signed (RSA 2048 bits RSA-SHA256) certificate available
Self-signed (EC 256 bits ecdsa-with-SHA256) certificate available
Interface outside: AnyConnect (RSA 2048 bits RSA-SHA256)
Interface phonoscope: ASDM_TrustPoint1 (RSA 2048 bits RSA-SHA256)
Interface cogent: ASDM_TrustPoint1 (RSA 2048 bits RSA-SHA256)
Interface inside: ASDM_TrustPoint1 (RSA 2048 bits RSA-SHA256)
Interface dmz: ASDM_TrustPoint1 (RSA 2048 bits RSA-SHA256)
Certificate authentication is not enabled
Version of Diffle-Hellman is available for your ASA
Now, let’s check what options are available.
See the command output below. I will change it to group14, which has 2048-bit modulus.
configure mode commands/options:
group1 Configure DH group 1 – 768-bit modulus
group2 Configure DH group 2 – 1024-bit modulus
group5 Configure DH group 5 – 1536-bit modulus
group14 Configure DH group 14 – 2048-bit modulus, 224-bit prime order
subgroup (FIPS)
group24 Configure DH group 24 – 2048-bit modulus, 256-bit prime order
subgroup (FIPS)
Change Diffle-Hellman’s group
With the command above, the DH-Group has been changed to group14.
Check current AnyConnect session
Remember, AnyConnect session will be dropped once you change DH-Group. So, before you issue the command above, let’s check if there is any AnyConnect sessions exist.
If there is no sessions, you will see the similar command output like below.
INFO: There are presently no active sessions of the type specified
If there is any sessions, the command output would be like below.
Session Type: AnyConnect
Username : wsmith Index : 3232
Assigned IP : 10.0.31.1 Public IP : 128.121.32.4
Protocol : AnyConnect-Parent SSL-Tunnel DTLS-Tunnel
License : AnyConnect Premium
Encryption : AnyConnect-Parent: (1)none SSL-Tunnel: (1)AES-GCM-256 DTLS-Tunnel: (1)AES256
Hashing : AnyConnect-Parent: (1)none SSL-Tunnel: (1)SHA384 DTLS-Tunnel: (1)SHA1
Bytes Tx : 95602 Bytes Rx : 71229
Group Policy : GroupPolicy_anyconnect
Tunnel Group : anyconnect
Login Time : 11:55:54 CST Fri Jan 10 2020
Duration : 0h:38m:02s
Inactivity : 0h:00m:00s
VLAN Mapping : N/A VLAN : none
Audt Sess ID : 0a001e0100ca00005e18baaa
Security Grp : none