How to build a .bin executable for NDS?

jaimin1k

New Member
OP
Newbie
Joined
Jan 3, 2015
Messages
3
Trophies
0
XP
61
Country
United States
There's this exploit for the NDS I've been interested in trying out myself:



The code being executed is a "code.bin" which is actually compiled into the audio file (source code in the description) but the code.bin used in the demonstration video is not included. How would I go about making my own? I already have devkitPro, could I just use that?
 

Coto

-
Member
Joined
Jun 4, 2010
Messages
2,934
Trophies
2
XP
2,411
Country
Chile
[demo audio WAV,having the arm9.bin embedded into it]
http://web.archive.org/web/20150405014143/http://smealum.net/soundhax.wav

The whole program you linked, seems to exploit a vulnerability in the mic -> readbuffer decompressor code found in that game. Which will then cause the embedded arm9.bin within the audio WAV (signal transferred to the internal DS buffer) to run.

So my guess that would be a binary ARM9 payload. (ARM9 payload having an entrypoint, stack address and program on itself).
Yes you need some toolchain to build an ARM9 binary like that. That would mean building an ordinary NDS homebrew having two folders: arm7 and arm9, and then you'd only copy the arm9.bin one generated from the /arm9 folder. If instead you get an arm9.elf, you need to run "objcopy -S -O binary arm9.elf arm9.bin" to generate a raw executable ARM binary out of said .ELF
 
Last edited by Coto,
  • Like
Reactions: cimo95
General chit-chat
Help Users
  • No one is chatting at the moment.
    DinohScene @ DinohScene: :tpi: