From 886ebe52f75369460819b14ab8c5562ea493aca9 Mon Sep 17 00:00:00 2001 From: Ward Wouts Date: Wed, 15 Feb 2023 08:57:22 +0100 Subject: [PATCH] more gdb notes --- index.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.html b/index.html index 055e35c..7aa66bb 100644 --- a/index.html +++ b/index.html @@ -474,11 +474,18 @@ template: inverse - `disas ` disassemble a function - `b *
` set a breakpoint on an address - `x/200x $esp` show the memory contents for 200 bytes starting at the address $esp points to +- `x/200c ` show the memory contents for 200 characters starting at the address - `r` run - `r < foo.txt` run with stdin filled from a file - `c` continue - `s` step into - `info functions` list all functions +- `p (char*)getenv("PATH")` find the memory location of an environment variable for the running program (use a breakpoint!) + +Many improvements exist to make gdb nicer for reverse engineering, such as: +- https://github.com/pwndbg/pwndbg +- https://github.com/hugsy/gef +- https://github.com/longld/peda ]