DISQUS

Matasano Chargen: Defense in Depth, Reconsidered: Is Information Security Anything Like War?

  • Anonymous · 1 year ago
    I'm still sitting on the fence with regards to defence in depth but I think delaying an attacker has merit. Whether that is in the exploit development stage or the actual attack.

    Safes these days don't say that they'll keep * out but rather they will keep a skilled attacker out for X amount of hours. Attacking something is all about effort. Hence why the average attacker will not go after the OpenBSD boxes.

    On another note "“All it costs you is a normal sex life.", maybe we should ask Dowd how much of his normal sex life he lost with that flash exploit ;)
  • Thomas Ptacek · 1 year ago
    It's a good point. Some security problems are best modeled as the safecracking problem --- particularly DRM and software protection.

    But they key insight driving that model? *The problems are believed theoretically impossible to solve.*

    With regards to the price Dowd paid, you need to have a soul and a heart that pumps blood instead of ice cold synthetic coolant to care about your sex life. Dowd is reproduced in factories; he's not concerned.
  • Ryan Russell · 1 year ago
    "you have to find the one where no single well-designed defense could have worked."

    Who says that's the standard? If it is, then just fix all the vulns. Problem solved.

    So, you plan to stop recommending ASLR and NX and such, then?
  • Thomas Ptacek · 1 year ago
    I don't know about ASLR and NX. That's an open question for me.

    You'll hear more from me on defense-in-depth, but for the time being let's sum up my position as, "if it has no customer cost, I don't object to it".
  • Chris · 1 year ago
    It all comes down to economics IMO. And that goes for both offensive and defensive sides. An arms race kind of thing. Except in this case time can be more important than money, so the attacker usually has the upper hand. So delaying the attacker is probably the best you can do in most cases.
  • John Fsck · 1 year ago
    I'm not sure I understand your Common Criteria reference? In my opinion as a CC evaluator the CC is rather light on defense in depth, if you're really bored look at how a Security Target is constructed, some property of the TOE (target of evaluation) is mapped to a threat and the threat is considered mitigated (after the assessment of a considerable amount of rationale and testing). A lot of the time threats are mitigated by the physical environment, ie your network device is locked away securely, but then it is difficult to construct a security target to state that physical tampering is defended against in depth by physical mechanisms in the environment and some other feature on the product.

    I could possibly understand the argument of CC being utilised in a defense in depth manner, ie stating you must have EALX level devices where X increases with perceived threat. The application of evaluated products obviously differs somewhat from the evaluation process itself though.

    I'm not sure how coherent this comment has been, really i'd just like you to elaborate on the common criteria reference (without starting a flame war as to the CC's value :) ).
  • David LeBlanc · 1 year ago
    There are two Saltzer and Schroeder principles that are included somewhat as an afterthought. The first is work factor. The obvious example is a repeated password verifier hash. You _can_ get the password, just not before the information loses value. There are other examples, especially operational, where making the attacker work results in them bothering someone else or making enough noise to set off alarms. Which leads to the second - if you cannot stop someone completely, it is often a good thing if the problem can be logged.
  • Mongo · 1 year ago
    the entire GRSecurity/PaX philosophy is about layering exploit mitigation techniques together to make some exploits impossible and others very low probability, as Ryan pointed out. This is combined with MAC/RBAC systems that try to make the targeted program useless for further system compromise by denying it the ability to do anything useful for an attacker that's not required for the program to do it's job.

    these protections lose significant effectiveness when not deployed as a whole but in piecemeal - it's a very gestalt system.

    When combined with software developed by security-aware programmers that goes through a through security audit, I think this certainly qualifies as defense in depth for your (C and C++ based) software.
  • kowsik · 1 year ago
    Defense in depth is like "layered condoms". At some point, you just get comfortably numb and you don't quite feel safe either.
  • sigsegv · 1 year ago
    The truth that everyone needs to realize is that the attackers will *always* win (one way or another).

    Defense in depth just makes things harder for the attacker and potentially that much more rewarding.
  • Alex · 1 year ago
    RE: Predictability

    First, it's worth noting that the ability to create accurate probability statements can be very different from the ability to be precise. That's a nuance lost on many security engineers.

    Second, there's a "level of abstraction" decision that goes along with that quest for accuracy and balance with precision. For example:

    "How big is Chicago?" seems to be a simple question to answer, but depending on need it can be very open ended. Two questions that come to mind immediately are "How granular does our metric need to be?" and "What do we consider "Chicago?". We might be able to be usefully accurate at a "square mile" level for some definition of "Chicagoland", but be unable to get solid measurement at the "square centimeter" level.

    Predictability, in risk and risk management operates the same way. We may be able to get useful accuracy by sacrificing some precision.

    Finally, because you are trying to predict, this means that security and risk become probability issues. This presents two significant challenges:

    1.) A lack of data (so a frequentist approach suffers)

    2.) An amount of uncertainty

    DiD modeling can be done with some degree of pragmatism using stochastic methods, expressed as a probability. But the value of DiD is going to be particular to several factors. That value will change based on these variables (threat community, for example) and, of course, carry uncertainty in the probability statement. This probability statement also has relative value. It may or may not be able to answer "Are we secure?" depending on how we define "secure". It sometimes can help answer "Can we justify another security trinket in our menagerie?"
  • wrc · 1 year ago
    "Even just sitting there encourages the big boucing head of detection to roll by screaming Intruder Alert! Intruder Alert!"

    Evil Otto always wins!

    It's all a game of managing the attacker's risks in relation to the value or utility of what they hope to acquire.
  • mdg · 1 year ago
    DiD shouldn't be presented as an alternative to rooting out and fixing vulnerabilities. The fact is that our current development methodology virtually guarantees that vulnerabilities will always exist, not matter how many Thomas Ptaceks evaluate the code. Once you've dealt with the vulnerabilities that you can find, you have to begin thinking about the ones you missed--- like the NULL pointer vulnerability that leads to an attack on your clever byte-code checker, etc. etc. etc. Because those vulnerabilities are still there, no matter how much attention you've paid to "getting things right".

    DiD is appropriate in this gray area where there really is no alternative. Maybe in the worst case it turns out to be no more effective than throwing salt over your shoulder or saying a prayer. But unlike those practices, it does actually have the ability to stop some attackers and maybe, just maybe, block those potential holes you missed. Certainly I've run into situations where that beautiful attack was /almost/ possible, except for some trivial additional check the designer had thrown in.

    The only other point to make is that DiD shouldn't be looked at as a one-for-one time tradeoff with other evaluation techniques. The real advantage to a good DiD strategy is that it's often relatively inexpensive, and thus packs a lot of (potential) bang for the time buck.
  • Mike Tracy · 1 year ago
    The concept of "Defense in Depth" as outlined in the
    NSA paper (http://www.nsa.gov/snac/support/defenseindepth.pdf)
    co-opts the name of a military strategy but applies it in a manner
    unique to information assurance. The end of the first section of the
    Saltzer and Schroeder paper (http://web.mit.edu/Saltzer/www/publications/pro...)
    alludes to the NSA's take on defense in depth without actually calling
    it by name and says it's a good thing. It's a strategy for applying
    techniques and technology to securing information assets. Nothing more.
    The Military's doctrinal view of information assurance within the wider
    doctrine of Information Operations (http://www.dtic.mil/doctrine/jel/new_pubs/jp3_1...)
    quotes the NSA paper directly.

    The adulteration of the name will probably go on forever but I think the
    concept as conceived is sound and useful. It requires threat modeling
    as a prerequisite which is at the very least a good start.
  • max · 1 year ago
    @sigsegv: I'm not sure technology and/or products deployed under the DiD umbrella are always a win security-wise. I wouldn't feel any safer running AV on my computer today.

    @mdg: I'm with you, I think there are examples of smart applications of DiD that get can get you a lot for a little effort. One of the issues here is that a DiD mechanism fails once it can be defeated in a reusable form (think stack canaries, or limited address randomization), but I don't think this is a given, there are examples where the approach works (W^X, privilege separation, automatic escaping of tainted input).
  • 2giveup · 1 year ago
    Assumption: all civilian and most non black ops government systems are designed to have exploited flaws at all levels of design.
    DID is just like a bulleye target. So why have more rings, when at each level, you have to find the flaw, and TRY to design around it, or handle the flaw somehow, or at least monitor it?
    POINT: security requires simple, understood systems. Better the small problematic devil, than the SELinux heavan obscurity box on virtualized whatever, running on a "trusted BIOS" < FUNNY joke, come on.

    Computer security REALLY sucks as a __fill in the blanks __. Reminds me of Al Capone days. Oh well. VAX was last full open design system to civilians, TBOMKnowledge.

    Oh well. It used to be duck and cover, now its obscure and pray. GRR.
  • Andre Gironda · 1 year ago
    I like the cheetah-example. That's the "weakest link" idiom that goes along with "defense-in-depth".

    Unfortunately, software security *is* the weakest link -- not the network -- not the systems -- not the OS "exploitation countermeasures" -- not the WAF -- not the APIDS, RB-IDS, or network-based IPS/IDS.

    If you want an accurate model for "defense-in-depth", then you not only need IT/Ops controls, but also SDLC controls.

    A software weakness (e.g. XSS, SQLi, stack-based buffer overflow) may have a workaround (e.g. NoScript, WAF, PaX/ASLR) - but the workaround only works 100% of the time when backed by a software fix that doesn't reactivate the original (or any new) vulnerability. In other words, a bug is still considered critical priority to fix *in*the*code* if the bug can destroy, change, or conceal data.
  • ivan · 1 year ago
    I'd look for different and more "modern" terminology to discuss the topic. I particularly like Nate Lawson's idea of security "mesh" as opposed to a "chain", it helped me realize that whenever I heard or read Defense in Depth I've actually thought of a mesh of interlocked security mechanisms that must all fail simultaneously rather than of a chained set of mechanism that can fail in sequence. The traditional defense in depth theory applied to information security may be nice to read and a sound military strategy (for a past era I'd argue) but it is a real-world failure when applied to todays networks and applications that have either one or at- most- two layers of depth and/or a steaming pile of extra security clutter stacked on top of itself.
    Btw, I think that the better source for modern information security doctrine are casinos rather than military organizations. In that context, and to follow up on sigsegv's comment: some attackers will occasionally win some may even win big, but in the long run the casino always wins unless there is a substantial amount of collusion.
  • Mad Irish · 1 year ago
    I think it has become trendy in security circles to decry traditional paradigms like "defense in depth" or "network perimeter" but I think to do so is a mistake. Defense in depth is a perfectly acceptable practice. While defense in depth might not always be the security solution that prevents an attacker, it does offer some breathing room. Due to the complexity of systems it is likely that at any given time any system on your network (or server) might expose a vulnerability. Applying defense in depth protects these exposures. I think it's irresponsible for people in the security community to toss aside a core principle like defense in depth. Nobody would recommend that a home user who utilizes file sharing on their network ditch their NAT device and expose their services to the internet. Because of the shifting nature of the security landscape, services that are secure now might not be in the future and only defense in depth can provide any sort of assurance given that evolution.
  • sigsegv · 1 year ago
    max: You're correct; running AV shouldn't make you feel any safer. Just like anything else, it's another layer. It'll stop the kids out there looking to throw an SDBot up on your box, but it won't stop someone who's out to own you specifically (pr0j3kt m4yh3m anyone?).

    BTW, here's a point that I think Thomas and those commenting are missing: there are more types of hackers than script kiddies and Mark-Dowdain super hackers. You also have the middle of the road attacker, who does pick out a target, does audit code (but won't find a vulnerability in Flash or OpenSSH) and is willing to work for days/weeks/months on a target (or a set of targets).

    Again, they're not Mark Dowd, Halvar Flake or FX. By the same token they're not xtix, mxn or twm (and that comparison probably went over a few heads), but they are competent and they do get lucky.

    Oh, and Thomas, I don't see how you can completely discount things like ASLR and W^X. IMO, they do help and make things more difficult for attackers of all skill levels.

    I'm not part of the "security industry" so maybe my take on this is different than all of yours... whatever...
  • Jeremiah Blatz · 1 year ago
    I'm going to have to call BS on this one. Maybe because I have a more convenient definition of defense in depth than you. I'm going to claim that defense in depth is an approach where the security of a system is maintained even if one defense is compromised. So, for example, you should perform both input validation and output encoding. That way, if you forget to do one, perhaps the other will save you. Or, how about not storing your passwords in cleartext. Theoretically, you don't have to*, but what if someone compromises your password database? Properly salted, hashed password can mean the difference between full compromise and a bunch of annoying data. Anyway, the delay factor here is significant and linear to defense strength (unhashed vs rainbow table crackable vs dictionary crackable vs brute-force crackable). If the delay is long enough, the hashes are invalid by the time they're broken.

    Finally, I take issue with this: "And you have to do better than that example: you have to find the one where no single well-designed defense could have worked." We do not live in a world where everyone has the luxury of well-designed and perfectly implemented defenses. Defense in depth, to me, is protection against mistakes, and as such, has tremendous value.

    * This is a lie.
  • Thomas Ptacek · 1 year ago
    The defense that was compromised is, prima facie, superfluous.

    As always, there's a subtlety to this that I do a crappy job of surfacing. Because, I obviously agree that you shouldn't store your passwords cleartext. But cases like that are the exception, not the rule, in layered defenses.
  • Dominic White · 1 year ago
    To be honest, I'm failing to see a clear point here. I've read and re-read both the post and comments.

    In my mind, defense in depth provides a clear guiding principle when designing security. I can point to examples, and I can practically use it to develop systems that are less likely to be compromised than others.

    You discussion raises some interesting points, but I fail to see how any of them actually challenge the 'practical reality' of the term.

    @Thomas, your response to Jeremiah, that his examples are exceptions may be were you need to elaborate, as to me those clearly aren't exceptions. Off the top of my head I can suggest several more layers: segmented and ACL'ed networks in case your Wireless auth fails; chroot'ed environments in case there's an active vuln in the app; encrypting sensitive data on your internal network in case your physical access control fails etc. These are all additional controls placed at subsequent layers of the system/data flows and interactions to ideally halt an attacker from proceeding further or at least force them into revealing themselves.

    Phrased differently, successive layers of well defined defenses will decrease the likelihood that an infinitely patient deadline-less Mark Dowd will be successful and increase the likelihood that he'll be spotted; which amounts to stopping the actual bad guys who are actually attacking you.
  • LonerVamp · 1 year ago
    Big props to Dave for this awesome bit: "...Even just sitting there encourages the big boucing head of detection to roll by screaming 'Intruder Alert! Intruder Alert!’"

    If one doesn't accept DiD to some degree or other, does that mean one believes there is a perfect security measure?
  • Thomas Ptacek · 1 year ago
    Dominic, to your examples:

    * Segmentation --- yes, this adds "depth" if your wireless security fails, but you do it for other, better reasons: making your network resilient against insiders.

    * Chroot --- chroot is a classic example of an "obstacle course" security measure (more on that later); no *known* vulnerability is better handled by chroot than by patching.

    * Encrypting --- you encrypt a laptop because of a constant physical threat of laptop theft. Most enterprises don't meaningfully encrypt anything else: a domain admin account in a Windows network will get you everything at a Windows shop. Every encryption step you use just creates 100 more little obstacle course vulnerabilities an attacker will need to overcome.

    There's an argument to be made that some of these measures help against "unknown" threats. Maybe. They do, however, exert a powerful psychological (ie, narcotic) force over security people, and should be questioned all the more thoroughly as a result.
  • Dominic White · 1 year ago
    @Thomas. I think I'm beginning to see your point. Are you saying that an obstacle course just delays the attack, attackers aren't bounded by time, and we don't actually have appropriate methods for spotting an attacker once delayed?

    I may have built a straw man, but I'll poke it anyway by way of your responses to my quick examples, and I did mean them as quick examples, to show that Jeremiah's weren't exceptions; One control can mitigate multiple threats, that is a plus to DiD. Also, another principle of DiD, you shouldn't rely on just one control (i.e. chroot AND patch). There may be ways around those controls, such as domain admin access, but that's why you limit the number of domain admins and stick extra controls around them (increased auditing, more complex passwords, better trained users etc.) i.e. DiD. Additionally, by applying a DiD model (and its implied threat modeling as pointed out by Mike Tracy) you can spot where additional layers need to be applied, for examples PCI is driving payment applications to encrypt more sensitive cardholder stores outside the domain (well some).

    All of this then comes back to your point, that most of these additional layers just increase a non-time bounded attackers time of attack. However, I'm with Dave on this one (I think), that the more meaningful and well though out layers of defense you add, the smaller the pool of attackers who could actually exploit it becomes. To rephrase that, you actually prevent (not delay) a large chunk of the threat community. The ones that remain are usually too few and too unlikely for a meaningful cost/risk reduction benefit to be gained, especially in a large organisation where it is likely the CEO just reset his password to 'password', i.e. there are bigger fish to fry. However, as both the organisational and vendor security maturity increases, there will be time to fry the high impact low likelihood holes.
  • Jeremiah Blatz · 1 year ago
    @Thomas

    > The defense that was compromised is, prima facie, superfluous.

    > Chroot — chroot is a classic example of an “obstacle course” security measure (more on that later); no *known* vulnerability is better handled by chroot than by patching.

    I'm loathe to engage in any sort of ad-hominem attacks here, but this seems like a shocking display of armchair security and theorycraft.

    One may try, and fail, to perform output encoding on all parameters. This does not mean that he/she shouldn't have tried. (It does mean that he/she should try harder.) You seem to think that one should do it perfectly or not at all; I do not see anything in the world that indicates this is a reliably achievable goal.

    Regarding chroot vs patching, my mind boggles at your suggestion that patching is a reasonable defense. That would seem to imply that unpatched exploits do not exist, and that all patches are applied instantaneously. Both of these do not stand up to the most casual comparison to reality.

    If what you're trying to say is that defense in depth is not a substitute for rigorous application of the "key" defense, then I wholeheartedly agree. But in your zeal, you seem to be saying that rigorous application of the key defense is sufficient. The problem is that maintaining perfect defense is a losing proposition over any reasonable timeframe. In some cases, e.g. input validation + output encoding ( + parameter binding for databases), the defense in depth is an attempt to close the gaps over a class of attacks, such that the chance of all the mistakes lining up is close enough to zero. In others, such as patching + chroot ( + IDS in a place where you expect no attacks), the defense in depth is an attempt to prevent (or maybe just to detect) compromise due to unknown attacks. In either case, the approach has value.
  • Stephen Smoogen · 1 year ago
    Thomas, I would disagree with:
    ======
    The defense that was compromised is, prima facie, superfluous.

    As always, there’s a subtlety to this that I do a crappy job of surfacing. Because, I obviously agree that you shouldn’t store your passwords cleartext. But cases like that are the exception, not the rule, in layered defenses.
    ====

    I quit counting the number of sites where passwords are stored in clear text in the database etc because "we have a firewall" or some such nonsense. When asked "what happens if the firewall fails" the general answer is "that can't happen."

    The biggest reason for defense in depth in either networks or computer code is because of the human factor. The larger the organization or code base, the less you can assume that the next data bit you got is 'clean'. Sure the company has a firewall and an anti-virus checker... but today they forgot to turn it on after a reboot or the vendor who does the anti-virus doesn't catch that worm til 2 hours after the one on your local email server does.

    The biggest area where I have seen attrition, etc work is in email arena. Box A has anti-virus software X which usually catches 90% of the viruses. Box B has anti-virus software Y which finds another 90% and C has another set. While A & B are 'superflous' in the case where the virus got to C. most cases it is not and in some cases what A &B saw C would have let through.

    The other issue where defense in depth has come in is where some previous gate is either overwhelmed or fails in some un-predicted way (the network engineer in trying to track down a problem puts a passthrough in and doesn't tell others). The larger the organization, the more likely it will happen somewhere and by relying on a single defense model (usually someone else) you end up screwed.