This repo contains some experiments for learning Binary Exploitation.
There is a Dockerfile which you can build locally and run your experiments regardless of your host OS.
All files will be added to Binary-Exploitation
folder inside container's root folder.
One thing to consider is that ASLR (Address Space Layout Randomization) depends on your machine and not on the container. Therefore when running experiments that require ASLR on/off remember to turn it on/off.
For Linux systems:
# Enable ASLR
echo 2 | sudo tee /proc/sys/kernel/randomize_va_space
# Disable ASLR
echo 0 | sudo tee /proc/sys/kernel/randomize_va_space
For Windows systems see here.
For Mac systems couldn't find a documented way as per this Stack Overflow question.