Tutorial  Updated

Hacking the latest firmware of 3DS - ARM9 Hack

Notice
You may know that I do NOT intend to promote piracy. I believe PSP hacking scene was so successful because less people regarded piracy as their goal.

What is ARM9
3DS has two CPU and they have different architectures. I'll call them with the name of their architecture: ARM9 and ARM11.
The main reason why it has two CPU is compatibility; ARM9 is compatible with DS while ARM11 is used to improve the performance. However, the design also improves the security by letting ARM9 play the role related to the security.

Vulnerability on ARM9
ARM9 has all permissions on 3DS and it can do most things. For example, ARM9 can make ARM11 execute arbitrary code. It means ARM9 is always the target for hacking.

Practice
ARM9 has several interfaces and you'll hack it with them. The most largest part is PXI.

PXI
PXI is the interface for Process9, a process running on ARM9. Process9 has services which executes commands sent by ARM11. 3dbrew.org has the list for those services.
http://3dbrew.org/wiki/PXI_Services/

The protocol is also explained on the site.
http://3dbrew.org/wiki/PXI_Registers/

The site also has descriptions for commands, but they are incomplete.
http://www.3dbrew.org/wiki/Services_API/

As you can see, it doesn't have so many commands. That's the advantage of the design. You must hack those commands, which are the most secure part.
But it doesn't mean 3DS can't be hacked. It depends on who does.

Debugging
Unfortunately, we don't have a debugger working "well". The largest reason is that few people tried to do that. But I don't recommend you to make a new debugger. As I said, the system is divided into ARM9 and ARM11 and ARM9 plays only the security-related role. It's nearly impossible to communicate with PC via Wi-Fi or IR.
However you don't have to abandon. I developed an exception handler for ARM9 on rxTools which displays exceptions on the display. I recommend to use this.

rxTools
It hooks SWI on ARM11 because it needs ARM11 to handle LCD. So something must call SVC on ARM11. Anyway, "something" should always call SVC even if you don't.

When an exception occurred, the handler sets the address of the framebuffer to the top of the VRAM (0x18000000) and it writes exception information to VRAM. You can change the color of the background by clearing VRAM before an exception occurred because the rest is left as it is. Otherwise it shows garbage on VRAM.

2015-07-31-exception.jpg

You can see what is the "garbage". In the next, I'll explain the information described on the display.

Type
The document by ARM is good for this.
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ihi0014q/I84795.html

If you have "Data Abort" with a writing instruction, it may be exploitable.
If you have "Prefetch Abort", it may be exploitable.
If you have "Data Abort" with a reading instruction, disassemble and study well. If you can't figure out, try to input some valid value, or ask someone skillful.

Registers
ARM provides documentation.
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337h/Chdedegj.html

If you got LR control, you are likely to exploit it. The final goal is to control PC (and execute your own code) .
 
Last edited by 173210, , Reason: Fix URLs

motezazer

Well-Known Member
Member
Joined
Feb 6, 2015
Messages
1,214
Trophies
0
Age
24
XP
1,442
Country
France
I know that, but if we find an exploit that will let us access the AM service and getting FBI to work will be easier then going right to unsigned CIA's. I think unsigned CIA's should never be what we are aiming for in 9.3 and up. Getting a way to install legit CIA's would be better and allow downgrading.
And how do you install a downgraded NATIVE_FIRM?
AM:NET is not enough to downgrade.
 

WateredFire19

Banned!
Banned
Joined
Aug 23, 2014
Messages
642
Trophies
0
Age
39
XP
291
Country
United States
If I was an hacker, I had waited for gateway to support 9.9, then I had stolen his work by creating a cfw
No one will wait for that. It's better to wait till Smea releases the NH 2.0 source code, which actually should not be too long because Nintendo should release a new FW that patches it pretty soon.

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

AM:NET is not enough to downgrade.
Not downgrading the whole system, but only that parts that patch MSET, spider, Ninjhax 1.x, etc. AM has enough to access to install legit CIA's, as we have previously learned.
 

173210

Well-Known Member
OP
Member
Joined
Jan 22, 2014
Messages
245
Trophies
0
Age
26
Location
Japan
Website
173210.github.io
XP
683
Country
If I was an hacker, I had waited for gateway to support 9.9, then I had stolen his work by creating a cfw
I'm lazy, so I made ARM9 exception handler and wait for other hackers, then I'll stole their work saying "thanks to <put their names>!!!" LOL
 

dubbz82

Well-Known Member
Member
Joined
Feb 2, 2014
Messages
1,572
Trophies
0
Age
41
XP
1,215
Country
United States
How about jtag or modchip, I think if the software based hack is blocked, we can switch to hardware based :D

There's a couple problems with this - One there's several different boards, so the configuration of a proposed modchip might be difficult, also at least with some models, there's not particularly a ton of room to work with. Secondly, this would require someone to first develop the hardware, secondly sell the hardware - which would lead to people being forced to yet again support a device who's primary purpose is piracy. The problem with the JTAG route is well...not everything CAN be JTAG'ed. not sure if this is the case or not, but once again, someone would have to go through the trouble of working out how to actually DO a JTAG to a 3ds (if it's even possible...) and somehow work out methods that are relatively stable. The reason that this happened with the xbox 360, for example, is because quite literally EVERY other avenue was exhausted. on the 3ds we still have an entry point - actually a few of them (cubic ninja and OOT are both still very much plausible) and we have some more information in this thread on how to potentially work out the rest of it from there. Going with a pure hardware solution really should be a last resort, as it's expensive (not only for the buyer, but for the people that have to engineer and produce it as well).
 

Neru

Well-Known Member
Member
Joined
Feb 11, 2015
Messages
371
Trophies
0
Age
26
XP
1,338
Country
United States
Now that this topic is up I have a question. I've heard that from fw 9.3 to 9.5 some firmlaunch file was not patched, would it be a higher chance to hack from 9.3 to 9.5?
 

piratesephiroth

I wish I could read
Member
Joined
Sep 5, 2013
Messages
3,453
Trophies
2
Age
103
XP
3,233
Country
Brazil
AM:NET is not enough to downgrade.

I wonder... Isn't it possible to decrypt the whole NAND already? (as long as we're able to get the xorpads)
If that's the case, then wouldn't it be enough to obtain access to the crypto functions (and NAND reading access too?), so we could use a hardware mod to dump the NAND, decrypt it, replace certain files with older vulnerable versions, encrypt again and then reflash?
 

motezazer

Well-Known Member
Member
Joined
Feb 6, 2015
Messages
1,214
Trophies
0
Age
24
XP
1,442
Country
France
I wonder... Isn't it possible to decrypt the whole NAND already? (as long as we're able to get the xorpads)
If that's the case, then wouldn't it be enough to obtain access to the crypto functions (and NAND reading access too?), so we could use a hardware mod to dump the NAND, decrypt it, replace certain files with older vulnerable versions, encrypt again and then reflash?
Each NAND has its own encryption...
And EVEN if that was not the case, there is self-signing of important system files that disallow downgrading by NAND mod.
 

piratesephiroth

I wish I could read
Member
Joined
Sep 5, 2013
Messages
3,453
Trophies
2
Age
103
XP
3,233
Country
Brazil
Each NAND has its own encryption...
And EVEN if that was not the case, there is self-signing of important system files that disallow downgrading by NAND mod.
Well I don't know anything about this self-signed thing but I thought something we already do, like replacing Health and Safety with FBI, could possibly help in a downgrade process.,
 

Vappy

Well-Known Member
Member
Joined
May 23, 2012
Messages
1,508
Trophies
2
XP
2,613
Country
Well I don't know anything about this self-signed thing but I thought something we already do, like replacing Health and Safety with FBI, could possibly help in a downgrade process.,
To launch replaced apps you need to have signature checks disabled, and to have that you need an ARM9 exploit, which, if you have one, kind of negates the point of downgrading.
 

piratesephiroth

I wish I could read
Member
Joined
Sep 5, 2013
Messages
3,453
Trophies
2
Age
103
XP
3,233
Country
Brazil
To launch replaced apps you need to have signature checks disabled, and to have that you need an ARM9 exploit, which, if you have one, kind of negates the point of downgrading.
Even if they're authentic apps? I'm not talking about inserting a homebrew, but an older version of the same app. System titles use the same ticket on all 3DSs.
 

AliTheAce

Well-Known Member
Member
Joined
May 11, 2015
Messages
103
Trophies
0
Age
25
XP
202
Country
Canada
Just a heads up: Ironhax installer source code is released. I hope this is beneficial to the 9.3+ CFW scene, if it comes into being
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: @OctoAori20, Cool. Same here.