RE: Locking Down a Linux Box

From: zsn (zesnark@yahoo.com)
Date: 12/26/01


From: "zsn" <zesnark@yahoo.com>
To: <focus-linux@securityfocus.com>
Date: Tue, 25 Dec 2001 16:23:09 -0800

Additional recommendation: If it doesn't break your scripts also
remove ed, uu[encode/decode], dd, etc. Mount every filesystem you
can noexec, and mount those you can't from read-only media. While
these steps make administering the machine somewhat more difficult,
they also make executing unauthorized code on that machine quite
difficult.

z

Question for all:

> Third, before placing the machine in the DMZ, we always
> uninstall all the text editors (VI, EMACS, etc.). This way
> even if the box is hacked, they have a LOT of work in front
> of them to actually DO anything to it. (Can you imagine
> having to run "ed" on the httpd.conf or html pages?) We also
> uninstall any compilers and browsers as well (gcc, lynx, etc.).



Relevant Pages

  • Re: -bash: ./unixinst: /bin/sh: bad interpreter: Permission denied
    ... the "noexec" was added behind your back. ... # cat /proc/mounts | grep hdc ... I did ``mount /cdrom''. ...
    (comp.unix.questions)
  • Re: [patch] remove MNT_NOEXEC check for PROT_EXEC mmaps
    ... to mount something "noexec", a problem is then found with a few ... shm_openand then mmap(), but mmapsuddenly fails. ... these apps want otherwise: to be able to mmap PROT_EXEC on it. ... mmap PROT_EXEC on a MNT_NOEXEC mount. ...
    (Linux-Kernel)
  • Re: cron exploit?
    ... > Rule of thumb: anything that the user doesn't need to write to, mount as ... Noexec seems to be a waste of time, at least on the Linux boxes I've ... noexec frustrates the occasional software installer ...
    (Incidents)
  • Re: A few thoughts..
    ... >> their own partitions and mount them noexec. ... Now I could see if this was a development server then you ...
    (freebsd-hackers)
  • Re: Bonehead Move, noexec
    ... you can mount certain things with protective restrictions (such ... But I also guess few users who have multi partitions are doing this. ... BTW I learnt on this list a year or two ago from someone that noexec can't be understood as generically stopping execution of anything from that mountpoint and can be a false comfort indeed. ... /tmp isn't nodev by default either, but you can change that if you were hardening it all up I suppose. ...
    (Fedora)