System Isolation
We discuss solutions for isolating an entire system/OS for damage control: virtualization, containerization. If critical apps or the OS/kernel itself are compromised, the system is compromised but won’t affect other systems.
- Slides for this session:
Tasks
Download the session task archive.
DO NOT DO THIS ON A REAL MACHINE Do not manually remove
jailfolder! Use only the scripts provided. You are playing “Bad Software Monopoly” and you just drew the “Go to jail!” card. Fortunately, you chose to play with the root token.Find your “Get out of jail free” card and get your well deserved reward.
Open the session task archive and access the
monopoly/subfolder.Run:
sudo ./go_to_jailand try to escape thechrootjail. When you escape, read the/flagfile.Run
sudo ./destroy_jailto remove the jailInstall
Docker(information here https://docs.docker.com/get-started/). Rundocker run hello-worldto make sure that everything is set up ok. Rundocker run -it ubuntu bashto enter the container. Experiment a littleCreate a custom Docker image based on the instructions here https://docs.docker.com/get-started/part2/
Modify the default app and introduce a way to execute commands from the webpage (eg: add a
GETcmd parameter that will be executed. Try to read/etc/passwdor break the app.
Create an Ubuntu virtual machine in your favourite virtualization product.
Inside the VM, create a Linux container following the instructions here: https://linuxcontainers.org/lxc/getting-started/. Experiment with lxc-* commands
Create a snapshot of your VM.
DO NOT DO THIS ON A REAL MACHINE Break the VM with the following command:
sudo dd if=/dev/urandom of=/dev/sdaorsudo rm --no-preserve-root -rf /. Try to restore it