Skip to content

Instantly share code, notes, and snippets.

@SanSYS
Created November 27, 2019 18:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SanSYS/8998a4b1ed9d66acb751fd0d23e454a3 to your computer and use it in GitHub Desktop.
Save SanSYS/8998a4b1ed9d66acb751fd0d23e454a3 to your computer and use it in GitHub Desktop.
d=$HOME/jail
mkdir -p $d/{bin,lib64,lib}
cp -v /bin/bash /usr/bin/tree $d/bin
ldd /bin/bash
ldd /usr/bin/tree
cp -v /lib64/ld-linux-x86-64.so.2 $d/lib64/
cp -v /lib/x86_64-linux-gnu/libtinfo.so.5 /lib/x86_64-linux-gnu/libdl.so.2 /lib/x86_64-linux-gnu/libc.so.6 $d/lib/
sudo chroot $d /bin/bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment