What is a chroot jail?
An attacker who is able to exploit a vulnerability in a server program running on a system will often want to gain additional privileges to get full control of the system. The initial exploit will almost always take place through one of the server processes (daemons) on a system that is exposed to the outside world—daemons such as FTP servers and HTTP servers are what an attacker has to work with if he wants to gain access to a system. The next step, once a vulnerability has been found, is to gain full control of the system.
When a process is confined to a chroot jail, the root directory of the process is set to the directory specified as the argument to the system call chroot(2)
. If, for example, the chroot directory is set to /chroot
, then that means that if the process now requests any file under /
, it is in reality accessing files located in /chroot/
. Anything above /chroot/
in the directory hierarchy will not be accessible to the process.
Chroot was not originally...