Skip to content

Instantly share code, notes, and snippets.

@pankkor
Created October 2, 2023 14:10
Show Gist options
  • Save pankkor/07bc354012aa2566825e30e7f6e8bfc8 to your computer and use it in GitHub Desktop.
Save pankkor/07bc354012aa2566825e30e7f6e8bfc8 to your computer and use it in GitHub Desktop.
Disable ASLR Linux
# Check what ASLR protection do you have (typically 2)
cat /proc/sys/kernel/randomize_va_space
# Disable ASLR global
sysctl -w kernel.randomize_va_space=0
# Revert ASLR global
sysctl -w kernel.randomize_va_space=2
# Run <my_binary> with ASLR disabled (-R option)
setarch "$(uname -m)" -R <my_binary>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment