cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
213
Views
1
Helpful
5
Replies

c1000 series switches failing vulnerability scans

cball111
Level 1
Level 1

I have three c1000 switches in my environment that are returning the following finding on our internal vulnerability scans:

 

   Name:Diffie-Hellman Ephemeral Key Exchange DoS Vulnerability (SSH, D(HE)ater)
   Severity:High
   CVE:CVE-2002-20001
   Description:The remote SSH server is supporting Diffie-Hellman ephemeral (DHE) Key Exchange (KEX) algorithms and thus could be prone to a denial of service (DoS) vulnerability.
The Diffie-Hellman Key Agreement Protocol allows remote attackers (from the client side) to send arbitrary numbers that are actually not public keys, and trigger expensive server-side DHE modular-exponentiation calculations, aka a D(HE)ater attack. The client needs very little CPU resources and network bandwidth. The attack may be more disruptive in cases where a client can require a server to select its largest supported key size. The basic attack scenario is that the client must claim that it can only communicate with DHE, and the server must be configured to allow DHE.
   Resolution:- DHE key exchange should be disabled if no other mitigation mechanism can be used and either elliptic-curve variant of Diffie-Hellman (ECDHE) or RSA key exchange is supported by the clients. The fact that RSA key exchange is not forward secret should be considered. - Limit the maximum number of concurrent connections in e.g. the configuration of the remote server. For OpenSSH this limit can be configured via the 'MaxStartups' option, for other products please refer to the manual of the product in question on configuration possibilities.

 

   Name:Diffie-Hellman Ephemeral Key Exchange DoS Vulnerability (SSL/TLS, D(HE)ater)
   Severity:High
   CVE:CVE-2002-20001, CVE-2022-40735
   Description:The remote SSL/TLS server is supporting Diffie-Hellman ephemeral (DHE) Key Exchange algorithms and thus could be prone to a denial of service (DoS) vulnerability.

This vulnerability allows remote attackers (from the client side) to send arbitrary numbers that are actually not public keys, and trigger expensive server-side DHE modular-exponentiation calculations, also known as a D(HE)ater attack.
There could be an increase in CPU usage in the affected component. For OpenSSH, users may observe
issues such as a slowdown in SSH connections.

- CVE-2002-20001: The Diffie-Hellman Key Agreement Protocol allows remote attackers (from the client side) to send arbitrary numbers that are actually not public keys, and trigger expensive server-side DHE modular-exponentiation calculations, aka a D(HE)ater attack. The client needs very little CPU resources and network bandwidth. The attack may be more disruptive in cases where a client can require a server to select its largest supported key size. The basic attack scenario is that the client must claim that it can only communicate with DHE, and the server must be configured to allow DHE.

- CVE-2022-40735: The Diffie-Hellman Key Agreement Protocol allows use of long exponents that arguably make certain calculations unnecessarily expensive, because the 1996 van Oorschot and Wiener paper found that '(appropriately) short exponents' can be used when there are adequate subgroup constraints, and these short exponents can lead to less expensive calculations than for long exponents. This issue is different from CVE-2002-20001 because it is based on an observation about exponent size, rather than an observation about numbers that are not public keys. The specific situations in which calculation expense would constitute a server-side vulnerability depend on the protocol (e.g., TLS, SSH, or IKE) and the DHE implementation details. In general, there might be an availability concern because of server-side resource consumption from DHE modular-exponentiation calculations. Finally, it is possible for an attacker to exploit this vulnerability and CVE-2002-20001 together.
   References:https://nvd.nist.gov/vuln/detail/CVE-2002-20001#vulnCurrentDescriptionTitle, https://github.com/Balasys/dheater
   Resolution:- DHE key exchange should be disabled if no other mitigation mechanism can be used and either elliptic-curve variant of Diffie-Hellman (ECDHE) or RSA key exchange is supported by the clients. The fact that RSA key exchange is not forward secret should be considered.

- Limit the maximum number of concurrent connections in e.g. the configuration of the remote server. For Postfix this limit can be configured via 'smtpd_client_new_tls_session_rate_limit' option, for other products please refer to the manual of the product in question on configuration possibilities.

I have searched for an answer to these issues and cant seem to find a way to remediate the issue. Please help!
Configs on all match the following:

#show run all | in ssh
ip ssh time-out 15
ip ssh authentication-retries 3
ip ssh window-size 8192
ip ssh break-string ~break
ip ssh version 2
ip ssh dh min size 4096
no ip ssh rekey time
no ip ssh rekey volume
ip ssh server authenticate user publickey
ip ssh server authenticate user keyboard
ip ssh server authenticate user password
no ip ssh server peruser session limit
ip ssh server certificate profile
ip ssh server algorithm mac hmac-sha2-256
ip ssh server algorithm encryption aes256-ctr
ip ssh server algorithm kex diffie-hellman-group14-sha1
ip ssh server algorithm hostkey x509v3-ssh-rsa ssh-rsa
ip ssh server algorithm authentication publickey keyboard password
ip ssh server algorithm publickey x509v3-ssh-rsa ssh-rsa
ip ssh client algorithm mac hmac-sha2-256 hmac-sha2-512 hmac-sha1 hmac-sha1-96
ip ssh client algorithm encryption aes128-ctr aes192-ctr aes256-ctr
ip ssh client algorithm kex diffie-hellman-group14-sha1
transport input ssh

#sh ip ssh | i KEX
KEX Algorithms:diffie-hellman-group14-sha1

sh ip ssh | i KEX
KEX Algorithms:diffie-hellman-group14-sha1
TBDENSW1#show ip ssh
SSH Enabled - version 2.0
Authentication methods:publickey,keyboard-interactive,password
Authentication Publickey Algorithms:x509v3-ssh-rsa,ssh-rsa
Hostkey Algorithms:x509v3-ssh-rsa,ssh-rsa
Encryption Algorithms:aes256-ctr
MAC Algorithms:hmac-sha2-256
KEX Algorithms:diffie-hellman-group14-sha1
Authentication timeout: 15 secs; Authentication retries: 3
Minimum expected Diffie Hellman key size : 4096 bits
IOS Keys in SECSH format(ssh-rsa, base64 encoded): TP-self-signed-1636251776
Modulus Size : 1024 bits




 

5 Replies 5

@cball111 change the key exchange:-

ip ssh server algorithm kex ecdh-sha2-nistp384 ecdh-sha2-nistp256  

 The second vulnerability refers to TLS/SSL, not SSH. If you are not using SSL then disable the HTTPS server:-

no ip http secure-server

 

Rob,

Thanks for reaching out. The first command gives me an error:
ip ssh server algorithm kex ecdh-sha2-nistp384 ecdh-sha2-nistp256
                                          ^
% Invalid input detected at '^' marker.

I was planning to disable http, just hadn't gotten to it yet - thanks for the reminder!

 

@cball111 you may need a software version upgrade then, what version are you running?

You can see what is supported by running:-

ip ssh server algorithm kex ?

Rob,

I am on the latest revision available for these devices. 

ip ssh server algorithm kex ?
diffie-hellman-group-exchange-sha1 DH_GRPX_SHA1 diffie-hellman key exchange algorithm
diffie-hellman-group14-sha1 DH_GRP14_SHA1 diffie-hellman key exchange algorithm



Switch Ports Model SW Version SW Image
------ ----- ----- ---------- ----------
* 1 52 C1000-48P-4G-L 15.2(7)E10 C1000-UNIVERSALK9-M

@cball111 unfortunately it looks like your switch does not support anything better than DH group 14. Cat 9K hardware supports the stronger KEX algorithms.

You could at least mitigate the vulnerablity by restricting SSH connections to the device with a VTY line ACL to trusted networks.

Review Cisco Networking for a $25 gift card