|
Softpanorama |
May the source be with you, but remember the KISS principle ;-)
Softpanorama Search
|
Dr. Nikolai Bezroukov
Version 0.41 (Early Draft)
Computer Security is an anthropomorphic deity of a new messianic high demand cult. It is synonym of goodness, happiness and light; a mystic force which provides a beautiful eternal harmony of all things computable. The main recruitment base of the cult are system administrators. A secure computer network is also a cosmic harbinger of charismatic power; an exorcistic poltergeist that preserves mental health, cures headache, allergy, alcoholism, depression, and deters aging. It is a nirvana for both young and old administrators alike; an enviable paragon of all imaginable idealistic virtues; an apocalyptic voice that answers the question: "What is truth?". Finally, a working secure computer network is the bright hope of all mankind, a glimpse of things to come, and an inscrutable enigma that may well decide whether this nation, or any other nation, conceived in Liberty, can long endure. This notion sometimes plays a role similar to the second coming of Christ in some high demand cults. |
Computer security is a very loaded term. One aspect of security is so called hardening, which is currently is one of the most fashionable topics. the latter is essentially an attempt to convert a general purpose server into an appliance to improve the level of protection from external as well as internal threats, including the "fifth column" problem; there is no free lunch and hardening generally makes server less Unix user/developers friendly. Given that complexity is the biggest single enemy of security, it's only logical to remove everything that is not essential for the task in hand, users be damned ;-)
Although few, if any, fundamentally new Unix vulnerabilities are evident today, most today's Unixes do not include advanced security techniques, let alone the enhancements identified as essential to fight them. Solaris is one of the better Unixes in this respect and it does include some interesting features like advanced file attributes, roles and, especially, zones and privileges management (in Solaris 10+).
The author argues that deep hardening is essentially a process of conversion of general purpose Os into a specialized OS and that's why for organizations without much local talent it might be better to use appliances.
There are also some inherent limitqtions in the level of security achivable in any given organization. The author formulated three laws of Computer Security:
Softpanorama First Law of Computer Security:
The level of security of any Unix environment can not be significantly different from the level of qualification of system administrator(s) responsible for this environment...
Softpanorama Second Law of Computer Security:
If a large discrepancy between the level of qualification of system administrator(s) and the level of Computer Security of the system exists, the main trend is toward restoring equilibrium at some, not so distant, point...
Softpanorama Third Law of Computer Security
In a large corporate environment incompetent people implementing security solutions are a bigger problem that most OS security weaknesses. The real computer security skills presuppose not only the knowledge of what should be done, but the knowledge were to stop. The latter skills are completely lacking in wanna-be security specialists. If incompetents happen to be in charge of security one should expect that they will implement the most destructive for corporate IT measures dictated by the current fashion, driven by excessive zeal and desire to survive.
This article is an attempt of skeptic treatment of this theme and is a modest attempt to fight "security fascism": counterproductive restrictions that complicate user and system administrator lives, while adding nothing of even diminishing security. There is almost no articles on the WEB that are critical or even slightly skeptical about security tools in general and Computer Security security tools in particular. This article tries to fill the gap.
Security is like an erection: with proper drugs
it can always be harder and longer lasting but it never lasts forever.
Also that doesn't necessarily imply your initial impotence.
Slightly modified Slashdot post (#10252795)
Not too much zeal!
Charles-Maurice de Talleyrand
advice to new diplomats
Computer security currently is one of the most fashionable topics. Important part of computer security is related to hardening: making a system or network of computers less vulnerable to some broadly defined class of attacks. It is essentially an attempt to convert a general purpose server into a less flexible (and less useful) appliance. There is no free lunch and in order to improve the level of protection from external as well as internal threats, including the "fifth column" problem to make the server less user/developers friendly.
Given that complexity is the biggest single enemy of security, it's only logical to remove everything that is not essential for the task in hand, users be damned ;-) Although few, if any, fundamentally new Unix vulnerabilities are evident today, most today's Unixes do not include advanced security techniques, let alone the enhancements identified as essential to fight them. Solaris is one of the better Unixes in this respect and it does include some interesting features like advanced file attributes, roles and, especially, zones and privileges management (in Solaris 10+)
This article is an attempt of skeptic treatment of this theme and is a modest attempt to fight "security fascism": counterproductive restrictions that complicate user and system administrator lives, while adding nothing of even diminishing security. There is almost no articles on the WEB that are critical or even slightly skeptical about security tools in general and hardening security tools in particular. This article tries to fill the gap.
It's important to understand that you should not take anything for
granted, especially in security. If you are confused by the stream of
software, hardware, and services hanging their claim to fame on better security,
please be aware that security is probably the second most promising IT field for
snake-oil salesmen after (or may be even before) software development
methodologies ;-) We're all for better security, but often "security" is used
like a universal door-opening key by yet another variety of "ambulance
chasing lawyers" to force on the customers useless or even harmful product that
trivialize the really complex issues involved. "Mistrust
first impulses" this advice of Talleyrand is especially
applicable to hardening.
The author formulated the following laws of computer security:
Softpanorama First Law of Computer Security:
The level of security of any Unix environment can not be significantly different from the level of qualification of system administrator(s) responsible for this environment...
Softpanorama Second Law of Computer Security:
If a large discrepancy between the level of qualification of system administrator(s) and the level of Computer Security of the system exists, the main trend is toward restoring equilibrium at some, not so distant, point...
Softpanorama Third Law of Computer Security
In a large corporate environment incompetent people implementing security solutions are a bigger problem that most OS security weaknesses. The real computer security skills presuppose not only the knowledge of what should be done, but the knowledge were to stop. The latter skills are completely lacking in wanna-be security specialists. If incompetents happen to be in charge of security one should expect that they will implement the most destructive for corporate IT measures dictated by the current fashion, driven by excessive zeal and desire to survive.
The first law if commented to the fact that the security is always as strong as the weakest link and most often the weakest link is the security specialist in change of security and system administrators who are responsible for the particular server. In case measures severely limited server functionality are implemented the natural tendency of users and administrators alone is to adopts set of behaviors which to certain extent try to restore the user friendliness of the system. Often such behaviors are more dangerous then the real or fake threats that were stimulus for implementing the measures in the first place.
Oversimplifying we can state that the hardening involves two separate phases:
That means that hardening is by-and-large a role specific operation and that such set of scripts as Titan and JASS can be only the first step to deep hardening. The deeper the hardening level that one wants to achieve, the more role specific it should be and the less suitable for anything else outside this role server is.
Deep hardening is easier said that done, but still we can at least do the most obvious things like to remove unnecessary user accounts, software component, to limit the user population freedom to use certain services and utilities (for example su), adopt one time passwords (SecureID is OK but rather expensive), improve access controls (including user and group rights), chroot some applications (chroot is a small, easily checkable tool; the big advantage of a chroot cage is that you can take away almost all of the OS and leave a very small, extremely restrictive set of tools there for applications you do not trust much) and so on. In Solaris 10 zones provides additional capabilities of compartmentalization of OS.
Qualifications of the administrator usually represents an implicit limit on the level of hardening that can be achieved without disrupting functionality and getting into negative returns on investment. But generally increasing the security of the system presuppose usage of several security tools like hardening scripts, integrity checker, log collector (in most primitive form it can be just remote syslog) and log analyzer, and may be even simple (preferably very simple) intrusion detection. The latter has two forms "host-based" and "network".
The important point advocated in the paper is that positive return on investment in security tool is not given. While host based integrity checkers can, with some effort, provide a positive return on investment, network IDS are generally not very useful to say the least (network IDS may actually be harmful as it usually trigger too many false positives that after some times are all ignored; rephrasing Marx, network IDS is "an opium for upper management" (or SOX compliance, if you wish :-).
All those additional tools are separate topics, anyway, and we have additional pages devoted to them. Here we discuss the general problem. But please be aware that return on investment on fashionable security tools is not given. It is very easy to buy expensive over hyped junk and most players in this field are well trained to help you in this noble exercise. See for example "virus hype" page that is reasonably instructive for the scenarios that can happen with naive security enthusiasts in hands of crooked security company salesmen.
Typical roles used in hardening usually include (but are not limited to):
Seldom one can see a critical evaluation that openly states that such-and-such security tool is a dinosaur that lost all practical value several years or even decades ago and such-and-such is badly written and has poor architecture. The reader often needs the ability to read between the lines and if the source is available, analyze the source to get the idea of "what is what".
Talking about different flavors of UNIX it's clear that they are not created equal: have a very high respect for OpenBSD approach and that's what we should probably try emulate in Solaris environment.
The author feels that there is still a shortage of good Solaris hardening tools, but also (and what is more important) a shortage of highly qualified Solaris administrators. Security is usually a battle on two fronts: you fight both an external enemy and an internal enemy at the same time. And the internal enemy is not only what is usually called "insiders." It is often sysadmins themselves (we met our enemy, it's us :-), especially those who reached or exceeded their level of incompetence (see Peter Principle for details).
There are a couple of decent existing tools for Solaris hardening (Titan, Jass, RQ-Kit) but all of them are still pretty raw and require an excellent knowledge of Solaris to be implemented properly. That actually might be a good thing: there is not and never will be "An Administering UNIX Security for Dummies". And in the age of outsourcing this is a good news for both highly qualified system administrators and, on the other side appliance makers and appliance market ;-)
IMHO the minimum amount of such people in corporate IS is usually proportional to the at least a square of the company revenue in billons (government is a special case ;-). And it's this internal enemy that represents real "fifth column" in computer security, the problem that should not be underestimated. As Richard Forno aptly noted in one of his SecuryFocus columns "much of what constitutes the 'cyberterror threat' comes down to the poor management of systems critical to the security and viability of the United States."
An often overlooked fact is that Unix is too complex an OS to be administered by dummies. Idiots sysadmins ( I mean here an incompetent sysadmin, who is not interested in Unix and does not work on improving his/her level of understanding of the system (an official definition "...a cretin, morpohodite, or old COBOL programmer selected to be the system administrator by a committee of cretins, morphodites, and old COBOL programmers." :-) by themselves are the biggest security risk to the system they administer, IMHO much bigger risk than hackers...
I can even reformulate this idea as "Softpanorama First Law of Hardening":
The level of security of any Unix environment can not be significantly different from the level of qualification of system administrator(s) responsible for this environment...
And you can easily guess The Second Softpanorama Law of Hardening:
If a large discrepancy between the level of qualification of system administrator(s) and the level of hardening of the system exists, the main trend is toward restoring equilibrium at some, not so distant, point...
It is important not to underestimate the human factor while working to improve the security of your intranet:
That actually means that learning of Solaris as a (very interesting) OS is probably the first and most important task that needs to be addressed. Not installation and running of some fancy security tool (or two), but general level of understanding of Unix in general and Solaris in particular is the most critical security resource.
Only those, who really understand "what is what" in Unix in general and Solaris in particular can successfully minimize their systems and understand compromises that are always involved in disabling services, changing settings and permissions recommended by hardening tools. There is no free lunch and tighter security makes the system less and less usable which in real world translates into "everybody uses root" situation which in turn completely defeats the measures implemented. So finding a point where to stop is very important. Too much security can be counterproductive and very harmful. Please keep in mind there are sadistic sysadmins and security analysts who use security to torture users just to increase their social status.
I would like to reiterate it again and again that the idea of hardening is very simple: that's the idea of minimization of components by converting a general purpose OS into and appliance. But the real world application of this simple idea is pretty tricky :-). There are many levels on which this can be done and there is a subtle interaction between those layers. Also return on investment is unclear and it's important not to overdo the thing: I would like to remind that you pay with the flexibility for deeper hardening. There is approx seven major areas that require close attention. Among them:
Again I would like to stress, that generally the security of a Unix server(s) is proportional to the qualification of the sysadmin. Moreover naive hardening can lead to completely unusable box and make damage that a hacker can only envy ;-) That's why so many sysadmin are afraid to start. And that's why in many cases Solaris servers that perform critical functions are running AnswerBook2, etc.
Good security is the art of compromise. Sometimes when usability can be negatively affected, its wise not to go too far and settle for a middle ground, preserving some services and blocking access to then from external sites via router a firewall. Please understand that many "security-related" recommendation are questionable (or even wrong), unless implemented correctly.
Sometimes due to complexity security solution became a source of problems. Just think that most external exploits for ISPs a couple of years ago were related to openssh vulnerabilities. Hopefully this is a thing of the past, but its unclear whether those who use encrypted channel (VPN) with regular r-commands were more secure or less secure then users of ssh. Similarly there were nice abuses of misconfigured proxy, especially appliances like Cacheflow (that are often a part of the security infrastructure). See also CacheFlow CacheOS Cross-site Scripting Vulnerability . They can improve security, if correctly configured, patched, architected, etc. But so are simpler solutions. For example I saw solutions that use expensive Cachflow boxes to speed up Internet access to several locations from the central location (corporate headquarters), while each of those (geographically distributed) locations might be better off using its separate (local) Internet connection instead of being fed from internal corporate network.
Sometimes installing a additional switch on DMZ can help to be less paranoid about less secure services that developers demands, especially in combination with TCP Wrappers. Anyway if some hardening trick badly affect functionality you should always critically access the return on investment using common sense, your knowledge of Solaris and application affected, best papers on the subject and, again, common sense. The goal of security is not to eliminate both risk and business ;-)
If you need really deep hardening, you might be better off using instead Trusted Solaris 8 or Solaris 10 (with zones). Tsol8/9 has some security extensions to cover the needs for separation of data in a highly secure environment e.g. mandatory access control, elimination of root, labeling. It's a better approach then trying to achieve the same from regular Solaris installation no matter how hard you try.
Both Titan and JASS are regrettably are written in Born shell and are extremely simplistic. IMHO Perl is a much better tool for writing such scripts and it can raise the level of the functionality of the tool without making the source twice longer. IMHO at least dtksh (or ksh93 on Linux and FreeBSD) should be used instead of Borne shell. Perl tools theoretically can be much more powerful and elegant. But there might be a deeper problem: after some simplistic general procedures there is not much that general hardening script can do. That might explain why existing Perl hardening scripts for Linux are even worse than Solaris hardening tools in Born shell. For example, Bastille (a super hyped hardening tool for RedHat and Mandrake distributions) is simply weak and one should never study it as an example of Perl programming in this particular area ;-).
We can also distinguish between scanners that perform checks in isolation from all other checks and more comprehensive scanners that understand what to check. For example if ftp or UUCP service is disabled it makes no sense to check or report ftp or UUCP vulnerabilities. The tool just needs to recommend to change permissions for the non-used executables to 000 or something like that or delete these redundant files from the system (here a packaging tool might be useful).
A separate task that should be performed by the separate set of tools is so called "integrity checking." It gives the possibility to record the identity of critical system files including location and permission structure (including all-important SUID/SGUID files) and thus overlaps with hardening. It's not covered here. See Integrity Checking page for some advice.
The real test of hardening skills is to know were to stop. The paper proposes several laws of hardening that define the evolution of of the security of a particular system:
Softpanorama First Law of Hardening:
The level of security of any Unix environment can not be significantly different from the level of qualification of system administrator(s) responsible for this environment...
Softpanorama Second Law of Hardening:
If a large discrepancy between the level of qualification of system administrator(s) and the level of hardening of the system exists, the main trend is toward restoring equilibrium at some, not so distant, point...
Softpanorama Third Law of Hardening
In a large corporate environment incompetent people implementing security solutions are a bigger problem that most OS security weaknesses. The real computer security skills presuppose not only the knowledge of what should be done, but the knowledge were to stop. The latter skills are completely lacking in wanna-be security specialists. If incompetents happen to be in charge of security one should expect that they will implement the most destructive for corporate IT measures dictated by the current fashion, driven by excessive zeal and desire to survive.
Here are several other things that I think are important in no particular order:
If the vendor's description appears to be confusing nonsense, it may very well be so, even to an expert in the field. One sign of technobabble is a description which uses newly invented terms or trademarked terms without actually explaining how the system works. Technobabble is a good way to confuse a potential user and to mask the vendor's own lack of expertise.
And consider this: if the marketing material isn't clear, why expect the instruction manual to be any better? Even the best product can be useless if it isn't applied properly. If you can't understand what a vendor is saying, you're probably better off finding something that makes more sense.
[Bezroukov2005a] Solaris vs Linux Security in Large Enterprise Environment
[Bezroukov2005b] Softpanorama (Slightly Skeptical) Sun Solaris Security and Hardening Page
Copyright © 1996-2009 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Site uses AdSense so you need to be aware of Google privacy policy. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
Disclaimer:
Last modified: August 15, 2009