Hacking [Release] 3DSafe: In-NAND PIN lock for 3DS

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
Country
ok, i can now confirm this wasnt just my eyes playing tricks on me, same thing just happened on a 2DS, so it may be an amazing o3ds exclusive bug :P
20160920_233445.jpg
(not my real pin, so please don't steal my 3ds :P)
and i can confirm its just a visual glitch, the password remains as the first 10 buttons
That's so weird. Does it do it only when entering the PIN on initial setup, or also when changing it subsequently?

Testing with a USA O3DS now. :)
Thanks!

EDIT: I have to use the OTP bypass for this update to work, it seems.
You shouldn't need to. Are you pressing X in the 3DSafe options to enter the built-in SafeA9LHInstaller? If so, what happens when you do this?

I don't see an option to enter a PIN shorter than 10 characters and have it accept that.
Press START when you've finished entering your PIN if it's shorter than 10 characters.
 

gamesquest1

Nabnut
Former Staff
Joined
Sep 23, 2013
Messages
15,153
Trophies
2
XP
12,247
That's so weird. Does it do it only when entering the PIN on initial setup, or also when changing it subsequently?


Thanks!


You shouldn't need to. Are you pressing X in the 3DSafe options to enter the built-in SafeA9LHInstaller? If so, what happens when you do this?


Press START when you've finished entering your PIN if it's shorter than 10 characters.
seems to be just on the initial setup
 

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
Country
seems to be just on the initial setup
Actually I'm seeing a bug with this on n3DS too now. If I delete the 3dsafe folder on CTRNAND to simulate a new setup, I can only enter 10 characters for the PIN but it duplicates the last one when confirming the new PIN. Is this what's happening for you? Or does it actually allow you to enter 12 characters for the PIN and only then display what you entered?

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

Actually I think I might have found the problem. The buffer for entering a PIN is too short to include a null terminator so I think there's garbage being included at the end of the strong. I think I just need to make the buffer 1 byte larger. I'll try it when I'm home.

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

Wait no that's not it. The buffer isn't treated as a string. Ok I'll need to look more closely when I'm home.
 
  • Like
Reactions: gamesquest1

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
Country
Actually I think I might have found the problem. The buffer for entering a PIN is too short to include a null terminator so I think there's garbage being included at the end of the strong. I think I just need to make the buffer 1 byte larger. I'll try it when I'm home.
Wait no that's not it. The buffer isn't treated as a string. Ok I'll need to look more closely when I'm home.
Actually, I think that was the problem :P The buffer for the entered PIN is treated as a string on this line; Due to the lack of null terminator, it was overflowing beyond the string and collecting characters from elsewhere in memory. I've increased the buffer size by one byte and it seems to be ok now. I'll just do a bit more testing then push the changes up to GitHub.
 

ghostpotato

Well-Known Member
Member
Joined
Mar 27, 2016
Messages
142
Trophies
0
Age
43
XP
89
Country
United States
Found my OTP! :yay3ds:

USA O3DS 11.0.0-33U
PIN setting works: yes
PIN changing works: yes
PIN checking works: yes
OTP bypass works: yes
Payload booting works: yes
Emergency payload works: yes
Integrated SafeA9LHInstaller works: yes
Disable PIN works: yes

I also tested these three:
Hold last char of PIN to access menu: yes
Autoboot payload: yes
Skip PIN on soft reboot: yes

Should I also test with the graphics as well? Also a bug: in text mode, when you set or change your PIN, the characters for your PIN overlap the other text on the screen. For instance:

Zq7F2GE.jpg
 

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
Country
Thanks @ghostpotato!
Great to have another o3DS test done. Don't worry about testing with gfx. It's more about ensuring the crucial features like OTP bypass and SA9LHI work properly as without these you can't recover from list PIN or other problems. I hadn't noticed that overwritten text problem but I've just amended the position of the text and it's ok now. Thanks for highlighting it!

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

Ok guys, pre-prelease 0.10 is now up on GitHub releases. This should solve the problems of extra characters being printed when displaying the PIN, and also the overlapping text when entering the PIN using text mode. @gamesquest1 and @ghostpotato, please could you both give this update a try and let me know if it has rectified the problem?

Apart I've now had confirmed reports that everything is working fine on all hardware types and from both EUR and USA regions. I have no reason to believe that there would be an issue in JAP or KOR regions, so once these minor cosmetic problems have been confirmed resolved I'm going to 1.0 :)
 
  • Like
Reactions: metroid maniac

ghostpotato

Well-Known Member
Member
Joined
Mar 27, 2016
Messages
142
Trophies
0
Age
43
XP
89
Country
United States
Ok guys, pre-prelease 0.10 is now up on GitHub releases. This should solve the problems of extra characters being printed when displaying the PIN, and also the overlapping text when entering the PIN using text mode. @gamesquest1 and @ghostpotato, please could you both give this update a try and let me know if it has rectified the problem?

Apart I've now had confirmed reports that everything is working fine on all hardware types and from both EUR and USA regions. I have no reason to believe that there would be an issue in JAP or KOR regions, so once these minor cosmetic problems have been confirmed resolved I'm going to 1.0 :)

Sure! I'll test 0.10 as soon as I get home. :)

EDIT: Tested; PIN now displays properly. :yay3ds:
 
Last edited by ghostpotato,

Ichigo1000

Well-Known Member
Member
Joined
May 6, 2015
Messages
524
Trophies
0
XP
695
Country
United States
The installation tutorial doesn't talk about the changing of a custom image on the top screen. Is it just not updated, or is it not a feature yet?
 

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
Country
The installation tutorial doesn't talk about the changing of a custom image on the top screen. Is it just not updated, or is it not a feature yet?
Well, the .bin files in the 3dsafe folder can be replaced to change the appearance of the top screen. You would create them in the same way as the bottom screen, though the sizes would of course need to be adjusted. I didn't include it in the installation instructions since this isn't a requirement for installation. It could perhaps be added in a separate section of the readme.
 

Purple_Heart

GBATemp´s weirdest Individual
Member
Joined
Oct 11, 2015
Messages
4,392
Trophies
1
Age
28
Location
Hamburg
XP
3,724
Country
Germany
i have an issue with Gateway. the 11.1 patched GW dont work with 3dsafe (blackscreen). please fix it. i love 3dsafe but cant use it due to this problem.
 
Last edited by Purple_Heart,

ghostpotato

Well-Known Member
Member
Joined
Mar 27, 2016
Messages
142
Trophies
0
Age
43
XP
89
Country
United States
i have an issue with Gateway. the 11.1 patched GW dont work with 3dsafe (blackscreen). please fix it. i love 3dsafe but cant use it due to this problem.
Do you have screen-init (i.e. does your screen turn on, then off, then boot to the Home Menu when you turn your 3DS on)? My guess (correct me if I'm wrong) is that this needs screen-init.
 

MadMageKefka

Well-Known Member
Member
Joined
Apr 28, 2016
Messages
1,672
Trophies
0
Age
36
Location
World of ruin
XP
1,915
Country
United States
@mashers I am by no means trying to be impatient, or rush a release. That being said, I'm curious as to what's going on with the project. You said in an earlier post you were just about ready to release v1.0 after the cosmetic fixes you implemented were confirmed to have been fixed, and it seems they were.

Again, not trying to be impatient in the least, I'm more just wondering if you are caught on another snag, or if things need more testing, or maybe if you're working on another feature, or just simply haven't had time? Haven't heard much in a few days and with this thread / project taking off so quickly at the start, my curiosity has gotten the better of me.
 

Quantumcat

Dead and alive
Member
Joined
Nov 23, 2014
Messages
15,144
Trophies
0
Location
Canberra, Australia
Website
boot9strap.com
XP
11,094
Country
Australia
@mashers I am by no means trying to be impatient, or rush a release. That being said, I'm curious as to what's going on with the project. You said in an earlier post you were just about ready to release v1.0 after the cosmetic fixes you implemented were confirmed to have been fixed, and it seems they were.

Again, not trying to be impatient in the least, I'm more just wondering if you are caught on another snag, or if things need more testing, or maybe if you're working on another feature, or just simply haven't had time? Haven't heard much in a few days and with this thread / project taking off so quickly at the start, my curiosity has gotten the better of me.
The last commit was 8 days ago so I'd say he's just been too busy to work on the project.
 

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
Country
Due to the new OTP-less installation option for A9LH, I'm currently changing over from OTP bypass to using the SHA-256 hash as the bypass. This means adding a function to dump the hash to a file, and check for a match with the hash in memory if the file is present on the SD card. Once this is done I'll upload another beta for testing before going to 1.0.
 

capito27

Well-Known Member
Member
Joined
Jan 19, 2015
Messages
874
Trophies
0
XP
1,230
Country
Swaziland
Due to the new OTP-less installation option for A9LH, I'm currently changing over from OTP bypass to using the SHA-256 hash as the bypass. This means adding a function to dump the hash to a file, and check for a match with the hash in memory if the file is present on the SD card. Once this is done I'll upload another beta for testing before going to 1.0.
protip, instead of changing it, simply check the file length of the OTP.bin, if the size is 256 bytes (i believe OTP is 256 bytes long, check yourself), it's an OTP, so hash it and compare to the system hash, otherwise just compare the file contents to the hash directly.
 
Last edited by capito27,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    S @ salazarcosplay: How are you @AncientBoi :tpi: :tpi: :tpi: :tpi: :tpi: