From 37c61ebad7efb6b1a7cbeb66bef152557278ad81 Mon Sep 17 00:00:00 2001 From: Nati Cohen Date: Wed, 21 Feb 2018 12:52:34 +0200 Subject: [PATCH] fix #37 --- levels/03_pivot_root/README.md | 5 ----- packer/bootstrap.sh | 7 ++++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/levels/03_pivot_root/README.md b/levels/03_pivot_root/README.md index 2aefa34..7bd698d 100644 --- a/levels/03_pivot_root/README.md +++ b/levels/03_pivot_root/README.md @@ -5,11 +5,6 @@ After successfully jailing a process with [chroot()](https://docs.python.org/2/l ```bash sudo python rd.py run -i ubuntu /bin/bash -# Get breakout.py -echo nameserver 8.8.8.8 > /etc/resolv.conf -apt-get update && apt-get install -y python wget -wget https://raw.githubusercontent.com/Fewbytes/rubber-docker/master/levels/03_pivot_root/breakout.py - # Check that you are inside chroot ls / diff --git a/packer/bootstrap.sh b/packer/bootstrap.sh index 437f3bf..dad4612 100644 --- a/packer/bootstrap.sh +++ b/packer/bootstrap.sh @@ -54,12 +54,13 @@ popd # Fetch images mkdir -p /workshop/images pushd /workshop/images -export_image ubuntu:trusty ubuntu /bin/bash -c 'apt-get update && apt-get install -y python stress' +export_image ubuntu:trusty ubuntu-export /bin/bash -c 'apt-get update && apt-get install -y python stress' export_image busybox busybox /bin/true cp /workshop/rubber-docker/levels/03_pivot_root/breakout.py ./ chmod +x breakout.py -tar rf ubuntu.tar breakout.py -rm breakout.py +tar cf ubuntu.tar breakout.py +tar Af ubuntu.tar ubuntu-export.tar +rm breakout.py ubuntu-export.tar popd # On boot, pull the repo and build the C extension