Homebrew How does .sav buffer overflow work?

_V1qY

Well-Known Member
OP
Member
Joined
May 31, 2012
Messages
138
Trophies
0
XP
166
Country
I know that you can use eepinator to extract the .sav of a game and put it back in but how do you modify it to contain code?

I know that a buffer overflow is required, for example the name of the player or something. But is there some kind of checksum which has to be assigned for .sav files? Because it isn't working for me.
 

SifJar

Not a pirate
Member
Joined
Apr 4, 2009
Messages
6,022
Trophies
0
Website
Visit site
XP
1,175
Country
Yes, in most cases games will apply checksums to their saves. These can vary greatly from game to game as far as I know, and you basically need to reverse engineer the game's binary to work out the checksum calculations for a particular game. Then you can write a program/script to apply that checksum to your save file, make the modifications you want to make, apply the checksums and the game should accept it.

But there are a few other things to consider:

(i) you need some way of monitoring the RAM of the DS in real time while loading the save so you can see what areas of RAM you are having an influence on. If you manage to achieve a crash, you need an exception handler to show you which instruction is crashing, so you can work out if the crash is exploitable or not. The closest thing I can think of is the Action Replay Trainer Toolkit, which can do the former (monitor RAM), but I don't think the later (handling exceptions). I don't know of anything for doing the later, actually. (Could possibly be done using NO$GBA's debugger, but that's not running on hardware, although in theory it should be the same; if you can get it working on the emulator, it should probably work on hardware)

(ii) DS save game exploits are pointless. For DS and DS Lite (and DS mode on DSi and 3DS), we already have homebrew execution via flash cards. There's no need for any alternative method, especially seeing as it would require a method for running homebrew to get the save onto the cart (or an R4i Save Dongle, which I believe is more expensive than a flash card anyway).
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Veho @ Veho:
    That's a relief to hear. Do you know what happened?
  • SylverReZ @ SylverReZ:
    @BakerMan, Any idea what happened? I hope that your brother's doing good.
  • BakerMan @ BakerMan:
    Well, from what I've heard from my parents, he had a seizure last night, perhaps an epileptic episode, fucking died, had a near death experience, my dad called the paramedics, they showed up, took him to the hospital, and he woke up covered in tubes, and started complaining.
  • BakerMan @ BakerMan:
    He couldn't eat until after his MRI, when he had a bomb pop.
  • BakerMan @ BakerMan:
    What matters now is that he's doing alright.
  • Veho @ Veho:
    But you still don't know what it was?
  • Veho @ Veho:
    Has he had seizures before?
  • The Real Jdbye @ The Real Jdbye:
    apparently stress can cause seizures, my brother had one during a test once
  • The Real Jdbye @ The Real Jdbye:
    never had one before that, and never had one since
  • Redleviboy123 @ Redleviboy123:
    Question about game texture chanching Do i need an own game id?
  • The Real Jdbye @ The Real Jdbye:
    @Veho for those that want to
    experience being sonic the hedgehog
  • Veho @ Veho:
    Ah, you mean
    furries.
    +1
  • The Real Jdbye @ The Real Jdbye:
    well, sonic fans are a whole separate thing from furries
  • The Real Jdbye @ The Real Jdbye:
    like bronys
  • The Real Jdbye @ The Real Jdbye:
    sonic porn is too weird even for me
  • Dumpflam @ Dumpflam:
    bruh
  • Dumpflam @ Dumpflam:
    guys how do i delete a post
  • The Real Jdbye @ The Real Jdbye:
    you don't
  • The Real Jdbye @ The Real Jdbye:
    you can report it and request deletion
  • BakerMan @ BakerMan:
    Also, no, that was his first time having a seizure, and hopefully the last
    +1
  • K3Nv2 @ K3Nv2:
    Ea play raised priced to $6 a month lol
  • BigOnYa @ BigOnYa:
    Same with uremum, she's now $2 a month
  • K3Nv2 @ K3Nv2:
    Also seizures come and and go they don't have an off switch like that it all depends
    K3Nv2 @ K3Nv2: Also seizures come and and go they don't have an off switch like that it all depends