ROM Hack Extracting the Network Service Account

Duplodocus

Member
OP
Newcomer
Joined
May 30, 2020
Messages
7
Trophies
0
XP
50
Country
France
Hello,

I'm trying to reverse engineer a game's connection to its web servers. The game uses the eShop to manage subscriptions, and it seems that the game authenticates with the game webserver using a device token, since I'm able to use the game's online features (and pay for a subscription) without having to create an account (even though an account can be linked afterwards). My goal now is to get this token from my switch.

When looking at the game binary, I found uses of the the SDK methods "nn:account:EnsureNetworkServiceAccountAvailable" and "nn:account:GetNetworkServiceAccountId". I believe the latter method sets a buffer with a token linked to the device (and probably signed by Nintendo at some point, so that the web services can verify it). I'd like to call these methods from a homebrew program, which will hopefully help me authenticating properly. Still, I'm not sure how to do that, here are a few methods I'm thinking about:
  • Linking the homebrew binary to the SDK binary - is that possible with the current devtools?
  • Reverse engineering those methods from the SDK and implementing them in my homebrew. Yet, I'm pretty sure that at some point it will call the switch system services. Can I do that from a homebrew? Is it unsafe with regards to device bans?
  • I haven't yet examined my device PRODINFO, could the device token be in there?
I was able to get an eShop token (from the eShop website) recognized by the game's web auth services, but it fails when trying to check my subscription. Hence my interest for the device token, which I believe is what the game actually sends to the servers. Since the eShop website's tokens are JWTs, I think the device token must be a JWT, albeit with different claims. In particular, I found that the subscription request sends a UUID that seems to never change for a given console. This device-unique UUID is probably in the device token.

Is the Nintendo SDK documented somewhere? That'd definitely be helpful, but I could not find that on SwitchBrew.

Any help/hint/guidance is welcome :-)
 

Site & Scene News

Popular threads in this forum

Recent Content

General chit-chat
Help Users
    Faust03 @ Faust03: hey the spam bots are acting up again