radare2¶
install
git clone https://github.com/radare/radare2.git
cd radare2/
./sys/install.sh
menjalankan program
r2 (elf)
r2 -d (elf)
radare2 (elf)
beberapa instruksi :
- analisis blablabla :
aaa
- seek to main :
s sys.main
- print disassambly :
pdf
- break :
db break_point
- run/continue :
dc
- visual :
VV
- step into :
s
- next into :
caps + s
- info register :
dr
mengubah nilai : (misal ke memori 0x000)
dr rip=0x000
rename var-name :
afvn prev_name name
Praktik¶
source code didapat dari https://exploit.education/protostar/
ada banyak contoh, tinggal copas
Stack Zero
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
int main(int argc, char **argv)
{
volatile int modified;
char buffer[64];
modified = 0;
gets(buffer);
if(modified != 0) {
printf("you have changed the 'modified' variable\n");
} else {
printf("Try again?\n");
}
}
Dibawah ini adalah cheat sheet, dibilang urut jg tidak, tp dibilang berantakan jg tidak
analyse :
seek to the main func :
xref
enter : step into u : undo
menarik¶
https://radare.gitbooks.io/radare2book/content/
user interface mode :
r2 -c=H <file_elf>