Kinda stupid question about assembly.

Discussion in '3DS - Homebrew Development and Emulators' started by shutterbug2000, Feb 1, 2015.

  1. shutterbug2000
    OP

    shutterbug2000 Cubic NINJHAX!

    Member
    1,078
    2,085
    Oct 11, 2014
    United States
    So, if I have an elf file(processor code, correct?), couldn't I
    1. Load that file into memory
    2. Use arm's jump(whatever it's called) to jump to that file in memory?

    I know, this probably makes me sound like an idiot, but I've never been good with asm.

    Just an idea!
     
  2. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23,180
    8,922
    Nov 21, 2005
    Yes and no.

    Traditionally a lot of hacks have used this concept in one form or another. The classical game save triggered buffer overflow being just one example.

    The problems you tend to face are the file not being compiled/assembled for the memory location you want to stick it in, this is easily solved though.
    The bigger one here is that the 3ds has been seen to use so called executable memory paging, or a no execute bit, to stop the device from running code originally sourced in areas of memory not designated as for executable code. Not an insurmountable obstacle by any means but one that does rather frustrate

    Have a watch of the following video (Blackhat 2010 - Return-Oriented Exploitation in case that video no longer exists when someone comes to watch it)