killchain-compendium/exploit/binaries/r2.md

667 B

Radare2

Usage

Debug

r2 -d <binary>
  • Analyze
aaa
  • Show main
pdf @main
  • Breakpoint
db 0xdeadbeef
  • Show rbp-0x4
px @rbp-0x4
  • Continue
dc
  • Step
ds
  • Show registers
dr
  • Restart
ood

AT&T Instructions

  • leaq src, dst: this instruction sets dst to the address denoted by the expression in src
  • addq src, dst: dst = dst + src
  • subq src, dst: dst = dst - src
  • imulq src, dst: dst = dst * src
  • salq src, dst: dst = dst << src
  • sarq src, dst: dst = dst >> src
  • xorq src, dst: dst = dst XOR src
  • andq src, dst: dst = dst & src
  • orq src, dst: dst = dst | src