简介
本文档介绍如何在ASA上禁用SSH服务器CBC模式密码。在扫描漏洞CVE-2008-5161上,记录了在密码块链(CBC)模式下使用分组密码算法,使得远程攻击者能够更轻松地通过未知矢量从SSH会话中的任意密码文本块恢复某些明文数据。
密码块链(CBC)是密码块的一种操作模式,该算法使用分组密码来提供诸如机密性或真实性之类的信息服务。
先决条件
要求
Cisco 建议您了解以下主题:
使用的组件
本文档中的信息基于带OS 9.6.1的Cisco ASA 5506。
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您的网络处于活动状态,请确保您了解所有命令的潜在影响。
问题
默认情况下,在ASA CBC模式上,ASA上启用,这可能是客户信息的漏洞。
解决方案
在增强CSCum63371后,9.1(7)版引入了修改ASA ssh密码的功能,但正式具有ssh cipher encryption和ssh cipher integrity命令的版本是9.6.1。
要在SSH上禁用CBC模式密码,请遵循以下步骤:
在ASA上运行“sh run all ssh”:
ASA(config)# show run all ssh
ssh stricthostkeycheck
ssh 0.0.0.0 0.0.0.0 outside
ssh timeout 60
ssh version 2
ssh cipher encryption medium
ssh cipher integrity medium
ssh key-exchange group dh-group1-sha1
如果您看到命令ssh cipher encryption medium,这表示ASA使用默认在ASA上设置的中高强度密码。
要查看ASA中可用的ssh加密算法,请运行命令show ssh ciphers:
ASA(config)# show ssh ciphers
Available SSH Encryption and Integrity Algorithms Encryption Algorithms:
all: 3des-cbc aes128-cbc aes192-cbc aes256-cbc aes128-ctr aes192-ctr aes256-ctr
low: 3des-cbc aes128-cbc aes192-cbc aes256-cbc aes128-ctr aes192-ctr aes256-ctr
medium: 3des-cbc aes128-cbc aes192-cbc aes256-cbc aes128-ctr aes192-ctr aes256-ctr
fips: aes128-cbc aes256-cbc
high: aes256-cbc aes256-ctr
Integrity Algorithms:
all: hmac-sha1 hmac-sha1-96 hmac-md5 hmac-md5-96
low: hmac-sha1 hmac-sha1-96 hmac-md5 hmac-md5-96
medium: hmac-sha1 hmac-sha1-96
fips: hmac-sha1
high: hmac-sha1
输出显示所有可用的加密算法: 3des-cbc aes128-cbc aes192-cbc aes256-cbc aes128-ctr aes192-ctr aes256-ctr。
要禁用CBC模式,以便在SSH配置中使用它,请使用以下命令自定义要使用的加密算法:
ssh cipher encryption custom aes128-ctr:aes192-ctr:aes256-ctr
完成此操作后,运行命令show run all ssh,现在在ssh加密配置中,所有算法都只使用CTR模式:
ASA(config)# show run all ssh
ssh stricthostkeycheck
ssh 0.0.0.0 0.0.0.0 outside
ssh timeout 60
ssh version 2
ssh cipher encryption custom "aes128-ctr:aes192-ctr:aes256-ctr"
ssh cipher integrity medium
ssh key-exchange group dh-group1-sha1
同样,SSH完整性算法也可以使用命令ssh cipher integrity进行修改。