Before I say anything, new to this forum, I think this is the correct place but as it can be used for other things I don't exactly know. Feel free to move it and shout at me.
So first things first, the 3ds seems to store it's downloadable software's save data/extra data on the sdcard, so the saves are directly modifiable (Possibly, don't know if someone else talked about this but i couldn't find anything else like it) but instead of ruining your main save with this, you can use the save data backup which 'backs up' your software/game's save data to your SD Card in the directory SD Card\Nintendo 3DS\(combination of 32 characters, letters and numbers)\(combination of 32 characters, letters and numbers, again but different combo)\backup. instead, if you make a backup, then another identical one, you can use the second backup for modifying and the first to play the game legitimately.
Usually, you can just tap the little arrow to the left of the 'Open' button and tap Save Data Backup, then follow instructions on screen, but for some games (if instead of exploiting code you want to mod a save), backup does not work, so you will have to directly modify the save, thanks to information given by nanika, you can find the direct save in X:/Nintendo 3DS/[random]/[random]/title/[game-specific]/[game-specific]/data/*.sav
For me, in that backup directory there is just 1 folder, but if you have backed other things up there may be more, then afterwards another combination of letters and numbers which may be some sort of title id, in there you find the save files of your software in question, mine was the file 000001.sav as you can see here:
The process to verify i could make apply-able changes to the file and then restore it as a a backup were:
1. Open the file with a hex editor (To avoid encryption confusing text editor)
2. Change a bunch of bits with corrupted data (keyboard mashing)
3. Extend the file by adding more null byte data on the end
4. Save changes and overwrite the old sav file.
5. Plug SD back into 3DS
6. Go into System Settings>Data Management>Save Data Backup and restore my newly corrupted save from my sdcard back into NAND.
Upon running the game I am greeted with this:
This is because the save is corrupted and decryption failed (thanks nanika), but I intend to somehow find a way of universally getting that code (maybe by first making a buffer overflow and watching the game decrypt the data as it's running or something, not got this far yet)
Reply if you had any findings or found out how to actually edit something. a few interesting code injections could be done with buffer overflows and utilizing the large zero areas in the save(s). I don't know if it is just me, but my save had a lot of these.
This is on firmware 9.7.0-25E
Info on new possible buffer overflow/memory leak attempts:
Again, like ninjhax was it could possibly have a new and working sibling, that hasn't been patched by nintendo in firmware 9.5, I need help working out how QR codes work in the game PYRAMIDS, which even has a demo available to run it as a test, 30 times, I also need to know how to put RAW data/hex data into a qr code which is encoded correctly for the game (search pyramids qr code on google images to see loads). I have attempted to make a large qr code, but i can't scan it with pyramids as it doesn't get enough detail to see the full thing.
So first things first, the 3ds seems to store it's downloadable software's save data/extra data on the sdcard, so the saves are directly modifiable (Possibly, don't know if someone else talked about this but i couldn't find anything else like it) but instead of ruining your main save with this, you can use the save data backup which 'backs up' your software/game's save data to your SD Card in the directory SD Card\Nintendo 3DS\(combination of 32 characters, letters and numbers)\(combination of 32 characters, letters and numbers, again but different combo)\backup. instead, if you make a backup, then another identical one, you can use the second backup for modifying and the first to play the game legitimately.
Usually, you can just tap the little arrow to the left of the 'Open' button and tap Save Data Backup, then follow instructions on screen, but for some games (if instead of exploiting code you want to mod a save), backup does not work, so you will have to directly modify the save, thanks to information given by nanika, you can find the direct save in X:/Nintendo 3DS/[random]/[random]/title/[game-specific]/[game-specific]/data/*.sav
For me, in that backup directory there is just 1 folder, but if you have backed other things up there may be more, then afterwards another combination of letters and numbers which may be some sort of title id, in there you find the save files of your software in question, mine was the file 000001.sav as you can see here:
The process to verify i could make apply-able changes to the file and then restore it as a a backup were:
1. Open the file with a hex editor (To avoid encryption confusing text editor)
2. Change a bunch of bits with corrupted data (keyboard mashing)
3. Extend the file by adding more null byte data on the end
4. Save changes and overwrite the old sav file.
5. Plug SD back into 3DS
6. Go into System Settings>Data Management>Save Data Backup and restore my newly corrupted save from my sdcard back into NAND.
Upon running the game I am greeted with this:
This is because the save is corrupted and decryption failed (thanks nanika), but I intend to somehow find a way of universally getting that code (maybe by first making a buffer overflow and watching the game decrypt the data as it's running or something, not got this far yet)
Reply if you had any findings or found out how to actually edit something. a few interesting code injections could be done with buffer overflows and utilizing the large zero areas in the save(s). I don't know if it is just me, but my save had a lot of these.
This is on firmware 9.7.0-25E
Info on new possible buffer overflow/memory leak attempts:
Again, like ninjhax was it could possibly have a new and working sibling, that hasn't been patched by nintendo in firmware 9.5, I need help working out how QR codes work in the game PYRAMIDS, which even has a demo available to run it as a test, 30 times, I also need to know how to put RAW data/hex data into a qr code which is encoded correctly for the game (search pyramids qr code on google images to see loads). I have attempted to make a large qr code, but i can't scan it with pyramids as it doesn't get enough detail to see the full thing.