Can’t Enable Selinux CentOS 6.5

Home » CentOS » Can’t Enable Selinux CentOS 6.5
CentOS 4 Comments

No mysterious breakages == lower support costs. The same reason MicroSoft shipped everything on and open for years and thereby built up the malware industry from scratch.

4 thoughts on - Can’t Enable Selinux CentOS 6.5

  • I have that vague feeling that what I’m about to say will probably be declared wrong… Still. From the very beginning I do not consider SELinux adding to the security of the system. How can it if it can be turned off on the fly? On the other hand, it adds hundreds of thousands of lines to kernel code which does exactly opposite: deteriorates security by potentially introducing bugs. I discovered at some point that there are other people out there who share this opinion ;-)

    So, my question is: can someone design attack scenario which would be successful if it were not for SELinux, and which is thwarted by SELinux. Note that the fact that script kiddie just forgot to put as a first line

    /usr/sbin/setenforce 0

    doesn’t make such example a solid case pro SELinux for me.

    Thanks a lot for your insight! (Always hoping to learn ;-)

    Valeri

    ++++++++++++++++++++++++++++++++++++++++
    Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247
    ++++++++++++++++++++++++++++++++++++++++

  • Disabling SELinux requires root privileges at which point most all security implimentations are pretty useless.

    Firewalls add much code to the kernel and can also be “turned off on the fly” by any “script kiddie” with root privileges. Should we discount them too?

    IMHO your arguments are weak with bad examples. The questions you should be asking is how effective would SELinux be in preventing an initial remote exploit, or preventing an attacker gaining further escalation of privileges once they have gained access to the system.

    In answer to your question, you will find lots of good real life examples in Dans’ blog here:

    http://danwalsh.livejournal.com/

  • First of all, thanks for your input!

    Not necessarily. There was (or still is?) kernel patch by Purdue University folks, called LIDS (Linux Intrusion Detection System, if my memory doesn’t fail me). It is slightly different from what the name suggests. Basically, upon successful boot root is demoted to user nobody. That’s it, you can be root, you can not do anything. Administering such system is a bitch (you only can make changes off line). But try to break into this. So, there is at least one implementation. Incidentally, LIDS
    was too a candidate into mainstream kernel, but somehow SELinux won, or maybe the last didn’t affect it…

    I wouldn’t argue on that. My teaches kept repeating there are no stupid questions, stupid is not to ask questions… To learn what good something does _is_ helpful, no argument. To ask what can do better than existing solution may be more productive as encouraging to move farther.

    Thanks for the link, I’ll do my careful reading, I likely will change my opinion some… we’ll see. My trouble may be: I definitely will compare what I read with LISD subconsciously ;-(

    Thanks again!

    Valeri

    ++++++++++++++++++++++++++++++++++++++++
    Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247
    ++++++++++++++++++++++++++++++++++++++++

  • If this attack scenario is attacking a service running as root (which would be required to setenforce 0), it’d still be prevented as long as the service runs in a confined domain that would have rules to stop it (which most services have, for obvious reasons).

    This is one of the reasons why its best to run the packaged software, in standard locations. Running apache from
    /usr/local/apache-1.2.3/sbin/httpd instead of /usr/sbin/httpd would mean it would be missing the wrong context and wouldn’t have all the built-in protection included in the SELinux httpd policy.