Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Web-App-Sec
[Top] [All Lists]

Re: Chroot jails

Subject: Re: Chroot jails
Date: Wed, 21 Sep 2005 09:19:07 +0100
Wondered if people could give me their opinions on chroot jails
AFAIK, chroot on linux is fundamentally insecure - look for the
'chroot-again' flaw.
Last time I checked it still worked and allowed to escape.
A chrooted jail without dropping privileges is vain anyway.
Indeed.
Which is why I prefer:
http://www.suse.de/~marc/compartment.html
Unlike chroot you can drop privileges in one swoop.
It deserves to be mentioned in this thread.

The only way to escape would be some executable on the machine
with suid a/o sguid flag set that performs the "chroot-again" for the
in-jail process.
Or through some other (combination of) exploit(s) - which is reasonably
hard to do, but not impossible.

If you have something like that on your machine, or there is any non-root
user who is able to install something like that there, then you can consider 
your system to be compromised anyway...
You don't want to have local users anywhere near the chroot, but if you
have to, see below.

(The problem is, that most web-app related stuff out there does NOT
disable suid executables, so you have to triple check that the process
in the jail will never be able to exec something with effective uid 0)
Which is effectively what SELinux does with state transitions, without
forcing you to inspect all the executables (least privilege).

Antoine

<Prev in Thread] Current Thread [Next in Thread>