Homebrew "Keyshuffling Attack for Persistent Early Code Execution in the Nintendo 3DS Secure Bootchain" - (St

Plailect

Well-Known Member
OP
Member
Joined
Jan 30, 2016
Messages
546
Trophies
1
XP
1,502
Country
United States
(Staring and Watching This Repository Helps Me!)

View PDF

Abstract

We demonstrate an attack on the secure bootchain of the Nintendo 3DS in order to gain early code execution. The attack utilizes the block shuffling vulnerability of the ECB cipher mode to rearrange keys in the Nintendo 3DS's encrypted keystore. Because the shuffled keys will deterministically decrypt the encrypted firmware binary to incorrect plaintext data and execute it, and because the device's memory contents are kept between hard reboots, it is possible to reliably reach a branching instruction to a payload in memory. This payload, due to its execution by a privileged processor and its early execution, is able to extract the hash of hardware secrets necessary to decrypt the device's encrypted keystore and set up a persistent exploit of the system.

Background

This IEEE article was written by me (Devon "Plailect" Maloney) in association with ”stuckpixel”, ”SciresM”, ”Gelex”, ”Normmatt”, and ”Aurora Wright” in order to strengthen my academic resume for the purposes of college and university applications. Information in this article (especially the keyshuffling vulnerability) is original, independent work unless cited otherwise. Note that the keyshuffling vulnerability detailed here is the same one documented publicly by much of this team including "stuckpixel" (also known as "dark_samus") on sites such as 3DBrew. Additionally, note that the persistence vulnerability detailed here is the same one documented publicly as "arm9loaderhax" by "plutoo", "derrek", and "smea" at the 2015 32c3 conference.

Starring and Watching the Repository?

The more exposure and interest this paper generates, the easier it is for me to point to it as good academia for schools to see.

Authors

- Devon "Plailect" Maloney (Contributor)
- ”stuckpixel” (Discoverer)
- ”SciresM” (Implementor)
- ”Gelex” (Contributor)
- ”Normmatt” (Contributor)
- ”Aurora Wright” (Implementor)

_________________________

Thanks,
Plailect
 
Last edited by Plailect,

WBW

Active Member
Newcomer
Joined
Mar 9, 2016
Messages
44
Trophies
0
XP
1,009
Country
Good luck!

Typo: "reponsible" in the introduction section's first paragraph.
 
Last edited by WBW,

slaphappygamer

Well-Known Member
Member
Joined
Nov 30, 2008
Messages
4,117
Trophies
2
Age
46
Location
California
XP
7,604
Country
United States
This is awesome! It's a super technical read that is a bit over my head. Still you've drawn out your progress very nicely. I really like the part "We have demonstrated a keyshuffling attack on the secure bootchain of the Nintendo 3DS in order to redirect code flow into insecure memory."
 

GerbilSoft

Well-Known Member
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,249
Country
United States
This is the "OTP-less" exploit, right? Did you ever figure out what caused the random bricks with SafeA9LHInstaller when using OTP-less?
 

evandixon

PMD Researcher
Developer
Joined
May 29, 2009
Messages
1,725
Trophies
0
Website
projectpokemon.org
XP
2,313
Country
United States
Good work. You've earned my star. I did notice a minor typo though. "Importantly, This register is not cleared until the ARM9 firmware binary clears it..." <-- "This" should not be capitalized.

Content question: Wasn't the extra encryption layer the new 3DS introduced called the Kernel9Loader and not the ARM9Loader? Looking at 3D Brew, both are used, so is there a difference between them, or was it renamed to ARM9Loader without all references to Kernel9Loader being replaced?
 

Stephano

pessimism = Realism
Member
Joined
Feb 18, 2016
Messages
1,570
Trophies
0
Location
Nowhere
XP
1,670
Country
United States
Yeah, it's written to follow their standard. The "Institute of Electronics and Electrical Engineers" includes software too :P
That's really interesting. I didn't even know IEEE dabbled in that area. I'm only a sophomore EE student so I'm not to far in it yet
 

Plailect

Well-Known Member
OP
Member
Joined
Jan 30, 2016
Messages
546
Trophies
1
XP
1,502
Country
United States
Good work. You've earned my star. I did notice a minor typo though. "Importantly, This register is not cleared until the ARM9 firmware binary clears it..." <-- "This" should not be capitalized.

Content question: Wasn't the extra encryption layer the new 3DS introduced called the Kernel9Loader and not the ARM9Loader? Looking at 3D Brew, both are used, so is there a difference between them, or was it renamed to ARM9Loader without all references to Kernel9Loader being replaced?

Typo has been fixed. It's called either one depending on who you ask.
 

Zidapi

Well-Known Member
Member
Joined
Dec 1, 2002
Messages
3,112
Trophies
3
Age
42
Website
Visit site
XP
2,681
Country
I hope everyone gets behind you and stars/watches this.

You've made huge, invaluable contributions to this community, it's time we all give back and help you out.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • The Real Jdbye @ The Real Jdbye:
    cyberpunk at 4k without DLSS/fidelityfx *might* exceed 12gb
    +1
  • The Real Jdbye @ The Real Jdbye:
    but that game barely runs at native 4k
  • Psionic Roshambo @ Psionic Roshambo:
    I think it was some newer games and probably poorly optimized PS4 or PS5 ports
  • The Real Jdbye @ The Real Jdbye:
    they definitely will age better but i feel dlss might outweigh that since it looks about as good as native resolution and much less demanding
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    When I played Cyberpunk on my old 2080 Ti it sucked lol
  • The Real Jdbye @ The Real Jdbye:
    AMD could introduce something comparable to DLSS but nvidia's got a lot more experience with that
  • The Real Jdbye @ The Real Jdbye:
    least amd 7xxx has tensor cores which the previous generations didn't so there is the potential for AI upscaling
  • Psionic Roshambo @ Psionic Roshambo:
    They have FSR or whatever it's called and yeah it's still not great
  • 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
    The Real Jdbye @ The Real Jdbye: i don't think they want to take more focus away from their gpus