I need to isolate the Mozilla Spidermonkey javascript shell. The goal is simple: Create a minimal chroot environment. So, here is my setup.
# mkdir /media/jail # mkdir -p /media/jail/{bin,usr,lib,usr/lib,dev,sys,tmp,proc} # chmod a+rwx /media/jail/tmp # cp /bin/bash /media/jail/bashMount some special file systems and device files.
# mount -t proc proc /media/jail/proc # mount -t sysfs -o rw,noexec,nosuid,nodev none /media/jail/sys # mount -o bind /dev /media/jail/dev # chroot /media/jail /bin/bashNote: Use "mount" command to see what your system use for the proc, dev, sys, etc.
Reference
0 comments:
Post a Comment