GDB — Debugger standard Linux

Debug Incontournable

Commandes essentielles

gdb ./binary

# Breakpoints
b main           # sur une fonction
b *0x401234      # sur une adresse

# Exécution
r                # run
r arg1 arg2      # avec arguments
c                # continue
n / ni           # next (step over)
s / si           # step (step into)
finish           # jusqu au return

# Mémoire et registres
x/10gx $rsp      # 10 qwords depuis rsp
x/s 0x402000     # afficher comme string
x/20i $rip       # 20 instructions
p $rax           # valeur registre
info registers   # tous les registres

pwndbg / peda / gef

# Extensions qui améliorent GDB :
pwndbg : focus pwn/CTF, commandes heap/rop
peda   : mode graphique des registres + stack
gef    : modern, heap analysis, arch multiples

# Choisir automatiquement
# ~/.gdbinit: source /usr/share/pwndbg/gdbinit.py