I've seen mention of securing /dev/shm and /proc and I was wondering how you do that and what it consists of doing? I assume this involves /etc/sysctl.conf editing of some kind right.
Like these?
kernel.exec-shield = 1
kernel.randomize_va_space = 1
The process I use, based on the CIS Linux Security Benchmark, is to modify
/etc/fstab
to restrict device creation, execution and suid privs on the/dev/shm
mount.For the sysctl settings, simply adding some of these to
/etc/sysctl.conf
works. Runsysctl -p
to activate.ewwhite has already mentioned the CIS Linux Security Benchmark recommendations, I would also like to add another security guideline worth mentioning - Guide to the Secure Configuration of Red Hat Enterprise Linux 5 by the NSA. In addition to adding
nodev,nosuid,noexec
options for /dev/shm, the recommendations for kernel parameters which affect networking are mentioned in section 2.5.1 -Host only
Host and Router