動態分析:
安裝:
sudo apt install gdb
使用:gdb <執行檔>
gdb的擴充
安裝:sudo apt install git
git clone https://github.com/scwuaptx/peda.git ~/peda
echo "source ~/peda/peda.py" >> ~/.gdbinit
cp ~/peda/.inputrc ~/
使用:
vmmap
run
r
disassemble <func>
disassemble
敲敲兩下tab,會列出程式用到的所有funcdisas
break * <0x809030>
break * <func_name>
b
*
用func_name可省略info breakpoint
i b
ni
n
si
s
continue
set * address = value
set $register = value
*
默認4bytes
{char}
1byte{short}
2bytes{long}
8bytesx/[Size Modifiers][Format] <0x400686>
info registers
info registers eax
i r eax
p <register>
q
j *<0x809030>
r2 <執行檔>
git clone https://github.com/radare/radare2.git
cd radare2
sys/install.sh