| SELinux by Example | |
| author | Frank Mayer, David Caplan, Karl MacMillan |
| pages | 425 |
| publisher | Prentice Hall |
| rating | 8 |
| reviewer | Ravi Kumar |
| ISBN | 0131963694 |
| summary | This book imparts a deep understanding of the features, structure, syntax and working of SELinux |
All trademarks and copyrights on this page are owned by their respective owners. Comments are owned by the Poster. The Rest © 1997-2009 Geeknet, Inc.
Monkey SE, Monkey DO (Score:3, Funny)
You can say that, sure, but I think for most people, SE'ing is believing.
Interesting (Score:2, Interesting)
But is it useful? For military and some business use, I can see it... but does anyone actually run SELinux on a home system?
If so -- why?
Re: (Score:3, Informative)
Re:Interesting (Score:5, Informative)
I wrote the UnOfficial SELinux FAQ [crypt.gen.nz] and I'll tell you what the most common search query that Google sends to that page, its "disable selinux". About 80% of the hits to that FAQ are from people wanting to know how to disable it.
Lots of people like the MAC idea, and they're keen to try it out. But its causing pain - its hard to understand and it stops stuff from working. The majority of people out there, even the open source boffins, just don't have the spare time to figure it out and work with it.
Despite this, the SELinux by Example book is good. If you're developing software which you want to run on an SELinux system the book will help you a lot in showing you how to write the policy for your package. In fact, if you want to do serious work with SELinux then you pretty much need this book. Any online documentation you can find is likely to be very old and of little use.
Parent
Re: (Score:2)
Re: (Score:2)
Yes it is, and it's on by default in enforce mode. There's even been some reports (although I have not checked them) that you cannot automatically disable it via kickstart.
No, the better question is -- is there anything you do where it would actually get in the way? In the two years I've been running
Re: (Score:2)
I can pseudo-confirm those reports. I've installed RHEL 4 probably over a hundred times in various configurations, and I've often had problems getting SELinux to "stay dead" from the installer. The only problem is that I never really paid attention to the circumstances in which it wouldn't stay disabled, so I can't tell you if I was using kickstart or a regular interactive install.
For wh
Re: (Score:2)
Yes I run it with FC6 - because I can (Score:5, Interesting)
Yes, I selinux it with FC6. For several reasons. Firstly because I can; It just completely doesn't get in the way. I've come across a two policy things I had to change; in both cases the built in tool warned me about them, so I knew it was an SeLinux problem and didn't spend ages serching. Secondly, in both cases it gave me reasonable (but not complete) information about what to to to fixi it and finlally, if you learn how to use audit2allow all my problems were really easy to fix (and if you report them with audit message RedHat does a fix which gets rid of them in future almost immediately anyway).
Secondly I have a few servers on my system, it's nice to know that there is a reasonable chance they won't break my desktop if they get hacked into.
Finally, I have several proprietary applications I use (e.g. Skype) given past experience, I don't trust these not to do bad things like sending of my private data. Making an SeLinux policy lets me control which data these applications have access to.
Generally, running SeLinux just gives more of a feel of having control over what your programs are doing on your computer. Without it, you can limit programs from one UserID to the next, but there's no easy way to limit access within a UserID (well; chroot, but that's not really easy).
Parent
Re: (Score:2)
SELinux as mighty as it may be for tracking skype and alike, it will probably not track down your perl script include tags (lets say mailfilters that run somewhere, or from another app, the "safe" javascript in mozilla ?). Yep you can tell your mozilla that it shouldn't read a or b or c nor should it write d, but how much can you restrict perl on your system ? or bash for this sake ? bash scripts are not always harmless
Re: (Score:1, Informative)
If, on
Re: (Score:2)
I would like details of the logging tool you use. Mine only records details which have been logged, so far silent changes elude it.
Gentoo has a good kernel hardening guide (Score:1)
Hardening [gentoo.org]
And keep in mind: Even if you are not paranoid, they still could be out to get you.
Re: (Score:1)
AppArmor? (Score:4, Informative)
Re: (Score:2)
Re: (Score:3, Informative)
Re: (Score:2, Interesting)
Re: (Score:3, Insightful)
It seems to me that AppArmor is still a much more suitable tool for MAC under Linux for 99% of the systems that need it.
The truth is, the vast majority of systems don't need either, but the concept is a nice security architecture to have in place for those rare instances where it is needed and as a built in part of security going forward.
Having used both SELinux and AppArmor I can say there's no comparison in terms of effectiveness. If a security tool it too complex to use it will be used incorrectly and can lead to even worse security problems. I would rather stick with a much simpler approach that still provides all the confinement of MAC but only where I need it.
If you're trying to secure a system today, you might be better of with AppArmor from what I understand. If you're trying to decide upon a MAC architecture that will be part of Linux going forward, SELinux looks like a much better bet. Ubiquitous application of MAC is a big win in the l
SE....x (Score:1)
Sounds like an ad (Score:3, Interesting)
Hell, it is an ad. Read the last line of the article.
SELinux is a great idea, but almost nobody gets it. NSA wrote it so that commercial and open source application developers could get accustomed to writing programs that would work on a system that enforced mandatory security. The hope was that, for example, Firefox and Apache would be modified to work well under very restrictive security models, so that if some app misbehaved, its damage would be limited. This was the first step in getting out of the mess we're in now with patch-based insecurity.
Not too much of that has happened.
Re: (Score:2)
You haven't run modern linux distros for a while, don't you? Linux distros have been shipping SELinux for years, and not just "for fun" - they wouldn't go through the pain of including it if they didn't use it.
Red Hat 4, which was released on February 2005 already used SELinux at least for: apache, dhcpd, mysqld, named, nscd, ntpd, portmap, postgres, snmpd, squid, syslogdm winbind. RHEL 5 (released today) probably adds more.
No, people still hasn't wrote SELinux rules for fi
Why I don't use SELinux (Score:1)
Just installed FC5 with SELinux turned on. (Score:2)
So, before i can turn SELinux back on, i have to go through the SELinux learni
Re: (Score:2)
So, before i can turn SELinux back on, i have to go through the SELinux learning curve. A book like this could help. I've not yet looked for on-line docs.
You might not need the book any more. The configuration has been simplified a lot in FC6, it has a daemon that monitors the log files, and a gui tool that pops up a notification whenever SELinux blocks something, and in common cases tells you what do to tweak the specific setting.
For example, I tried temporarily turning on the "don't allow apache to read home dirs", and get this if I try to access them: http://www.cc.puv.fi/~e0600613/sealert.png [cc.puv.fi]
The nice about user/group permissions (Score:2)
SELinux - Useable? (Score:2, Interesting)
One thing you DO NOT need if you are trying to run SELINUX is 400 pages of abstract security theory and discussions on the 'flask' model etc. etc. There is way too much info of that sort out there and not nearly enough
I want to get rid of all of SeLinux on Debian (Score:1)
Yes, but... (Score:1, Funny)
oh, wait...
Solaris' Role Based Access Control Proves Unix (Score:2)
As of 2 years ago, there was little, if nothing that RBAC did that wasn't available to a well-tooled sysadmin on a normal UNI*X box (without SELinux capabilities).
Book is out of print? (Score:2)
can't I use PAM (Score:1)
Re: (Score:2)
SELinux is a type of MAC architecture for Linux. It enforces the actual security on objects based on their policy, defined separately from
mandatory pedantry (Score:2)
and Microsoft Windows has its own way of providing finer rights to its resources, Linux had to put up with the simple but crude user rights known in tech speak as discretionary access control to control user access of files.
A small point, but the access control in Windows is also called "discretionary". They are different models, but they are both discretionary.
One way of thinking about this is that mandatory means "access controlled by a mandatory policy" and discretionary means "access controlled at t
Acronym overload (Score:1)
Two bad experiences with SELinux (Score:2)
First problem. I had a shiny new install of FC3. I try to get apache to start serving webpages. It only works in one directory. The folks at fedoraforum.org were useless as usual. A couple of posts on an apache email list had me remove the php, apache, and mysql rpms and reinstall from source. After a week of nothing working, I finally stumbled upon some vague reference about S
Re: (Score:1)
TOMOYO Linux (Score:1)
Hi,
If you think SELinux is too much/heavy for you, you might be interested in TOMOYO Linux. I'm so sure that most of you never heard of "TOMOYO Linux", so I'll explain briefly. "TOMOYO Linux is a project started and actively maintained by the Japanese SI company, NTT DATA CORPORATION to provide a Mandatory Access Controls mechanism in Linux."
In short, TOMOYO Linux is quite similar to AppArmor and has been available at SourceForge.jp under GPL license since Nov. 2005.
TOMOYO Linux Project [sourceforge.jp]
The project
Re: (Score:2)
Re: (Score:1)
In that case actually, I'm selling SELinux for half off what the government charges. Interested in a purchase of some ISO's? I have some mirrors I can point you to if you send me a paypal payment of $500. Technical support will be handled over IRC on freenode.
Re:huh? (Score:4, Informative)
They don't; they give away the source code and it's been migrated into other distributions.
SELinux was started by the NSA, and they have a page about it here:
http://www.nsa.gov/selinux/ [nsa.gov]
They are pretty clear in their FAQ that SELinux was produced essentially as an internal product / demo, and they just thought other people might find it a useful starting place for securing Linux. They're not actively marketing it as a product, or even evangelizing it.
Parent
Re: (Score:3, Informative)
The devs at Secure Computing, who wrote much of the code and who hold several patents covered by SELinux Type Enforcement, would beg to differ on this point. While they (grudgingly) accepted the release of SELinux, probably due to business concerns associated with suing a major and prestigious customer such as the NSA, they have never been all that happy about the open availability of the core concepts of their firewall product.
Re: (Score:3, Insightful)
Unclear who's to credit or blame. (Score:4, Interesting)
From SELinux FAQ #11 [nsa.gov]:Not sure I have a lot of sympathy for the SCC people; they got paid for what they delivered, and then the client decided to open it up.
It's not really clear what happened afterwards; it sounds like SCC might have threatened users of SELinux with their patents, or prepared to [lwn.net], but later on decided this was a Bad Move [linuxsecurity.com] --- it's not clear whether the NSA had a hand in convincing them of this, or it was a result of negative publicity from the Linux community, or what, but they eventually put out a statement [securecomputing.com] (PDF) to the effect that they wouldn't use their patents against users of the GPLed code.
Hard to unravel what the real story was at this point, or how much credit should go to SCC versus the NSA for cracking heads and getting the patent threat removed, but the ultimate outcome was certainly a positive one. But at any rate, since the NSA folks were the ones who ported it to Linux from the research OS, and turned it from an academic curiosity into something with practical applications, I'd say they deserve the lion's share.
Parent
Re:huh? (Score:4, Interesting)
The NSA wanted to do research into making a more secure Operating System. This is part of their mission. So instead of starting from scratch or trying to get access to the source of a proprietary OS they looked around and found an Open Source operating system called Linux. They had the source and an access active development community. When their research was done they released it back to the community just as the GPL says one should.
So now everyone that uses Linux can benefit from their research.
Just like NASA, NOAA, or any number of government agencies.
Parent
Re: (Score:2)
umm, ok, so why is there a government linux project?
2) Hacking has gone from the script kidd13z messing with n00bs to a huge business of DOS and industrial espionage. Its really hard to mandate security, but if you make it simple and easy to use, you might make things more secure.