Proprietary · · 1202 days

Juniper ScreenOS firmware hid backdoors

Juniper disclosed that unauthorized code entered official ScreenOS firmware for NetScreen firewalls. CVE-2015-7755 opened hidden SSH/Telnet admin access; CVE-2015-7756 could let an observer decrypt VPN traffic.

The Juniper ScreenOS incident was not a normal bug disclosure. Juniper said an internal review found unauthorized code in ScreenOS, the operating system for NetScreen firewalls. The affected firmware was official vendor firmware, distributed through the normal ScreenOS channel, and the product sat directly on network boundaries.

CVE-2015-7755 was the administrative-access backdoor. Rapid7's analysis found an authentication path in SSH and Telnet that compared the supplied password against the string <<< %s(un='%s') = %u. The string looked like a format string, but on vulnerable builds it was a master password: any username could reach an administrative shell with the highest privileges.

CVE-2015-7756 was a separate VPN decryption vulnerability. Juniper described it as independent of the authentication bypass. Public cryptographic analysis tied it to ScreenOS random-number generation, Dual_EC_DRBG, and a changed Q parameter. The attacker did not need a large code change; replacing the parameter was enough if the holder of the corresponding secret could see the right output.

The deeper lesson was that ScreenOS already carried dangerous cryptographic structure. Dual_EC output was meant to be hidden behind an ANSI X9.31 generator, but in the default configuration that filter never ran at all: ScreenOS reseeded on every call, which left the filter loop's own counter exhausted, so raw Dual_EC output was what callers received. Checkoway and colleagues traced that plumbing to a cluster of changes Juniper itself made in the 2008 ScreenOS 6.2 release — crucially, not the "unauthorized code" introduced by the third party. The unauthorized parameter change then turned weak plumbing into a practical passive decryption path for VPN traffic.

Notes

  • Rapid7 recovered the authentication backdoor as a hardcoded password disguised to read as a debug format string, and located it in the SSG5 and SSG20 ARM firmware at sub_13DBEC. Any username paired with that password authenticated over SSH or Telnet regardless of whether the account existed.
  • No file hash is recorded for the affected firmware images. Juniper's advisory identifies the affected builds by version rather than by digest, and the published analyses worked from decompressed binaries without stating a digest for the distributed image.
  • No cited source attributes the unauthorized code to a specific actor. Juniper did not name one, and Checkoway et al. explicitly decline to attribute, so the actor is recorded as unknown despite widespread press speculation about a state operator.
  • The start date is imprecise. The Q parameter change is located only by a version diff between ScreenOS 6.2.0r14 and 6.2.0r15; no source establishes a day, so 2012-09-01 stands in for "the 6.2.0r15 timeframe" rather than a known date.
  • The end date marks the December 2015 out-of-cycle patch, which restored Juniper's original Q value. It does not mark the end of the underlying PRNG weakness: Dual_EC and the skipped ANSI X9.31 filter remained in ScreenOS from the 2008 6.2 release until Juniper announced their removal in January 2016 and shipped the replacement in ScreenOS 6.3.0r22 in April 2016.
  • Juniper's advisory was originally published as kb.juniper.net/InfoCenter/index?page=content&id=JSA10713, the identifier cited by Checkoway et al. That URL now redirects to the Juniper support portal article listed in the references, which serves a JavaScript shell with no readable text; the archived PDF alongside this record is the usable copy.

Appendix · Affected releases

  • Juniper's original bulletin and CVE text list a broader affected range; Rapid7 reported that the authentication backdoor was not present in earlier 6.2.0 and 6.3.0 samples it examined, and noted Juniper confirmation for 6.3.0r17 through 6.3.0r20.
  • Rapid7 estimated about 26,000 internet-facing NetScreen devices with SSH open shortly after disclosure.
  • Juniper described CVE-2015-7756 as independent of the administrative-access issue.
  • Public analysis connected the weakness to ScreenOS random number generation and the replacement of the Dual_EC_DRBG Q parameter.
  • Matthew Green summarized the public cryptographic analysis: the 2012 change appeared to replace the Dual_EC Q value and test vectors, letting an attacker piggyback on an existing ScreenOS design weakness rather than add a large new decryption module.

Indicators

  • string<<< %s(un='%s') = %u
  • functionsub_13DBEC
  • logAdmin user system has logged on via SSH from
  • logSSH: Password authentication successful for admin user
  • cveCVE-2015-7755
  • cveCVE-2015-7756

References

  1. 2015-12 Out of Cycle Security Bulletin: ScreenOS: Multiple Security issues with ScreenOSsupportportal.juniper.net
  2. CVE-2015-7755: Juniper ScreenOS Authentication Backdoorrapid7.com
  3. TROJAN: Juniper ScreenOS Telnet Backdoor Password Attemptjuniper.net
  4. Researchers Solve the Juniper Mystery and They Say It's Partially the NSA's Faultwired.com
  5. A Systematic Analysis of the Juniper Dual EC Incidenteprint.iacr.org
  6. Juniper ScreenOS contains multiple vulnerabilitieskb.cert.org
  7. On the Juniper backdoorblog.cryptographyengineering.com

Source record: proprietary/juniper-screenos/meta.yaml