Hacking Homebrew Is it feasible to MITM the internet connection/module?

mathew77

Lovin' life.
Member
Joined
Jan 19, 2019
Messages
1,184
Trophies
0
Age
47
XP
3,673
Country
Kazakhstan
Thank you guys @hippy dave, @masagrator, such a nice idea!

Some other games to test that explicitly need Airplane mode (not just 90DNS/blanking bis, but completely off the network):

— Prison Architect
— Death Coming
— DOOM (2017)
— Disc Room
— Pandemic the Board Game
— CarX Drift Racing
— Crash Drive 2
— Metal Slug Aca Neogeo
— Nyan Cat Lost in Space
— They Bleed Pixels
— Lode Runner Legacy
 
Last edited by mathew77,

hippy dave

BBMB
OP
Member
Joined
Apr 30, 2012
Messages
9,868
Trophies
2
XP
29,077
Country
United Kingdom
Thank you guys @hippy dave, @masagrator such a nice idea!

Some other games to test that explicitly need Airplane mode (not just 90DNS/blanking bis, but completely off the network):

— Prison Architect
— Death Coming
— DOOM (2017)
Oh I didn't know Death Coming was out on Switch, I was just looking at that game online the other day, sounds like fun. Will definitely add it to the testing list.
 
  • Like
Reactions: mathew77

hippy dave

BBMB
OP
Member
Joined
Apr 30, 2012
Messages
9,868
Trophies
2
XP
29,077
Country
United Kingdom
So I recommend to try do this:
- Hook nn::account::EnsureNetworkServiceAccountAvailable(nn::account::UserHandle const&) and return 0x27C instantly.

If this will work, you can make SaltyNX patch
Code:
_ZN2nn7account36EnsureNetworkServiceAccountAvailableERKNS0_10UserHandleE.asm64
that will be compatible with all 64-bit games.
Code:
804F80D2 //mov x0,#0x27C
C0035FD6 //ret
00000000 //null terminator
00000000 //null terminator
I think you've found it! I made the patch file as you described, and testing has been going well. My usual Tempest 4000 and Arcade Archives Puzzle Bobble 2 work as expected, no error messages to click through, just fully working in offline mode.
I quickly tested Prison Architect and Death Coming, and it fixes both games as far as the initial crash that otherwise happens when they start up, I haven't played any further yet but looks promising. May try to test more games but anyone else can contribute!
@mathew77 thanks for that great list, I don't know if I'll get through them all but feel free to do some testing too!
@SodaSoba @aruto feel free to test with GhostBladeHD and Disgaea 4 Complete+

Again you need SaltyNX already installed and working, then just unzip the .asm64 file and put it in /SaltySD/patches (note: not the same plugins directory as the last thing). Many thanks to masagrator!
 

Attachments

  • _ZN2nn7account36EnsureNetworkServiceAccountAvailableERKNS0_10UserHandleE.asm64.zip
    1 KB · Views: 216

hippy dave

BBMB
OP
Member
Joined
Apr 30, 2012
Messages
9,868
Trophies
2
XP
29,077
Country
United Kingdom
Quick test of Lode Runner Legacy, without the patch it didn't crash but I had to close an error box on startup then a couple more going through the menus to start the game. With the patch I had to close a different error box on startup, but the later ones were gone, so seems like a win.
 

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,511
Trophies
2
XP
6,155
Country
United States
I think you've found it! I made the patch file as you described, and testing has been going well. My usual Tempest 4000 and Arcade Archives Puzzle Bobble 2 work as expected, no error messages to click through, just fully working in offline mode.
I quickly tested Prison Architect and Death Coming, and it fixes both games as far as the initial crash that otherwise happens when they start up, I haven't played any further yet but looks promising. May try to test more games but anyone else can contribute!
@mathew77 thanks for that great list, I don't know if I'll get through them all but feel free to do some testing too!
@SodaSoba @aruto feel free to test with GhostBladeHD and Disgaea 4 Complete+

Again you need SaltyNX already installed and working, then just unzip the .asm64 file and put it in /SaltySD/patches (note: not the same plugins directory as the last thing). Many thanks to masagrator!
This is cool. I can test some games.

UPDATE:

Verdict:

With only minor warnings from in game this patch just works! Very nice work @hippy dave AND @masagrator


Summary:

Below are tests of @mathew77 ‘s list. I think it was a very fair and well rounded list.

  • A couple games has minor warnings to click through but didn’t impact the game. (This is related to how the game handles things, not the patch.)
  • There we’re a couple with in-game hints about being offline that didn’t impact the game play. (Again, that’s on the game, not the patch.)

confirmed non-issues:

  • One game was skipped due to large size and I hate Doom (sorry not sorry.) @mathew77 tested. No issues!
  • Only one game didn’t play at all but it was likely due to a game requirement rather than the patch not working. i was not able to duplicate this error a second time. Updating results below as well.


Testing methodology:
  • Airplane mode off.
  • Connected to wifi using ISP DNS with exosphere and dns:mitm on.
  • Tested DNS with 90DNS Tester and confirmed dns:mitm was working.
Mario_Kart_8_Deluxe_20220402_084246_00.jpg
  • Don’t get cute and try to rename the .asm64 file.
This doesn’t work:
E8FE48B0-BAB4-430A-A111-84CCB0849023.jpeg
You will get this:
215649A8-AB81-4989-9B87-5CEBCEAF09D6.jpeg

Data + Notes:
— Prison Architect
Starts and plays with no issues!
— Death Coming
Starts and plays with no issues!
— DOOM (2017)
Starts and plays with no issues! by @mathew77
24G? I’ll pass. FPS make me nauseous and sweaty.
— Disc Room
Starts and plays with no issues!
does have a normal warning that leaderboards are not connected.​
Disc_Room_20220402_092425_00.jpg
— Pandemic the Board Game
Starts and plays with no issues!
— CarX Drift Racing
Starts and plays with no issues!
CANNOT DUPLICATE; this one sits at a black screen for going on 2 minutes now. I’m guessing it is not playable without Internet? No fault of this patch.
— Crash Drive 2
Starts and plays with no issues!
— Metal Slug Aca Neogeo
Starts and plays with no issues!
— Nyan Cat Lost in Space
Sits at loading screen for 20 seconds:​
Nyan_Cat_20220402_083413_00.jpg
then asks you to connect joycon:​
Controller_20220402_083427_00.jpg
asks if you want to connect to game servers after you die (leaderboards?)​
Nyan_Cat_20220402_085002_00.jpg
plays game just fine with no further issues.
— They Bleed Pixels
Starts and plays with no issues!
(side note, thought this was going to be shovelware…didn’t realize I needed this game in my life…very cool!)​
— Lode Runner Legacy
I got this warning​
.Error_20220402_080508_00.jpg
plays game just fine with no further issues.
 
Last edited by binkinator,

mathew77

Lovin' life.
Member
Joined
Jan 19, 2019
Messages
1,184
Trophies
0
Age
47
XP
3,673
Country
Kazakhstan
CarX Drift Racing
this one sits at a black screen for going on 2 minutes now. I’m guessing it is not playable without Internet?
CarX Drift Racing (ver. 2.13.3 = v393216 update file) works fine when Airplane mode is On:
1.jpg
But an error occurring when it's Off, and even pressing the Close button cannot fix it:
2.jpg
So black screen is completely SaltyNoNet dependency I guess.
 
Last edited by mathew77,
  • Like
Reactions: binkinator

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,511
Trophies
2
XP
6,155
Country
United States
CarX Drift Racing (ver. 2.13.3 = v393216 update file) works fine when Airplane mode is On:
View attachment 304429
But an error occurring when it's Off, and even pressing Close button cannot fix it:
View attachment 304430
So black screen is completely SaltyNoNet dependency I guess.
This is the error code that this patches forces. So it seems this game relies on different error to work. :P
No, it was me being retarded. Sorry fellas.

I tried again and it’s working without issue. Not sure what happened the first time? Will update results above.
 
Last edited by binkinator,
  • Like
Reactions: mathew77

aruto

Active Member
Newcomer
Joined
Nov 6, 2020
Messages
27
Trophies
0
XP
1,068
Country
Japan
I think you've found it! I made the patch file as you described, and testing has been going well. My usual Tempest 4000 and Arcade Archives Puzzle Bobble 2 work as expected, no error messages to click through, just fully working in offline mode.
I quickly tested Prison Architect and Death Coming, and it fixes both games as far as the initial crash that otherwise happens when they start up, I haven't played any further yet but looks promising. May try to test more games but anyone else can contribute!
@mathew77 thanks for that great list, I don't know if I'll get through them all but feel free to do some testing too!
@SodaSoba @aruto feel free to test with GhostBladeHD and Disgaea 4 Complete+

Again you need SaltyNX already installed and working, then just unzip the .asm64 file and put it in /SaltySD/patches (note: not the same plugins directory as the last thing). Many thanks to masagrator!
I tested this on Disgaea 4 Complete+ and it worked flawlessly! Thank you for the hard work :D
 

bestpig

Member
Newcomer
Joined
Jun 19, 2018
Messages
13
Trophies
0
Age
35
XP
310
Country
France
Thank you guys @hippy dave, @masagrator, such a nice idea!

Some other games to test that explicitly need Airplane mode (not just 90DNS/blanking bis, but completely off the network):

— Prison Architect
— Death Coming
— DOOM (2017)
— Disc Room
— Pandemic the Board Game
— CarX Drift Racing
— Crash Drive 2
— Metal Slug Aca Neogeo
— Nyan Cat Lost in Space
— They Bleed Pixels
— Lode Runner Legacy

Can you try my version?

I just have hooked IsNetworkAvailable, it was the one used by the new Lego games and works fine with it, I didn't have tested any other games.
So maybe you other games are also using IsNetworkAvailable and not hooked by the plugin you used, it's maybe why it doesn't works.

Source on github -> https://github.com/BestPig/NX-NONET
 

Attachments

  • NX-NONET.zip
    5.3 KB · Views: 97
Last edited by bestpig,
  • Like
Reactions: SodaSoba

bestpig

Member
Newcomer
Joined
Jun 19, 2018
Messages
13
Trophies
0
Age
35
XP
310
Country
France
Oh, I just found that you also can do patch in asm64, so probably better than my elf to force to return 0 on a function.
 

SodaSoba

‿︵‿︵‿︵ヽ(°□° )ノ‿︵‿︵‿︵‿
Member
Joined
May 28, 2018
Messages
645
Trophies
0
Location
Barstow, on the edge of the desert
XP
1,862
Country
United Kingdom
Can you try my version?

I just have hooked IsNetworkAvailable, it was the one used by the new Lego games and works fine with it, I didn't have tested any other games.
So maybe you other games are also using IsNetworkAvailable and not hooked by the plugin you used, it's maybe why it doesn't works.

Source on github -> BestPig/NX-NONET
(Sorry for the non URL, but the antispam on gbatemp is blocking me to post URL because my account doesn't have posted 5 messages yet ...)
Fixes nag when DNS blocking, works with the other patch hippy Dave made, might work with other games not working with Dave's fix?
 

bestpig

Member
Newcomer
Joined
Jun 19, 2018
Messages
13
Trophies
0
Age
35
XP
310
Country
France
I just made the equivalent in asm64, so must be placed in patches instead of plugins.

It just replace IsNetworkAvailable by a return 0

mov x0, $0 // 00 00 80 d2
ret // c0 03 5f d6
 

Attachments

  • _ZN2nn4nifm18IsNetworkAvailableEv.zip
    266 bytes · Views: 183

Bricked

Well-Known Member
Newcomer
Joined
Apr 5, 2022
Messages
60
Trophies
0
Location
Home
XP
236
Country
United States
I just made the equivalent in asm64, so must be placed in patches instead of plugins.

It just replace IsNetworkAvailable by a return 0

mov x0, $0 // 00 00 80 d2
ret // c0 03 5f d6

It was already tested by hippy dave earlier in the thread and IsNetworkAvailable didn't cover all games.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    AncientBoi @ AncientBoi: 🫂 +1