home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.next.sysadmin
- Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!usc!sol.ctr.columbia.edu!ira.uka.de!chx400!josef!avalon.physik.unizh.ch!lytras
- From: lytras@avalon.physik.unizh.ch (Apostolos Lytras)
- Subject: Re: loginwindow hooks- ARGHHHH!!!!
- Message-ID: <1992Nov23.165540.8476@ifi.unizh.ch>
- Sender: news@ifi.unizh.ch (USENET News Admin)
- Nntp-Posting-Host: avalon
- Organization: Informatik Club d. Universitaet, Zuerich
- References: <By08zy.Bw2@ux1.cso.uiuc.edu> <1992Nov20.134347.9096@ifi.unizh.ch> <17116@umd5.umd.edu>
- Date: Mon, 23 Nov 1992 16:55:40 GMT
- Lines: 55
-
- In article <17116@umd5.umd.edu> matthews@oberon.umd.edu (Mike Matthews) writes:
- >In article <1992Nov20.134347.9096@ifi.unizh.ch> lytras@avalon.physik.unizh.ch (Apostolos Lytras) writes:
- >>Argghhh.... root runs shellscripts!! DON'T DON'T DON'T! A shellscript
- >>that is run by root *is* a threat to the security of your system and
- >>possibly of many other systems as well. Especially when it is supposed
- >>to run inattendedly.
- >Bull.
-
- NOT.
-
- >Do you know how many shell scripts there are on your system? How 'bout
- >/etc/rc? Guess who runs it.
-
- Please look at when /etc/rc is run. This is just a different case, but I
- don't want to get into a discussion about unattendedly running shell
- scripts here. I was making it clear that any unattendedly running shell script
- is a possible threat to system security. If you don't believe that, that
- is your problem, not mine ;-).
-
- >SETUID shell scripts, now there's a problem. Not to mention *writeable*
- >shell scripts that root runs.
-
- He will probably not get his shell script to run as a LoginHook, for
- various reasons. I don't know how secure the loginwindow application is,
- but I hope it set the uid of anyone executing LoginHook to the real uid
- (loginwindow itself runs probably setuid root, just as 'login' does). So
- he can't just make the script executable by root, nor can he make the
- logfile writable only by root, and anyone could fake the entries, which
- he doesn't want, probably. The script and the log will be accessible by
- anyone, no secure path, nothing. Then he will want to avoid that, so he
- will put s-bit on his scripts and put them in "secure" paths.
- Fortunately csh tests his real uid and even in suid root mode will not
- run as root. This will just not work, but it may threaten his system. So
- it is absolutely no "bull" to tell him not to do it, because you have to
- fear that he will have to make his Scripts SUID root to run, if
- loginwindow is an intelligent application. And that IS a security hole.
-
- >>Besides, your programs look like a lot of redundancy to me. Every Login
- >>and Logout gets logged (with time, connecting host etc.) in
- >>/usr/adm/wtmp. There is also information about shutdowns, reboots and
- >>crashes in that file.
-
- Okay, before 3.0 you had to configure syslogd.conf to log everything, or
- install the enormously helpful application "MOTD" which can be found on
- the archives, so logins on the console would be logged as well... but
- there ARE different ways of achieving this without additional
- shellscripts and dwrites...
-
- Cheers
- - A.
-
- --
- lytras@ifi.unizh.ch | Apostolos Lytras
- lytras@avalon.physik.unizh.ch | Informatik Club der Uni
- lytras@amiga.physik.unizh.ch | Zuerich, SysAdmin
-