ファイル deadface_re03.exe およびELFファイル deadface_re03.bin が与えられた。
deadface_re03.bin をmain関数があった。
A file deadface_re03.exe and a ELF file deadface_re03.bin were given.
Decompiling deadface_re03.bin via main:
この関数は、以下の処理をしていることが読み取れた。
データを生成し終わってから入力を読み取っていることから、入力の内容はデータの生成に影響を与えないことがわかる。
そこで、プログラムを書き換え、何を入力しても生成したデータを出力するようにすることにした。
具体的には、Ghidra上の表示で 115a5、ファイル中の0x15a5バイト目 (0-origin) の
75 14 (JNZ LAB_000115bb) を 90 90 に書き換えた。
書き換えたプログラムを
I found this function doing this process:
The reading of input is done only after generating data, so what it read won't affect the generation of data.
Seeing this, I decided to modify the program to have it output what it generated regardless of what it read.
Specifically, I modified 75 14 (JNZ LAB_000115bb), which is on 115a5 in Ghidra and from the 0x15a5-th byte (the first byte is 0th) of the file, to 90 90.
I uploaded the modified program