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

  • Thread starter Thread starter Plailect
  • Start date Start date
  • Views Views 4,300
  • Replies Replies 15
  • Likes Likes 27

Plailect

Well-Known Member
Member
Joined
Jan 30, 2016
Messages
546
Reaction score
1,317
Trophies
1
XP
1,525
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,
Good luck!

Typo: "reponsible" in the introduction section's first paragraph.
 
Last edited by WBW,
Weirdly I went on your GitHub this morning and saw it but was too distracted reading the 3DS guide to query if it was a new thing.

Congrats it sounds excellent!
 
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."
 
This is the "OTP-less" exploit, right? Did you ever figure out what caused the random bricks with SafeA9LHInstaller when using OTP-less?
 
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?
 
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
 
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.
 
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