Brick-Protect 3DS - For GW2.02B Users

Discussion in 'NDS - Emulation and Homebrew' started by Foxi4, Jan 14, 2014.

  1. Foxi4
    OP

    Foxi4 On the hunt...

    pip Reporter
    23,548
    21,515
    Sep 13, 2009
    Poland
    Gaming Grotto
    [​IMG]

    The recent happenings on the scene worried me - there's quite a commotion with Gateway's 2.02B firmware which allegedly has a built-in Brick routine which kicks in if Launcher.dat's Checksums do not check out, namely if the file was modified in any way. Unfortunately, this "Bricking" situation might affect legitimate Gateway users due to SD corruption... which means having to periodically check Launcher.dat's checksum, defeating the purpose of "portability".

    To prevent that from being an issue, I coded Brick-Protect 3DS. The program uses Bobobobo’s MD5 C++ implementation to check the MD5 checksum of Launcher.dat, compare it with the verified and correct MD5 and warn the user in the event that inconsistencies are detected. If the Launcher.dat file is not detected or if FAT cannot be initialized, the program will inform you about the issue and automatically terminate after a couple seconds.

    Before anyone mentions it, yes, I know MD5 has vulnerabilities, but it works blazing fast on the DS, so I have no complaints - it's better than nothing.

    Testing would be appreciated! If this saves at a single 3DS from getting bricked, the work was worth it.

    PS: Forgive the absolutely terrible graphics, this was really hastily made. I'll improve upon it later, for now, what matters is that it works, at least on my end.

    EDIT: My eagerness proved to be my own undoing. Version 0.2 allows for a delayed start, so that the user can switch microSD cards before performing the verification, a feature that should've been there from the start. :rofl2:

    Instructions:
    1. Start the application on any DS-MODE flashcart
    2. Once prompted, remove the SD card from your flashcart (If necessary. The stylus is pretty helpful with this step!) and switch it with the one containing Launcher.dat. If your Launcher is on a full-sized SD card, you're unfortunately out of luck
    3. Once the switch is complete, press the START button to mount the newly-inserted SD and begin the verification process
    In my test environment, this did not cause the application to hang, here's for hoping that it works the same way for you guys.

    Download Here (v.0.2)
     


  2. gamesquest1

    gamesquest1 Nabnut

    Member
    14,134
    9,477
    Sep 23, 2013
    you haven't put any brick code in have you that bricks it if i rename the file? XD
     
  3. Arras

    Arras GBAtemp Guru

    Member
    5,861
    2,676
    Sep 14, 2010
    Netherlands
    Apparently the launcher has an initial check to see if it's corrupted. If it fails, it just refuses to start. If that check is patched around like in the clone cards and the region free mod, that's when the brickin' happens. But the idea is nice, I suppose.
     
    cearp likes this.
  4. Foxi4
    OP

    Foxi4 On the hunt...

    pip Reporter
    23,548
    21,515
    Sep 13, 2009
    Poland
    Gaming Grotto
    No. :rofl2:


    (:ninja:)


    Fair enough, I didn't know that. That being said, better safe than sorry.
     
    gamefan5 likes this.
  5. json

    json MUSCLEMAN

    Member
    693
    781
    Aug 9, 2013
    Burkina Faso
    Actually you can modify the Launcher.dat file randomly and it will just hang the 3DS, it will not load. GW has a sanity check to prevent random corruption.

    HOWEVER

    Normmatt patches to Launcher.dat and R4i/3DSLink specially crafted a modified Launcher.dat which neutralize the GW sanity check, but they got themselves burned by this.

    So moral is: you can randomly change the file, and still be safe.
     
  6. Foxi4
    OP

    Foxi4 On the hunt...

    pip Reporter
    23,548
    21,515
    Sep 13, 2009
    Poland
    Gaming Grotto
    Looks like I wasted an hour or two then - I didn't know about the sanity check.

    That being said, it might still be useful in checking whether or not the source you got your Launcher from was "savoury"... I dunno... I tried to help. :rofl2:
     
  7. DinohScene

    DinohScene Capture the Dino

    Member
    GBAtemp Patron
    DinohScene is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    16,026
    12,542
    Oct 11, 2011
    Antarctica
    В небо
    Neat fox~
     
  8. Nightwish

    Nightwish GBAtemp Fan

    Member
    372
    203
    Oct 16, 2013
    Portugal
    That's irrelevant in this case, you're not using it for security (random files off the internet) but for a consistency check from a known location.
     
  9. Foxi4
    OP

    Foxi4 On the hunt...

    pip Reporter
    23,548
    21,515
    Sep 13, 2009
    Poland
    Gaming Grotto
    You can fake MD5 checksums... it's quite a bit of work, but technically you can create two completely different files with an identical checksum. ;)
     
  10. Nightwish

    Nightwish GBAtemp Fan

    Member
    372
    203
    Oct 16, 2013
    Portugal
    But like I said, you know where you got the file and why would gateway send you a fake one? Unless you suspect the NSA cares enough to do it...
     
  11. Foxi4
    OP

    Foxi4 On the hunt...

    pip Reporter
    23,548
    21,515
    Sep 13, 2009
    Poland
    Gaming Grotto
    I was thinking more about clone card manufacturers and their Launchers, but fair enough, you have a point. :rofl:
     
  12. gamefan5

    gamefan5 Kid Icarus Uprising connoiseur

    Member
    4,946
    2,071
    Aug 29, 2010
    Canada
    Somewhere in this Earth
    You tried bro. That's good enough for us. :D
     
  13. Arras

    Arras GBAtemp Guru

    Member
    5,861
    2,676
    Sep 14, 2010
    Netherlands
    One thing to add for people too lazy to read the thing:
    It only matters if the malicious party is the one who uploaded the original, good file as well.
     
  14. Foxi4
    OP

    Foxi4 On the hunt...

    pip Reporter
    23,548
    21,515
    Sep 13, 2009
    Poland
    Gaming Grotto
    Ah, yes, I completely forgot about that - silly me. ;)
     
  15. cearp

    cearp the ticket master

    Member
    7,510
    4,744
    May 26, 2008
    Tuvalu
    yeah, it's not like changing one byte of the launcher is going to make you brick...
    but still, thanks for the effort of making this
     
  16. iCEQB

    iCEQB GBAtemp Advanced Fan

    Member
    682
    447
    Nov 2, 2013
    United States
    Can you read the SD card from within the NDS mode?
     
  17. Foxi4
    OP

    Foxi4 On the hunt...

    pip Reporter
    23,548
    21,515
    Sep 13, 2009
    Poland
    Gaming Grotto
    As long as the SD that's being read is in a DS-Mode flashcart - yes. From the SD slot? No.

    EDIT: Now that you mention it, I should probably allow the users to switch SD cards on-the-fly before performing the verification - I didn't think of that. My bad, maybe in the next update, if there'll be any need for this kind of an app.
     
  18. iCEQB

    iCEQB GBAtemp Advanced Fan

    Member
    682
    447
    Nov 2, 2013
    United States
    So your app doesn't check the SD card that you plug in the 3DS correct?
     
  19. Foxi4
    OP

    Foxi4 On the hunt...

    pip Reporter
    23,548
    21,515
    Sep 13, 2009
    Poland
    Gaming Grotto
    No, it does not. DS-Mode has no access to the 3DS's SD card slot. This is just an MD5 verifier for DS-Mode.
     
  20. iCEQB

    iCEQB GBAtemp Advanced Fan

    Member
    682
    447
    Nov 2, 2013
    United States
    But I don't understand the point :wtf:
    You are checking the "Launcher.dat" on the micro SD in the NDS Flashcart?

    No offense man, but that doesn't prevent you from nothing .... and it's also not portable either.
    How are you supposed to get the Launcher.dat on the SD card after you checked with your app? (without any computer near by).
    And since your app can't access the SD card (which is a limit from the console, not your app), there is still a chance that your SD card is messed up ... and it has been proven that this can also be a cause of bricking your 3DS.

    This is no critic to your app, it's good that you are trying to help .... but it's not protecting you from bricking your 3DS.