Various
Last updated
Last updated
Check executables and kernel properties
Relocation Read-Only
Partial RELRO: - Default setting in GCC - Only forces the GOT to come before the BSS in memory, eliminating the risk of a buffer overflow on a global variable overwriting GOT entries
Full RELRO: - Makes GOT completely read-only. - Longer load time of binary
Position Independent Executable - PIE binary and all of its dependencies are loaded into randomized locations within virtual memory. - Protect against ROP attacks - GDB disabled address randomization by default. Will relocate to 0x555555550000.
Linux System Call Table:
Create Core dumps after crash:
setreuid(getuid(), getuid()) & execve("/bin/sh") / (for setuid binaries)
Store shellcode in environment variable:
Retrieve offset for environment variables:
Run shell code for applications with interactive CLI:
Compile code without security features
-no-pie -fno-pie
Disables Position Independent Executable (PIE) to prevent address randomization of the executable, making it run at a fixed address.
-fno-stack-protector
Turns off the generation of stack canaries, which are used to detect and prevent stack buffer overflow attacks.
-z execstack
Marks the stack as executable, allowing code execution from the stack, which is typically blocked to prevent certain types of exploits.
Disable ASLR: echo 0 | sudo tee /proc/sys/kernel/randomize_va_space