bryn1u said:
I was wondering is there any secure way to protect FreeBSD against 0-day exploits? Assuming that we don't use jails. I was reading about PaX which is part of OpenBSD's security but I don't see this solution in FreeBSD. Using mandatory access control, can we make the same or close defense as mentioned earlier?
You actually need to do some hacking to make MAC an effective defense against hostile root processes. In particular, you need to run
sshd,
cron, etc. with a MAC label other than the default, otherwise an intruder who can become root can just modify
/etc/login.conf and log back in to obtain a different MAC label. You also can't completely protect data with MAC because an intruder who can
mount devfs will be able to access devices even if you've changed their MAC label, since the MAC label is particular to the mount instance of
devfs. On the other hand, if you use
mac_biba and you have a root process that can't go to
biba/equal then that process isn't privileged, and therefore is incapable of performing a wide range of superuser actions. At the same time, a non-root process that can't go to
biba/equal also can't
su or
sudo, so it's definitely a compromise either way.
Regardless of the type of security breach you're concerned with, it's always a compromise between security and usability of the system. The best defense is to turn off the machine except when you're using it, but that's an unacceptable solution for most people.
Kevin Barry