Hacking Curious. What exactly happens to the wii u when you use mocha cfw?

BaamAlex

UDE GA NARU ZE!
Member
Joined
Jul 23, 2018
Messages
6,051
Trophies
1
Age
29
Location
Lampukistan
Website
hmpg.net
XP
6,161
Country
Germany
What happens to the wii u internally when you load cfw mocha?
You load custom code to patch the sysnand. That means you can install custom channels.

is it more straining for the wii u?
Why should it be? It is only more straining for the user because mocha works only through the browser exploit ;)
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,648
Country
France
it uses a vulnerability (a bug!) in the kernel to get write access to the memory. then reloads the firmware (fw.img) and patches some functions directly in memory to disable the signature check, so the firmware file is not really modified only the copy of that firmware loaded in the console's memory and that's why you need to do it every time you reboot the console.
when Mocha was created, it used to reload a patched version of the firmware from SD card, now it's doing the patches live directly on the console.
as it's a memory patch, it's available until the firmware is unloaded (going into vWii, or shutting down)

If you wonder why we can't just replace the fw.img with a patched version directly on the console, it's because that file is signed. it has a "file modification verification" by the console at boot, so it can't be modified. It needs to be done in memory after the file is loaded there.
the console usually has a memory edition protection (called "Kernel") to prevent hackers from editing it, but there's a bug in Nintendo's code which can be exploited to do it anyway.


There is not straining, the memory having a value instead of another value, doesn't change how good the console works. it's still just a value in memory, being in CFW or not that info has to be loaded in memory anyway.


big visual example when you launch an app, it looks for that part of code currently in memory (fw.img is in memory, loaded at console boot):
1 the console checks the signature of the app
2 if the signature is bad, go to line 4
3 if the signature is good, go to line 5
4 display an error message (indefinitely!)
5 continue execution of launched app.

the CFW patch replace "go to line 4" with "go to line 5", it's just a replaced number!

Of course there are much more changes done in the real patch, but the idea is the same.
There are patches for signature check, another one for region free, another one to repatch fw.img when exiting the settings menu, etc.


with Mocha, you have to launch the firmware patcher yourself from the Homebrew Launcher. so you need to launch 2 apps ! Mocha reloads to system menu once the patched fw.img is in memory.

With Haxchi, you have to launch firmware patcher which is included inside the Haxchi channel. so you need to launch 1 app! Haxchi reloads to system menu once the patched fw.img is in memory.

With ColdBootHaxchi (CBHC), the console boots that haxchi channel automatically. you don't have anything to launch ! the fw.img is automatically patched at console boot and the system menu ready to be used. you only have to care about the game you want to play.
 
Last edited by Cyan,

Dust2dust

Well-Known Member
Member
Joined
Jun 17, 2010
Messages
2,412
Trophies
2
XP
4,347
Country
Canada
1 the console checks the signature of the app
2 if the signature is bad, go to line 4
3 if the signature is good, go to line 5
4 display an error message
5 continue execution of launched app.
Reminds me of old-school BASIC language. :) There is a bug, though. Line 4 should have ":END" at the end. Otherwise, the code would continue to line 5 and the app would execute, even with bad signature and no sig patches.
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,648
Country
France
I "imagined" that the error message just looped on it "displaying the error message" does nothing more than that. if there's an error display, it means it doesn't work, so it doesn't continue after the error or else there's no error displayed anymore and it means it works.
it's just a branch for -> stop execution.
it's not a real, nor even a visual, diagram of what the code should do. But I could have added "and stop there"
 
Last edited by Cyan,
  • Like
Reactions: Dust2dust

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • SylverReZ @ SylverReZ:
    @Maximumbeans, I'm doing alright, thanks.
    +1
  • Maximumbeans @ Maximumbeans:
    That must be rough. Productive I'm sure but hard to balance with daily life
    +1
  • SylverReZ @ SylverReZ:
    @Maximumbeans, Indeed. I've been working on getting this Infecutus chip to work on my PS2. But after soldering, I realised that a plastic piece was missing from the power ribbon cable to the power and eject buttons.
  • SylverReZ @ SylverReZ:
    Now I could go with soldering the contacts from the cable to the connector on the mobo, but doesn't sound like a good permanent solution.
  • Maximumbeans @ Maximumbeans:
    Man, that's beyond my brain :rofl: I'm no good with hardware for now. I'd like to get into hardmods in future though
  • SylverReZ @ SylverReZ:
    @Maximumbeans, Maybe start practice soldering. Get a cheap-ass soldering iron and follow some good YouTube tutorials.
    +1
  • SylverReZ @ SylverReZ:
    Least my experience has gotten better than over a decade ago. My iron would constantly bump into components and break them.
  • Maximumbeans @ Maximumbeans:
    Sounds good. I actually did soldering but like 16 years ago for school so uuuuh probably rusty haha
  • SylverReZ @ SylverReZ:
    @Maximumbeans, Same here. I did soldering at school from a teacher who I honestly liked since he had plenty of good electronics experience.
    +1
  • Maximumbeans @ Maximumbeans:
    I wish I could play chess well
    +1
  • Maximumbeans @ Maximumbeans:
    Useless but a true art
    +1
  • SylverReZ @ SylverReZ:
    @Maximumbeans, I had a friend who had a glass chess set for their birthday.
  • SylverReZ @ SylverReZ:
    It was like all clear and fancy. Tbf I'm not too experienced with chess, but would like to learn someday.
  • Maximumbeans @ Maximumbeans:
    That sounds really cool
  • Maximumbeans @ Maximumbeans:
    I know the basics but no strategy at all :rofl:
    +1
  • Veho @ Veho:
    Watch chess streamers on Twitch and you'll pick up a thing or two.
    +1
  • Veho @ Veho:
    Not to mention there's an infinite number of chess games for every possible platform.
    +1
  • DinohScene @ DinohScene:
    just play it, get beaten a few times and start dominating
    +1
  • K3Nv2 @ K3Nv2:
    Nude chess is best
    +1
  • DinohScene @ DinohScene:
    strip checkers > nude chess
    +1
  • K3Nv2 @ K3Nv2:
    Nude checkers get jumped
    +1
  • SylverReZ @ SylverReZ:
    @Veho, I guess you'd pick up something while watching tub streams.
  • SylverReZ @ SylverReZ:
    @K3Nv2, Dick fights. :tpi:
  • Veho @ Veho:
    Turkish olive oil wrestling.
    +1
    Veho @ Veho: Turkish olive oil wrestling. +1