Hacking Updating sysnand without FIRM protection...

metroid maniac

An idiot with an opinion
OP
Member
Joined
May 16, 2009
Messages
2,079
Trophies
2
XP
2,615
Country
What happens of you update the sysnand of a console with a9lh while funning a CFW that does not protect the FIRM0/1 regions of NAND?

Does the console update normally, and effectively become unhacked? Does it brick because of the tampered keystore, or some other reason? Does it depend on 3DS model (old/new)?

I'd try but my console is not NAND modded!
 

Purple_Heart

GBATemp´s weirdest Individual
Member
Joined
Oct 11, 2015
Messages
4,390
Trophies
1
Age
28
Location
Hamburg
XP
3,723
Country
Germany
it becomes unhacked

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

you have then ofw 11.1 (you cant hack it anymore until you make a dsiware dgrade)
 

Garro

Pendulum of souls!
Member
Joined
Aug 15, 2009
Messages
714
Trophies
1
Age
31
Location
Somewhere
Website
garrothedog.tumblr.com
XP
2,371
Country
Chile
I think it bricks, there were some issues back with CakesFW since the Firmware Protection feature could be enabled/disabled, plus, pressing B in the features menu would quit the menu without saving changes so many people enabled the option and pressed B without realizing the option was still off and ended bricking their 3DS when they updated. You might find old threads about this if you search deep enough.

EDIT: Post I found in reddit: AKA. Only n3DS would brick:
b3feb7b71ca44fcf8c6b61414281e116.png


EDIT2: Ninja'd by the post below :X
 
Last edited by Garro,

Goombi

my_crypto = meme_crypto
Member
Joined
Jun 1, 2014
Messages
144
Trophies
0
Location
RnVja1lvdU15RHVkZQ
Website
www.goombi.fr
XP
178
Country
France
On O3DS you won't brick, just have an updated console (because O3DS FIRM doesn't care about the keystore). However a N3DS will brick, because of that tampered keystore that is not set back to normal when you update.
 

metroid maniac

An idiot with an opinion
OP
Member
Joined
May 16, 2009
Messages
2,079
Trophies
2
XP
2,615
Country
On O3DS you won't brick, just have an updated console (because O3DS FIRM doesn't care about the keystore). However a N3DS will brick, because of that tampered keystore that is not set back to normal when you update.

Thank you, that's exactly what I thought would happen.

So let's consider the N3DS. If you restore a clean secret sector then the console will boot the clean FIRM1 and you can proceed to update to remove a9lh. Right?
 

Goombi

my_crypto = meme_crypto
Member
Joined
Jun 1, 2014
Messages
144
Trophies
0
Location
RnVja1lvdU15RHVkZQ
Website
www.goombi.fr
XP
178
Country
France
Would be much safer to use the uninstall function of SafeA9LHInstaller imho. But in theory, just restoring the keystore would boot FIRM1 (since FIRM0 is still invalid). And from there, updating without FIRM-write protection would restore FIRM0 and FIRM1 to legit states. The only thing left would the the stage_2 payload, written in FIRM1 (iirc) partition but beyond the actual space used by the FIRM (= in some NAND sectors never read in legit uses of the console).
Keep in mind this is theory and I wouldn't attempt it without hardmod :P
 

metroid maniac

An idiot with an opinion
OP
Member
Joined
May 16, 2009
Messages
2,079
Trophies
2
XP
2,615
Country
I wasn't actually aware SA9LHI had an uninstall function, I guess I never found it. O.o

So stage2 is just stored in some of the extra space allocated to FIRM1, but not used by the currently installed FIRM1? That's another mystery that was bothering me solved.
 

Goombi

my_crypto = meme_crypto
Member
Joined
Jun 1, 2014
Messages
144
Trophies
0
Location
RnVja1lvdU15RHVkZQ
Website
www.goombi.fr
XP
178
Country
France
I wasn't actually aware SA9LHI had an uninstall function, I guess I never found it. O.o

So stage2 is just stored in some of the extra space allocated to FIRM1, but not used by the currently installed FIRM1? That's another mystery that was bothering me solved.
Yep. stage1's only job is to read the sectors where stage 2 is and jump to it (since stage 1 is extremly contrained in space).
Side note: stage1 is encrypted on NAND as being in the FIRM0 loaded. stage2 is cleartext since stage 1 has to be so small, it currently did not bother to embed the ARM9 crypto lib. That means a hardmod can dump your nand and change stage 2 (I'm a paranoid, currently looking into a secured boot chain from A9LH).
 

metroid maniac

An idiot with an opinion
OP
Member
Joined
May 16, 2009
Messages
2,079
Trophies
2
XP
2,615
Country
Yep. stage1's only job is to read the sectors where stage 2 is and jump to it (since stage 1 is extremly contrained in space).
Side note: stage1 is encrypted on NAND as being in the FIRM0 loaded. stage2 is cleartext since stage 1 has to be so small, it currently did not bother to embed the ARM9 crypto lib. That means a hardmod can dump your nand and change stage 2 (I'm a paranoid, currently looking into a secured boot chain from A9LH).

How big is the crypto lib? Last time I checked there's about a ~2KB difference between the FIRM0 and FIRM1 and the current stage1 is about 1.5KB big.

That's not much wiggle room. But it'd be really cool if stage2 were encrypted with the OTP hash to ensure a secure boot process.
 

Goombi

my_crypto = meme_crypto
Member
Joined
Jun 1, 2014
Messages
144
Trophies
0
Location
RnVja1lvdU15RHVkZQ
Website
www.goombi.fr
XP
178
Country
France
How big is the crypto lib? Last time I checked there's about a ~2KB difference between the FIRM0 and FIRM1 and the current stage1 is about 1.5KB big.

That's not much wiggle room. But it'd be really cool if stage2 were encrypted with the OTP hash to ensure a secure boot process.
According to SafeA9LHI MAX_STAGE1_SIZE (0x1E70 ~ 7.5KB), it should be fine to add it. I don't have my dev env right now but I'm sure it will fit.
 

metroid maniac

An idiot with an opinion
OP
Member
Joined
May 16, 2009
Messages
2,079
Trophies
2
XP
2,615
Country
According to SafeA9LHI MAX_STAGE1_SIZE (0x1E70 ~ 7.5KB), it should be fine to add it. I don't have my dev env right now but I'm sure it will fit.

Oh right, I was just checking the firm bins in the a9lh install directory I had from before. I now see that it's a 4KB difference, unlike what I thought I saw before... Either way, 4KB or 7.5KB, it's significant and I think it'll be possible to implement some stage2 crypto in there.

I'm excited to see what comes of that idea anyway.
 
Last edited by metroid maniac,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • The Real Jdbye @ The Real Jdbye:
    so AMD seem to finally be starting to take AI seriously
  • Psionic Roshambo @ Psionic Roshambo:
    Oh yeah those new 8000 CPUs have AI cores built in that's interesting
  • Psionic Roshambo @ Psionic Roshambo:
    Maybe they plan on offloading to the CPU?
  • Psionic Roshambo @ Psionic Roshambo:
    Would be kinda cool to have the CPU and GPU working in random more
  • Psionic Roshambo @ Psionic Roshambo:
    Tandem even
  • The Real Jdbye @ The Real Jdbye:
    i think i heard of that, it's a good idea, shouldn't need a dedicated GPU just to run a LLM or video upscaling
  • The Real Jdbye @ The Real Jdbye:
    even the nvidia shield tv has AI video upscaling
  • The Real Jdbye @ The Real Jdbye:
    LLMs can be run on cpu anyway but it's quite slow
  • BakerMan @ BakerMan:
    Have you ever been beaten by a wet spaghetti noodle by your girlfriend because she has a twin sister, and you got confused and fucked her dad?
  • Psionic Roshambo @ Psionic Roshambo:
    I had a girlfriend who had a twin sister and they would mess with me constantly.... Until one chipped a tooth then finally I could tell them apart.... Lol
  • Psionic Roshambo @ Psionic Roshambo:
    They would have the same hair style the same clothes everything... Really messed with my head lol
  • Psionic Roshambo @ Psionic Roshambo:
    @The Real Jdbye, I could see AMD trying to pull off the CPU GPU tandem thing, would be a way to maybe close the gap a bit with Nvidia. Plus it would kinda put Nvidia at a future disadvantage since Nvidia can't make X86/64 CPUs? Intel and AMD licensing issues... I wonder how much that has held back innovation.
  • The Real Jdbye @ The Real Jdbye:
    i don't think nvidia wants to get in the x64 cpu market anyways
  • The Real Jdbye @ The Real Jdbye:
    you've seen how much intel is struggling getting into the gpu market
  • The Real Jdbye @ The Real Jdbye:
    and nvidia is already doing ARM
  • The Real Jdbye @ The Real Jdbye:
    i don't think they want to take more focus away from their gpus
  • Psionic Roshambo @ Psionic Roshambo:
    Yeah I think Nvidia s future lays in AI GPU acceleration stuff if they can get that going it's going to be super interesting in the long term
  • Psionic Roshambo @ Psionic Roshambo:
    AI assisted game creation might become a thing
  • Psionic Roshambo @ Psionic Roshambo:
    At least that's something I think would be pretty cool.
  • Psionic Roshambo @ Psionic Roshambo:
    Don some VR glasses and gloves and talk to the computer and paint entire worlds
  • Psionic Roshambo @ Psionic Roshambo:
    "OK Cortana I want that mountain a little taller and more snow on top, and I would like some random ancient pine forest around the bottom"
  • Psionic Roshambo @ Psionic Roshambo:
    "Now we need a spring fed river flowing down the north side and add some wild life appropriate for the biome"
  • Psionic Roshambo @ Psionic Roshambo:
    Many TBs of assets and the programming of something like that is going to be tough but I think it's something we might see in 20 years maybe sooner
  • The Real Jdbye @ The Real Jdbye:
    @Psionic Roshambo AI assisted game creation is kinda already here, there was recently that AI that can turn any 2D image into a fully modeled 3D scene, it's not perfect, but it's a starting point, beats starting from zero
    The Real Jdbye @ The Real Jdbye: @Psionic Roshambo AI assisted game creation is kinda already here, there was recently that AI...