0x1508 exploit help question (also easy battle/no weather ACE)?
Posted by: Torchickens
Date: 2020-02-25 13:00:20
From the wiki thanks to pfero:
If the player has the ability to put arbitrary data in a string, then both the setup and the bootstrap can actually both be done from within the string itself:
Instead of setting up "0x15 0x00" after the string buffer, 0x15 followed by 0x00 in the string itself could be used to trigger this glitch.
By putting carefully constructed byte sequences between 0x15 and 0x00, valid mobile functions can be triggered and modify the value at $CD52.
This principle can be used after the player has already achieved ACE, to make subsequent execution of arbitrary code easier. Alternatively, they might be used to setup ACE by trading with another game, or with a game-altering device.
The following self-contained setups are designed by pfero:
4F 15 08 05 C9 00 (code) 37 C9
This works in any unverified string, notably including Pokémon nickname and mail messages. This means that it can be transferred from any Generation I game (with just enough space to jump to a more convenient location) or Generation II game (with more space to possibly write a "built-in" payload).
Question here: If you use this setup, are there any other setups you need with it? Is it that all I need to do is have this nickname, and any secondary bootstrapping, followed by the actual code at (code)?
I had a thought with this but don't know if it would work, that if all you need is the nickname could we perform arbitrary code execution in battle?
For this I used 18 87 in code in Pokémon 1's nickname. (redirection to DDD0); party Pokémon 6's held item. There I placed C3 75 DB (to TM/HM pocket) and finally in TM/HM pocket, I tried ld a,fb ld (d204),a ret (3E FB EA 04 D2 C9) - which is code to turn the enemy Pokémon into Celebi. This way theoretically it would make a properly terminated name that still makes use of Crystal's $15 character exploit.
Unfortunately however, it didn't work. After one version of my code that omitted it, I added a pop [hl] in case that was needed, but it wouldn't work either. For reference, here is my code in GameShark format, so you can enter these and select "go to" de41, "go to" ddd0 and "go to" db75 if you use emulators.
014F41de
011542de
010843de
010544de
01c945de
010046de
011847de
018748de
013749de
01c94ade
01504bde
01c3d0dd
0175d1dd
01dbd2dd
013e75db
01fb76db
01ea77db
010478db
01d279db
01e17adb
01c97bdb
All I get so far is freezes or resets. Could anyone help please? Thanks :)