Skip to content
Crypto Disclosed report Advanced

[3DS][SSL] Improper certificate validation allows an attacker to perform MitM attacks

The Nintendo 3DS SSL system module fails to validate certificate signatures because a required resource is missing from the library configuration. An attacker could forge certificates and perform man-in-the-middle attacks to spoof trusted servers and intercept communications.

mrnbayoh Follow

Originally disclosed on HackerOne

Informational View original
  • Triaged in 9 days
  • Fixed in 4 months
  • Paid in 4 months
  • Disclosed after 6 months

Summary by the program

Summary by the researcher

Affected Systems

  • Platform: (New) Nintendo 3DS
  • Region: ALL
  • System version: <= 11.13

Description

The SSL system module does not properly validate the x509 certificates when establishing an SSL/TLS connection. Actually, the SSL system module does not check the signatures when validating a certificate chain, allowing anyone to forge fake certificates and perform MitM attacks or spoof trusted servers.

Vulnerability

The SSL system module uses the RSA BSAFE MES library to implement SSL/TLS communications. This library is very customizable, and a lot of options can be turned on/off at multiple levels. In particular, according to the documentation, the library requires a "resource list" to be provided. The meaning of this list is to describe which aspects of the library will be activated or not.

Again, according to the documentation, the R_VERIFY_RES_SIGNATURE "resource" is needed to perform certificate signatures validation. However, this specific "resource" is not present in the list provided by the SSL module to the library. Hence, it does not validate certificate signatures even though the verification flag is set when creating SSL contexts, for example.

Impact

This vulnerability has a lot of impacts since it allows to spoof and perform MitM on any SSL/TLS connection established through the SSL module. Here is a (probably non-exhaustive) list of what can done:

  • spoofing the NetUpdateSOAP and ECommerceSOAP endpoints used by the NIM module to:
  • bypass the system update verification
  • provide customized system updates packages (still need titles with CommonETickets)
  • this probably allows (untested) to install titles that came preinstalled on special editions like Super Smash Bros, Pokemon games, Zelda games etc.
  • spoofing the eShop servers, providing a new attack surface (eShop app)
  • MitM eShop communications to:
  • get user information & tokens
  • spy on commercial transactions
  • get user banking information (?)(untested)
  • MitM Friends & ACT communications to:
  • get user tokens & information (including NNID credentials)
  • spoofing connections to some game servers, providing new attack surfaces
  • MitM connections to some game servers, allowing to spy on communications
  • MitM/spoofing any other connection using the SSL module to establish SSL/TLS communications

And some things that cannot be done:

  • it is impossible to modify downloaded SpotPass data which are protected due to the signature verification of BOSS containers
  • it is impossible to spoof servers or doing MitM attacks when applications use some kind of webkit implementation, due to webkit having its own SSL/TLS implementation

The original report as published on HackerOne, by mrnbayoh. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The SSL module did not include the R_VERIFY_RES_SIGNATURE resource in the resource list passed to the RSA BSAFE MES library, so certificate signatures were never validated.

Impact

An attacker could spoof and perform man-in-the-middle attacks on any SSL/TLS connection made through the SSL module, potentially bypassing system update verification, stealing user tokens and credentials, and spying on communications, though some protections like BOSS container signatures and WebKit's own SSL implementation are not affected.

What the attacker needed

Victim uses SSL module for connection

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

The 3DS does not properly check the signature on certificates, so an attacker could forge certificates and pretend to be a trusted server to intercept data.

What is Crypto?

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

More by mrnbayoh

View all

6 more disclosed reports, best first.

More from Nintendo

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.