b *0x12345678 # Breakpoint
b strcpy # Breakpoint
r # Run program
r < <(echo lol) # Run with pipe
r arg1 arg2 # Run with arg
c # Continue
n # Next operation
set $eax=0x00 # Set variable
info register # Show Register
git clone https://github.com/longld/peda.git ~/.peda
echo "source ~/.peda/peda.py" >> ~/.gdbinit
echo "DONE! debug your program with gdb and enjoy"
Binary ninja
Scrap code from html
let result = '';
[...document.querySelectorAll('.LinearDisassemblyLine')].forEach(parent_elmt => {
[...parent_elmt.children].forEach(children_elmt => {
result += children_elmt.textContent
});
result += '\n'
});
console.log(result);
Lib Injection
Recreate getuid function
uid_t getuid(void)
{
return (4242);
}
compile
gcc -shared -fpic lib.c -o libnike.so -m32
run and inject
LD_PRELOAD=./libnike.so ./exec
Decompile Python Executable
Convert executable into .pyc
git clone https://github.com/extremecoders-re/pyinstxtractor
cd pyinstxtractor
python3 pyinstxtractor.py exec
Disassembly .pyc (compatible python 3.9.2)
git clone https://github.com/zrax/pycdc
cd pycdc
cmake
make
./pycdc file.pyc # Convert .pyc into .py
./pycdas file.pyc # Convert .pyc into byte-code disassembly