Article View: comp.security.misc
Article #408Re: How secure is chroot?
From: John Hascall
Date: Tue, 18 Aug 1992 16:32
Date: Tue, 18 Aug 1992 16:32
30 lines
1730 bytes
1730 bytes
gary@nexnix.demon.co.uk (Gary Howland) writes: }uaa1006@dircon.co.uk writes: }>I have a program which is SUID root, which runs chroot and then }>sets the UID of the process to that of the user, and spawns }>/bin/sh (which is present under the chroot path). }>My question is....how secure is this? }I haven't tried this myself (maybe I will in the next day or so), }but if a user gains root privileges, whats to stop them mknod'ing a }disk device and accessing the rest of the world via that? }(or have I overlooked something?) What you do have to worry about is making sure that the permissions on your new root directory (and other important dirs below it, like "/dev" mentioned above and "/etc") prevent the user from writing into it. For example: % yournewrootpgm % mkdir /etc % echo "root::0:1:System PRIVILEGED Account:/:/bin/csh" >/etc/passwd % su (which they may have to copy in too, but you get the idea) John -- John Hascall ``Live with it pink-boy!'' Project Vincent Iowa State University Computation Center john@iastate.edu Ames, IA 50011 515/294-9551 [fax -1717]
Technical Details
Message-ID:
<1992Aug18.163227.20376@news.iastate.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!caen!destroyer!news.iastate.edu!johnReferences:
<1992Aug15.093848.9784@dircon.co.uk> <713997587snx@nexnix.demon.co.uk>Show Full Headers
Complete Article Headers
Newsgroups: comp.security.misc Path: arc1-ca.pugleaf.net!sparky!uunet!caen!destroyer!news.iastate.edu!john From: john@iastate.edu (John Hascall) Subject: Re: How secure is chroot? Message-ID: <1992Aug18.163227.20376@news.iastate.edu> Sender: news@news.iastate.edu (USENET News System) Organization: Iowa State University, Ames, IA References: <1992Aug15.093848.9784@dircon.co.uk> <713997587snx@nexnix.demon.co.uk> Date: Tue, 18 Aug 1992 16:32:27 GMT Lines: 30