Slashdot Mirror


When "Security Through Obscurity" Isn't So Bad

Erik writes "In this article, Jay Beale (Bastille Linux Project, Mandrakesoft) explains why Security Through Obscurity is actually a really good idea if you do it right. A good read for sysadmins." Agreed... a lot of really interesting points well written and entertaining. For starters you can't rely just on obscurity to keep you safe. But it doesn't hurt to obscure things sometimes just to make it tougher for your attacker.

17 of 152 comments (clear)

  1. All security is based on obscurity.. by defile · · Score: 5

    When does something stop being 'security through obscurity'? Depending on how you look at it, all forms of security, (or at least most of the ones employed over the internet) are based on picking access tokens that are really hard to guess.

    Running a service with no authentication on a random port isn't great security, but in principle, it's the same kind of security as running on a well known port and requiring a unique access identifier and passcode. It's just harder to guess, but still fundamentally the same.

    Real security would be achieved through schemes where all of the knowledge in the world won't gain you privileged access.

    1. Re:All security is based on obscurity.. by FTL · · Score: 4
      >When does something stop being 'security through obscurity'? Depending on how you look at it, all forms of security, (or at least most of the ones employed over the internet) are based on picking access tokens that are really hard to guess.

      Thanks for qualifying this as security on the Internet. Note that there are a whole range of other forms of security. For instance a guard holding an M16 is a particularly effective form of security that has no secret component at all. An entirely different method is the "security camera". And a third is Mutually Assured Destruction.

      None of these three methods of security are prevalent on the Internet. Are there any others? Could any of these be used in place of traditional usernames and passwords?
      --

      --
      Slashdot monitor for your Mozilla sidebar or Active Desktop.
  2. The fundamental difference: by David+Price · · Score: 5
    Why is it okay for Joe Sysadmin to obscure details of his network configuration, but it's better for software writers (and particularly cryptologists) to release the details of their work?

    The answer is simple: ease of review. Obscurity is meant to put stumbling blocks in the path of those who desire to review the system, for whatever motive - be it academic curiosity, security assurance, or even to learn how to penetrate into it. The hidden web server trick described in the article, closed-source security software, and proprietary crypto are all examples of techniques that are meant to obscure and thus make review difficult.

    The question of whether to obscure, then, reduces to whether you'd like the system you're building to be reviewed. There are several very bad reasons that could motivate you to hinder review of your system: attempting to hide security flaws you either know or suspect to be found therein is one of the bigger ones.

    But the decision to impede review can be perfectly reasonable - depending on who the reviewers are likely to be. If you know, for instance, that your community of reviewers includes honest, skilled people who want to use your product and who will alert you to problems that they find, then that's a very big reason not to obscure anything. This is what motivates Linus, the Apache group, the GnuPG folks, and everyone else out there tirelessly trying to produce systems that function in the most security-hostile of environments. These folks have literally thousands to millions of users, almost all of whom are honest, and many of whom are skilled enough to discover flaws in the system.

    Joe Sysadmin doesn't have that kind of community. His users are very likely incapable of discovering security flaws, or if they are, unlikely to share the information they find with Joe. The majority of people who might be interested in reviewing Joe's network are malicious and intent upon using any information they find to the detriment of Joe and his users.

    In this case, the decision to put up walls of obscurity is as much of a no-brainer as the decision to use an open-source web server. Joe has assessed his community of potential reviewers and has determined that, on the whole, he'd rather not have that set of people learning things about his network. He will certainly use products that have proven themselves under strict review, but he is under no obligation to describe to anyone how he's configured his network. In his situation, doing so would only undermine his security.

  3. No he doesn't by ergo98 · · Score: 4

    Your claim (which contradicts the entire point of the article, which is that a little obscurity on top of a secure-as-possible system can't hurt) doesn't circumvent his argument whatsoever, and I really don't see why there is such an aversion to the idea of obscurity on here.

    His point, which is very correct, is that (using the website as the example) someone has to be very "noisy" to actively seek out non-standard ports/services: If there is a hacker targeting your system (s)he will leave a lot more fingerprints and evidence of their actions doing a cascade scan through your servers/ports than if they simple waltzed in and connected to private.company.com. The point is that each additional piece of hidden information is one more hurdle for the prospective hacker to have to jump over: It's a shitload harder to hack an unknown webserver on an unknown machine through an unknown firewall than it is to hack IIS 5.0 on Windows 2000 SP 1 pre-HOTFIX XYZ running on port 80 at intranet.company.com (hint: In the first case there will be a swath of evidence attempting various tactics to determine what the OS/webserver/firewall restraints are. In the second Jimmy pulls up black hat exploit #1027-D [the one that the public doesn't know about yet] and applies it against the server. Instantly the server is ownzed and there are zero tracks because to the other systems everything looks fine. Jimmy puts in his keystroke grabber, cleans up his tracks, and disappears into the night).

    The concept of enhanced security through obscurity is absolutely as clear as day. Pretend that I encrypt a piece of information to send to you: Now of course I'm going to pick a very secure algorithm so let's say that I go with Twofish. Now to the best of my knowledge it is a super secure algorithm and I'm safe and there is zero chance that it could ever be broken, but pretend that somewhere someone out there knows how to break Twofish with just a month of computer time: Do you think that they'd waste the month if they were unsure what algorithm you used? Pretend that they see an encrypted file called stuff.enc, versus bank_numbers.twofish: Which one gives them a headstart and motivates them? The standard (moronic) reply to this is "Well use a secure algorithm/software/OS/etc.!" however that is a foolish statement: Many algorithms/software/OS' have fallen in the past after years of people super-duper-assuring you that there is absolutely nothing wrong. So in other words unless you are absolutely sure yourself about every piece of software and algorithm that you use, a little obscurity can't hurt.

  4. One more obvious thing by ahde · · Score: 4
    The reason security through obscurity doesn't work is because it is useless against an internal attack -- this includes, to a degree, social engineering. Changing the port number doesn't do any good at all if the attack is launched by a former employee.

    The reason security through obscurity doesn't work is it assumes a lesser effort provides a deterrent after a greater effort has already been spent. If the attacker can beat Kerberos authentication (or even a password challenge) the port scan becomes a trivial effort.

    The one advantage of the article's example is not security related at all. Filtering script kiddies saves a potential bandwidth hit by quietly dropping port 80 traffic.

  5. Re:OS advocates always forget by cburley · · Score: 5
    Care to provide proof of that statement?

    (Not the part about the comparative ease of exploiting security holes in source code vs. binary code -- the part about OS advocates somehow "always" forgetting that fact.)

    In my experience, advocates of open source are highly aware that it's easier to exploit security holes in source code.

    After all, to do that, one must find them first, correct?

    And unless most or all of the people looking for them also intend to exploit them in an offensive way, the result will be that said holes will be fixed in a defensive mode vs. offensive attack faster than for proprietary, binary code.

    Remember, defense always has an advantage over offense, in terms of time and effort -- the "battle" is on the defender's own turf. Offense can make up for this inherent disadvantage to some extent by, for instance, having the element of surprise.

    For most such offensive counter-measures, having the source code is not an advantage, in fact it's a disadvantage, if the defense also has the source code.

    That's because the defense can deploy fixes to holes faster than the offense can attack them, so, assuming they both find out about them at the same time, the defense wins. (This is generalizing, by the way. Specifics always vary, of course.)

    Now, ask yourself this question: when it comes to binary-only code, who is likely to know more about the internal operations of the code -- the defense, in this case, law-abiding users, or the offense, willing to obtain THE SOURCE CODE through illegal channels??

    That's why Open Source has such an advantage here -- the defense, collectively, is encouraged to share, generously, insights about the software, while the offense must remain fairly isolated (a general rule about law-abiders versus law-breakers; while law-breakers sometimes pool their resources, they have an uphill battle with regard to such activities compared to law-abiders, who can do their pooling in the open and/or in hiding).

    When it comes to proprietary software, law-abiders are increasingly discouraged from sharing insights, info, breakages, fixes, etc., while the opportunities for pooling resources on the law-breakers' side remains pretty much the same.

    But there's a special prize law-abiders are denied that law-breakers have the opportunity to exploit should they gain access to it, when it comes to proprietary software: the source code.

    Once they have that -- and they will, if the software "matters" at all -- the law-abiders will be on the losing end of things.

    "If source code is outlawed, only outlaws will have source code."

    --
    Practice random senselessness and act kind of beautiful.
  6. Lack of Maintainability through Obscurity by shalunov · · Score: 5
    But it doesn't hurt to obscure things sometimes just to make it tougher for your attacker.
    Or, for that matter, for your co-workers or whoever inherits your systems. Obscurity can improve security, but at a dreadful cost: maintainability.
  7. Re:Obscurity isn't bad, just a waste of time. by schulzdogg · · Score: 5
    Ideally, I'd want all my webservers, etc. to be just as impregnable at port 80 as on port 8000, so why bother hiding it?

    This isn't about making your targets impossible to crack. It's about making harder to crack than the guy next to you.

    The slowest animal in the herd principal.

    Lets say me and you both run service A, when a remote exploit is discovered. Bob the happy script kiddy gets his scanner and starts looking for said service on it's default port. On your box he finds it fine, and cracks you. On mine he doesn't see it initially. So he skips me and moves on. Say bob _really_ wanted me, he would scan all my ports and find that service, but in the meantime I see a bunch of traffic searching my network in odd places.

    The slowest animal in the heard is already down, but in the few seconds I gained I realize some clever escape, and viola, I'm free. Obscurity doesn't make you uncrackable, but it gives you an edge.

  8. Headline: Expert demonstrates ignorance by Xylantiel · · Score: 4
    This article depresses me because I know that many people will believe his argument and start to do the things he suggests. Only to the detriment of the IT community and it's users.

    It seems to me that most people pass through three stages of understanding:

    1. Security through obscurity is bad because everybody says it is and it sounds like it should be.
    2. Using obscurity to supplement security is ok as long as I have real security too. It just makes me less vulnerable to the kiddies.
    3. Doh! I was wrong, obscurity actually is bad for many reasons (discussed below).
    It's sad to see that an expert well respected by the community has only reached level 2 in understanding this concept.

    Now, why is using obscurity bad? I'll give several reasons.

    • Obscure security generally goes untested. This means that "real security" which was there wasn't actually as real as you thought. You end up getting bitten when it's important rather than when it's not!
    • Obscure security breeds insecurity through laziness: "oh I don't have to update that right away, nobody will find it before tomorrow" which turns into next week, which turns into never getting updated.
    • A secure network is one in which the attacker cannot get in even with full knowledge of the network layout. This is harder to do than using obscuration, but you end up with something that's actually secure!
    • Good security depends on you understanding your setup. Networks are generally very complicated just to serve their necessary function in the local environment. Adding useless complexity by obscuring simply makes the network more difficult to understand and thereby decreases security.
    • Related to the previous point: knowing your network's vulnerabilities and being able to accurately analyze any attempted attacks is essential. Obscurity makes it more difficult for the attacker, but it also makes it more difficult for the home team. If you can't track the attacker's path through your spaghetti of accumulated obscurations you can't secure the network against the next similar attack. (note all successful or partially successful attacks are generally a string of smaller attacks on subsystems, which must be strung together to get all the way in.)
    • All security measures are a tradeoff between usability and security. Obscuration, on the other hand hurts usabality without actually providing any security benefits. Don't think it doesn't matter if you do something in a totally unconventional way: it creates problems for your users because things are non-standard (and may not match documentation!), it hurts your employer in terms of the others that will have to maintain the system, and it hurts the community by complicating issues unnecessarily. Spend you usability trade-offs on real security. I'm sure that will be enough if you're actually secure.
    • Also, most of us aren't as ingenius as we think we are. In many cases by doing something you think is clever you're more likely to make things worse rather than better through unforseen consequences. I think the phrase is "keep it simple stupid"! Unfortunately this is especially true for people in class 2 above, who by definition haven't reached class 3, where they understand this.
    I could probably go on, but I'll stop now. I think these are the most important points. It's really too bad when people without a lot of foresight get in positions of influence.
  9. I have another concept that's better by graveyhead · · Score: 5

    Security through unpopularity. Let's face it, if you run a web server under BeOS, the likelyhood of getting hacked compared to running IIS, is roughly the same as the ratio between BeOS users and Windows users. Cheap ass security advice: find the most unpopular system you can (put those Commodore 64s to use!), lock it down to the best of your sysadmin abilities, and start praying!

    Well, your fingers weave quick minarets; Speak in secret alphabets;

    --
    std::disclaimer<std::legalese> sig=new std::disclaimer; sig->dump(); delete sig;
  10. How about we just go with Security Through IP? by ackthpt · · Score: 5
    The root password to this server is Adobe378210
    If you log in and are not authorized by Adobe, you will be in violation of DMCA statutes and join Dmitri Sklyarov in jail.

    Have a nice day.

    Login:

    --
    All your .sig are belong to us!

    --

    A feeling of having made the same mistake before: Deja Foobar
  11. OS advocates always forget by MeowMeow+Jones · · Score: 5
    that it's a hell of alot easier to write a rootkit against source code than it is against a binary.

    Trolls throughout history:

    --

    Trolls throughout history:
    Jonathan Swift

  12. I'm talking about rootkits, not exploits by MeowMeow+Jones · · Score: 5
    rootkits indtroduce their own exploits on a compromised system.

    So a big apache expliot comes out, and a half hour later there's a patch (thanks to open source) and you apply it/ recompile. Then you look at the apache log files and don't see any unusual activity. So you're safe, right? wrong. Your system was compromised and a rootkit was installed. It cleaned up all the logs. It added a backdoor to getty. It modified your MD5 checksum verification. It modified your rpm so that it points to the hackers server, no matter what you say. It modified gcc to include a backdoor into any program that requires authenitcation and insert this code into any gcc recompiles.

    Do I really need to prove that it's easier to change:

    if (checkPassword(password)) {goCrazy();}

    to

    if (checkPassword(password) || !strcmp(password, "k00ldud3") {goCrazy();}

    than it is to use a disassembler on an executable with no symbols to figure out what the hell is going on and insert a back door? Not only does this require a much higher level of expertise, it also requires significantly more time for the person who can do it.

    Trolls throughout history:

    --

    Trolls throughout history:
    Jonathan Swift

  13. Pretty standard, really ;) by einhverfr · · Score: 5
    The O'Reilly Book, "Building Internet Firewalls" makes this point. Obscurity as a part of a strategy is one thing. It is not the whole policy whe used well.

    Furthermore, running services on non-standard ports provides no real obscurity but it makes administration substanitally harder. In this way, it is in no way good policy.

    Good obscurity tactics involve hiding internal systems from your external DNS servers, trying to avoid letting people see what OS you are using, etc. Forcing people to do guesswork is good, but it should not inconvenience your users (that should be left for the more fundamental security measures.

    Attackers should be forced to make their attack based on limited information. By limiting the information they have, you can limit the effectiveness of the attacks and maximize their effort. But it should not be used as a standalone strategy.

    Sig: Tell all your friends NOT to download the Advanced Ebook Processor:

    --

    LedgerSMB: Open source Accounting/ERP
  14. Two kinds of "Security through obscurity" by AdamInParadise · · Score: 5

    There are two kinds of "Security through obscurity", and it confused some people. (Insert funny joke about clueless managers and Microsoft-heads here)

    First there is the bad kind: you're a software vendor and you hope that nobody will notice that your "secure" software uses ROT-13 instead of RSA. You are protected by the DMCA anyway (remember: crack ROT-13, go to jail).

    Then there is the second, good kind: if I'm an admin, there is not reason I shouldn't strip outgoing email of any headers that my reveal the structure of my internat network (some people ARE arguing that you shouldn't do that.)

    I don't really like this "security through obscurity" thingie. Let's make the difference between full specs release and not telling anyone more than they should know. This is the way to built a really secure network.

    --
    Nobox: Only simple products.
  15. Rudimentary Treatise on the Construction of Locks by kidblast · · Score: 5

    This was written in 1853 by Charles Tomlinson, and is only an excerpt of the the treatise, but it shows that people recognized that 'security' trough obscurity was not really security at all, way before the digital age.

    A commercial, and in some respects a social, doubt has been started within the last year or two, whether or not it is right to discuss so openly the security or insecurity of locks. Many well-meaning persons suppose that the discussion respecting the means for baffling the supposed safety of locks offers a premium for dishonesty, by showing others how to be dishonest. This is a fallacy. Rogues are very keen in their profession, and already know much more than we can teach them respecting their several kinds of roguery. Rogues knew a good deal about lockpicking long before locksmiths discussed it among themselves, as they have lately done. If a lock -- let it have been made in whatever country, or by whatever maker -- is not so inviolable as it has hitherto been deemed to be, surely it is in the interest of honest persons to know this fact, because the dishonest are tolerably certain to be the first to apply the knowledge practically; and the spread of knowledge is necessary to give fair play to those who might suffer by ignorance. It cannot be too earnestly urged, that an acquintance with real facts will, in the end, be better for all parties.

    Some time ago, when the reading public was alarmed at being told how London milk is adulterated, timid persons deprecated the exposure, on the plea that it would give instructions in the art of adulterating milk; a vain fear -- milkmen knew all about it before, whether they practiced it or not; and the exposure only taught purchasers the necessity of a little scrutiny and caution, leaving them to obey this necessity or not, as they pleased.

    ...The unscrupulous have the command of much of this kind of knowledge without our aid; and there is moral and commercial justice in placing on their guard those who might possibly suffer therefrom. We employ these stray expressions concerning adulteration, debasement, roguery, and so forth, simply as a mode of illustrating a principle -- the advantage of publicity. In respect to lock-making, there can scarcely be such a thing as dishonesty of intention: the inventor produces a lock which he honestly thinks will posess such and such qualities; and he declares his belief to the world. If others differ from him in opinion concerning those qualities, it is open to them to say so; and the discussion, truthfully conducted, must lead to public advantage: the discussion stimulates curiosity, and curiosity stimulates invention. Nothing but a partial and limited view of the question could lead to the opinion that harm can result: if there be harm, it will be much more than counterbalanced by good.

  16. Lulled into a false sense of security. by asdfdf · · Score: 4

    I think the trouble is not having security through obscurity, but gaining a false sense of security thru obscutity.

    It is the thinking that your server is secure and untouchable that is the problem