April 11, 2021 Hacking Table of contents:
ltrace ./<programm> runs the specified command until it exits, intercepts and records the dynamic library calls which are called by the executed process and the signals which are received by that process
faketime '2008-12-24 08:15:42' if you need to invoke your program with a set time
c++filt for C++ functions starting with
DnSpy Debugging Windows .NET exe files
ILSpy Decompiling .NET files
jd-gui Decompiling java code GDB
If your terminal bugs use CTRL + L to reprint
Start with Text User Interface
gdb -q -tui <program>
Set the Layout to ASM
layout asm and
set disassembly-flavor intel
Disassemble function with
Set a breakpoint
b <function name>,
b <line>, to remove breakpoint
disable <breakpoint number>,
tb is a temporary breakpoint only works one time
Run the program
Starts the program and stops at main
continue resumes execution until the next breakpoint is reached.
Next only goes to the next line
n also known as "step over"
Step to the next instruction
s also known as "step into"
si for next instruction and step instruction for single ASM instruction stepping
Go to frame X:
f X, e.g.
f 1 goes to frame 1 (i.e. to the caller of the current function)
show all registers
info register or
show a specific register using
i r rax
evaluate a C expression using
p <expression>, e.g.
p (char *)0xffff7d08 or
p someVariable or
p (char *)$rax
' to look at programs with a while loop (find pid with 'ps ax')