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
0
XP
1,471
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
39
Trophies
0
XP
602
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
3,546
Trophies
1
Age
44
Location
California
XP
4,228
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,378
Trophies
1
Age
32
XP
3,897
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,271
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,605
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
0
XP
1,471
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,092
Trophies
1
Age
39
Website
Visit site
XP
2,510
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.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
    KennieDaMeanie @ KennieDaMeanie: What