Hacking [PSA] Strong anti-piracy measures implemented by Nintendo for online.

gameboy

Well-Known Member
Member
Joined
Dec 9, 2015
Messages
2,035
Trophies
1
Age
44
XP
2,169
Country
United States
Since it's the Atmosphere developer who discouraged people from going online, he should disabled all online access when using his CFW (or at least have an option at boot to disable it). Else, your dumb friend, kid or grandma will pickup your Switch: turned on the wifi and get you banned.

lol it wouldnt be the end of the world, its just videogames

--------------------- MERGED ---------------------------

they have defintely the right to do so, i mean just look at sony.
nintendo is achieving the very same as sony when it comes to online gaming.

though i dont think i'll buy a 2nd console..
when i get urges to play the new ssb or any other online game, i will just buy the games off the eshop and play online.



funny thing is, i dont even play 90% of the games i pirate ._.
i think most of the tempers here do pirate, but some may be reluctant to admit it.

i find no shame in admitting it, i also buy games after all.
and well i once shared an update of a ps4 title some while ago and everyone was happy.

i felt like i just borrowed them the update, i think that may also count as pirating.

somewhere along the ps4 era the games just werent fun anymore. the two ps4 games i felt were fun were Infamous, Until Dawn and i got rid of my ps4 when the switch was announced. I know the ps4 is hackable and can play pirated games but i really couldnt care, not enough good exclusives to merit buying another one and a hard drive.

its cool the switch can play pirated games and such but most of these games are just ports of wiiu games i already enjoyed on the wiiu or ports of games i was never gonna pick up for pc but am only interested because its on nsw. some people dont have the money for games so i dont care but when those same desperate people start complaining about online and stuff its cringeworthy.
 
  • Like
Reactions: CallmeBerto

Justinde75

Well-Known Member
Member
Joined
Feb 14, 2016
Messages
2,530
Trophies
1
Age
23
XP
4,593
Country
Germany
You people forget the biggest thing:

Some of these games NEED downloaded updates in order to actually run. Games like LA Noire, NBA 2K18, and DOOM all need the rest of the game downloaded via update.

Pretty sure they can be installed offline once we get the update files and something similiar to FBI on the 3ds
 

Wolf2000

Active Member
Newcomer
Joined
Jun 18, 2018
Messages
34
Trophies
0
Age
35
XP
271
Country
Germany
i doubt it unless you go online, anytime you insert a cart it adds a game icon. Unless that game icon itself stores the "cert" i dont see any reason how the could tell

I think this is exaxtly the case... hopefully not every already installed game will be checked by Nintendo even the official game cart was not inserted. So if every played Game will be checked by only going online (WLAN access) and switching on the Switch :D. This would mean you are not able to play official games anymore because you are banned immediatley...
 
Last edited by Wolf2000,

gameboy

Well-Known Member
Member
Joined
Dec 9, 2015
Messages
2,035
Trophies
1
Age
44
XP
2,169
Country
United States
I think this is exaxtly the case... hopefully not every already installed game will be checked by Nintendo even the official game cart was not inserted. So if every played Game will be checked by only going online (WLAN access) and switching on the Switch :D. This would mean you are not able to play official games anymore because you are banned immediatley...

nintendo is expecting family households to have more than one or two switch but they cant really expect those people to buy two or three copies of the same game either. that would be way too demanding if they started to ban consoles because they were sharing the same game within the family or having people borrow games.
 

:-infern:

GBAtemp Legend
Member
Joined
Jun 1, 2013
Messages
256
Trophies
0
XP
423
Country
United States
Post quote in case it gets taken off reddit

How Application Authorization works on the Nintendo Switch
Hey, all.

After doing some research earlier today into how the Switch gains authorization to play a given game online, I learned that Nintendo has implemented some very strong anti-piracy measures in this regard -- they can actually perfectly detect whether a digital copy of a game has been legitimately purchased. I figured I'd make a post explaining the process, since it's pretty technically interesting.

Overview
Here's what happens when you attempt to connect online in a game, in the abstract:

  1. Your console verifies that it can connect to the internet.
  2. Your console verifies that it can get a device authorization token to go online -- that it is not banned.
  3. Your console authorizes the Nintendo Account being signed into.
  4. Your console obtains an application authorization token for the specific title being played.
Hopefully at a high level, all that makes sense. Now, let's dive in to more technical detail:

Your console verifies that it can connect to the internet.
This step is pretty self-explanatory, but I'm including it for the sake of being thorough. Your console periodically connects to "ctest.cdn.nintendo.net", and checks the response for a special header -- "X-Organization: Nintendo". If that header is present, your console concludes it has access to the internet. Otherwise, it decides it doesn't -- it's really straightforward.

Let's get to the more interesting stuff.

Some background
For those that haven't read my other Switch networking post, I recommend you go do so -- it's pretty interesting. There's only one really important bit to keep in mind for this, though, so I'll just repeat it here:

On the Switch, only bugyo is unauthenticated -- every other server authenticates requests, and will reject any requests lacking the right client certificates. In addition, client certificates are now console-unique, and burned in at the factory. Client certificate private key data is stored encrypted using keydata only available to TrustZone (an isolated security-focused cpu core, which provides a cryptography API), and the ssl module retrieves it on boot by interfacing with the settings service to retrieve the encrypted data and then requesting that the spl module pass it to TrustZone for decryption via the "GenerateAesKek" and "DecryptPrivk" commands.

Note that unlike the 3DS, this means that Nintendo can tell what console makes a given request. This means Nintendo can block misbehaving user's certificates, leaving them permanently unable to use any of Nintendo's network.

Your console verifies that it can get a device authorization token to go online
This is one of the meatier bits of the online connection process. Nintendo has a special server for handing out device authorization tokens -- "dauth-lp1.ndas.srv.nintendo.net" (Device AUTHorization, and lp1 is the "live production" environment for retail online services). One thing that's important to note is that these tokens don't blanket-authorize all system operations -- they are handed out to specific parts of the system, specified by a client id in the token request. With that out of the way, here's how device authorization works:

  1. Your console connects to the dauth "/challenge" endpoint, sending up a "key_generation" argument informing the server what master key revision your console is using.
  2. Dauth sends back as a json a random "challenge" string, and a constant "data" string.
  3. Your console treats the "data" string, decoded as base-64, as a cryptographic key source, and uses the SPL services to transform it with TrustZone only keydata and load it into an AES keyslot.
  4. Your console generates its authorization request data -- this is done by formatting the string "challenge=%s&client_id=%016x&key_generation=%d&system_version=%s" with the challenge string, the client ID requesting a token, the master key version, and the current system version digest.
  5. Your console calculates an AES-128 CMAC using the trustzone-only key it derived over its authorization request, appends "&mac=%s" to the request data (formatting with the url-safe base 64 encoded CMAC), and fires the request off to the "/device_auth_token" endpoint.
  6. If all goes well, dauth returns a token for your console. (If your console is banned, as one of mine is, you will instead receive an error message informing you that your console is not allowed to use online services).
This is a pretty effective custom scheme -- it requires, in order to get a token, that the requester be able to perform TrustZone-only cryptographic operations for the current system version. Provided TrustZone isn't compromised on the latest firmware, this is totally safe. TrustZone is, for better or worse, compromised on all system versions due to shofusel2, though. This means the only real benefit here is that dauth provides an ideal place for console bans to be implemented -- almost all interesting online functionality requires a dauth token of some kind, including purchasing and installing new games from the eShop, so consoles that get blocked here can't do much besides install system updates.

Your console authorizes the Nintendo Account being signed into.
This is actually somewhat uninteresting, too -- there is nothing Switch unique here. Your console performs pretty bog-standard oauth authorization talking to "api.accounts.nintendo.com" -- this is the same process performed on a PC, and so I won't go into it in detail here.

The only meaningful upshot to this component is that it allows Nintendo to block specific accounts, and because all requests require a client certificate, any blocked account can be immediately associated to a console.

Your console obtains an application authorization token for the specific title being played.
This is the really interesting component -- and it's where Nintendo's strongest security measure lies.

Like dauth, Nintendo has a special server for this -- "aauth-lp1.ndas.srv.nintendo.net" (Application AUTHorization). Going online in a game requires getting a token from the "/application_auth_token" endpoint. Here's how that works, at a high level:

  1. Your console gets a device authorization token from dauth for the aauth client ID.
  2. Your console retrieves its certification to play the title it's trying to connect online with, and sends that to aauth.
  3. If all goes well, aauth returns an application authorization token.
Now, that's not too complicated. But what's really interesting is the bit where your console retrieves its certification to play the title it's trying to connect online with.

Let me explain that in more technical detail for both cases:

Gamecards
  • If you are playing a gamecard, your certification is your gamecard's unique certificate. This is signed by Nintendo using RSA-2048-PCKS#1 at the time your gamecard is written, and contains encrypted information about your gamecard (this includes what game is on the gamecard, among other, unknown details).
  • In the gamecard case, the data uploaded to aauth is "application_id=%016llx&application_version=%08x&device_auth_token=%.*s&media_type=GAMECARD&cert=%.*s", formatted with the title ID for the game being played, the version of the game being played, the token retrieved from dauth, and the gamecard's certificate (retrieved from FS via the "GetGameCardDeviceCertificate" command), formatted as url-safe base64.
  • This code lives at .text+0x7DE1C for 5.0.0 account.
Digital games
  • Your certification for a digital title is your console's ticket. For more technical details on what's inside a ticket, see my previous post on the eShop/CDN (linked up above). The important details are that tickets contain the Title ID of the game they certify, the Device ID of the console they authorize, the Nintendo Account ID used to purchase them, and are signed by Nintendo using RSA-2048 (cannot be forged).
  • In this case, your console talks to the "es" service, and sends a command to retrieve an encrypted copy of the relevant ticket along with the encryption key. This encryption is AES-128 CBC, using a key randomly generated via cryptographically-secure random number generation. The key itself is encrypted using RSA-OAEP 2048
  • . To skip over some technical details, this is a one-way encryption which only Nintendo can reverse, so even if you obtained the output of the es command you would not be able to determine the encryption key being used (and thus couldn't decrypt the ticket).
  • The data uploaded to aauth in this case is "application_id=%016llx&application_version=%08x&device_auth_token=%.*s&media_type=DIGITAL&cert=%.*s&cert_key=%.*s", formatted with the title ID for the game being played, the version of the game being played, the token retrieved from dauth, the encrypted ticket encoded with url-safe base64, and the encrypted key encoded with url-safe base64.
  • This code lives at .text+0x7DE98 for 5.0.0 account.
And that's that (with the additional case where if the console fails to find a certificate, a special "NO_CERT" request is sent, but this is pretty irrelevant because sending a NO_CERT request gets your console banned). In both relevant cases, aauth validates the certification, and returns a token only if the certification is valid.

Practical Impact
These are extremely strong anti-piracy measures -- Nintendo did a great job, here.

In the gamecard case, Nintendo can detect whether or not the user connecting has data from a Nintendo-authorized gamecard for the correct title. This solves the 3ds-era issue of gamecard header data being shared between games. Additionally, there's a fair amount of other, unknown (encrypted) data in a certificate being uploaded -- and certificates are also linked to Nintendo Accounts when gold points are redeemed. Sharing of certificates should be fairly detectable, for Nintendo.

In the digital game case, Nintendo actually perfectly prevents online piracy here. Tickets cannot be forged, and Nintendo can verify that the device ID in the ticket matches the device ID for the client cert connecting (banning on a mismatch), as well as that the account ID for the ticket matches the Nintendo Account authorizing to log in. Users who pirate games definitionally cannot have well-signed tickets for their consoles, and thus cannot connect online without getting an immediate ban -- this is exactly how I would have implemented authorization for digital games, if I were them.

tl;dr: Don't pirate games -- it will lead to your console being banned from going online, and every banned early-hardware-revision switch is an enormous waste.
 

gabru

Well-Known Member
Newcomer
Joined
Aug 22, 2016
Messages
82
Trophies
0
Age
28
XP
477
Country
Spain
nintendo is expecting family households to have more than one or two switch but they cant really expect those people to buy two or three copies of the same game either. that would be way too demanding if they started to ban consoles because they were sharing the same game within the family or having people borrow games.

I was thinking about game renting... What if someone makes a backup of a borrowed game? Could happen that the cartridge and the backup go online at the same time.
 

LysergCooltyp

I don't know why the microwave burns
Member
Joined
Nov 4, 2011
Messages
613
Trophies
1
XP
1,510
Country
Eh, I'm not too concerned. I'm gonna use SX Pro on sysnand until emunand is a thing and if by the time I decide to buy a legit game and play it online like smash and that gets me banned due to some lingering data, so be it.
 

Nevermore

Well-Known Member
Member
Joined
Jun 16, 2014
Messages
357
Trophies
0
XP
1,243
Country
United States
Hmm...

So my only objective is dumping saves, and re-injecting the save after editing, mainly for single player games that I want to skip some grinds on (Hyrule Warriors, Xenoblade 2, etc).

Is waiting for CFW still a practical option if I'm still using authentic carts? Or should I just stick with an autoRCM method for both loading Checkpoint and using official OS?
 
  • Like
Reactions: CallmeBerto

coppertj

Well-Known Member
Member
Joined
May 26, 2017
Messages
193
Trophies
0
Age
25
XP
482
Country
United States
tl:dr Play your legit content in SysNAND and play pirated content offline in EmuNAND. Literally what everyone has been saying since Day 1.
Guarantee people are freaking out because sciresM did not specifically mention if offline was safe or not just displayed the facts. But pretty sure you're right, emuNAND airplane mode...
 
  • Like
Reactions: billsfriend

aos10

Yuuki chan
Member
Joined
Apr 10, 2012
Messages
4,756
Trophies
2
Age
38
XP
4,030
Country
Saudi Arabia
so, if i played a pirated game, but keep the wifi on and never played online in that game (for example splatoon 2), , nintendo will know that i used a pirated game?
 

pLaYeR^^

Doctor Switch
Member
Joined
Sep 18, 2014
Messages
3,151
Trophies
1
Age
27
Location
Austria
XP
3,909
Country
Austria
so, if i played a pirated game, but keep the wifi on and never played online in that game (for example splatoon 2), , nintendo will know that i used a pirated game?
We don't know yet. But I'd turn wifi off when playing Splatoon 2 because it probably trys to connect to the internet even if you don't play online matches.
 

BigPanda

Well-Known Member
Member
Joined
Jul 18, 2016
Messages
221
Trophies
0
XP
1,719
Country
Belgium
So downgrade and emunand are also very dangerous since during the device authentication token, the version is sent to Nintendo. So it is a risk to go online with an older version of the switch if you already went online with a newer one.
 

Lumince

Well-Known Member
Member
Joined
Aug 15, 2015
Messages
2,343
Trophies
1
XP
3,779
Country
United States
Well looks like I'm going for that 1.0.0 console I saw. I'm guessing that personal backups wouldn't be affected as long as the cert is dumped with it. I'm never going to test it though. I'm gonna keep that console offline forever and enjoy my current switch once I get it updated:)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • AncientBoi @ AncientBoi:
    :cry: You arent'? :cry:
  • AncientBoi @ AncientBoi:
    [tells my mom not to send you anymore Christmas presents] :evil: :rofl2: :tpi:
  • Xdqwerty @ Xdqwerty:
    im a minor
  • AncientBoi @ AncientBoi:
    So. I'm a Major
  • Xdqwerty @ Xdqwerty:
    im under 18
  • AncientBoi @ AncientBoi:
    I'm waaaaaaaaaay over 18. lol
  • Xdqwerty @ Xdqwerty:
    that makes you a pedo
  • AncientBoi @ AncientBoi:
    Pedo = 1. child 2. boy 3. ? I forgot. But I wish I were still a "Boy" :sad::cry::cry::cry:
  • Xdqwerty @ Xdqwerty:
    i meant simping over someone under 18 while you are over 18 makes you a pedophile
  • AncientBoi @ AncientBoi:
    And when did I "simp" you?
  • AncientBoi @ AncientBoi:
    Just go make me the darn coffee :angry:
  • AncientBoi @ AncientBoi:
    Tea?
  • AncientBoi @ AncientBoi:
    LoL lmao
  • AncientBoi @ AncientBoi:
    L8er dude. going to watch YT's on the Ukraine/ruskie war.
    +1
  • Xdqwerty @ Xdqwerty:
    @AncientBoi,tbh i think im
    not interested in whats going on irl
  • BakerMan @ BakerMan:
    tomorrow's memorial day, so i've been looking for a playlist, but it's all just country and alternative rock
  • Xdqwerty @ Xdqwerty:
    @BakerMan, memorial day for who?
  • BakerMan @ BakerMan:
    why the hell can't i find one with a song about the soldiers who died in battle, the very reason we celebrate
  • Sonic Angel Knight @ Sonic Angel Knight:
    Bake them a cake :ninja:
    +1
  • a_username_that_isnt_cool @ a_username_that_isnt_cool:
    I can change my name back tomorrow
  • Xdqwerty @ Xdqwerty:
    @a_username_that_isnt_cool, what will your new username be?
  • a_username_that_isnt_cool @ a_username_that_isnt_cool:
    My original one
    +1
  • RedColoredStars @ RedColoredStars:
    Stayin inside for memorial day. Just like other holidays, most people dont care or think about the actual reasons behind it. For most it's just another reason to get shit faced drunk and spout off hyper-patriotic nonsense. The Trumpers around here going to be out in full force with their trucks and guns and flags making noise all over town. Hard pass.
    +1
    RedColoredStars @ RedColoredStars: Stayin inside for memorial day. Just like other holidays, most people dont care or think about... +1