Slashdot Mirror


NSA Says Its Secure Dev Methods Are Publicly Known

Trailrunner7 writes "Despite its reputation for secrecy and technical expertise, the National Security Agency doesn't have a set of secret coding practices or testing methods that magically make their applications and systems bulletproof. In fact, one of the agency's top technical experts said that virtually all of the methods the NSA uses for development and information assurance are publicly known. 'Most of what we do in terms of app development and assurance is in the open literature now. Those things are known publicly now,' Neil Ziring, technical director of the NSA's Information Assurance Directorate, said in his keynote at the OWASP AppSec conference in Washington Wednesday. 'It used to be that we had some methods and practices that weren't well-known, but over time that's changed as industry has focused more on application security.'"

12 of 114 comments (clear)

  1. Here's proof that... by Anonymous Coward · · Score: 4, Insightful

    ...it is definitely possible to write secure software if you just simply follow sound and smart development methods and practices... and don't write half-assed, slipshod, thrown-together-in-a-hurry code.

  2. Of course they say that by dkleinsc · · Score: 5, Insightful

    If the NSA has something that really is Schneier-proof, they wouldn't tell the public. And understandably so, since part of their job is in part to ensure signal security for US agencies that deal in classified information.

    --
    I am officially gone from /. Long live http://www.soylentnews.com/
    1. Re:Of course they say that by hedwards · · Score: 4, Insightful

      But it's almost certainly true. Just look at OpenBSD's record. They went for a full decade without any vulnerabilities in the base system before one was eventually found. And that's from a group of mostly volunteers. Just imagine what you could get from programmers that are both paid and required to use secure coding practices.

      What's really embarrassing is that most of it has been known about for quite some time, but for one reason or another the organization funding the programming doesn't feel like paying for it to be done securely. It's a similar problem to programming style.

    2. Re:Of course they say that by lewiscr · · Score: 3, Funny

      Just imagine what you could get from programmers that are both paid and required to use secure coding practices.

      Windows XP?

    3. Re:Of course they say that by drsmithy · · Score: 3, Insightful

      But it's almost certainly true. Just look at OpenBSD's record. They went for a full decade without any vulnerabilities in the base system before one was eventually found.

      Remote vulnerabilities. In the default install. Which isn't that hard to achieve when your default install doesn't really do much and hardly anyone uses your system.

      Just imagine what you could get from programmers that are both paid and required to use secure coding practices.

      Who didn't have to work towards any specific deadlines or goals ? And had essentially nothing to lose if they didn't get there ? I'd expect much the same.

      When you have nothing in particular to achieve, all the time in the world to achieve it, and no real consequences if you don't, then you'd expect anything that was done would be done well. However, the real world doesn't work like that.

  3. practical application by Tom · · Score: 3, Insightful

    Security, especially in software development, doesn't suffer from the "we don't know how to do it" problem. It suffers from the "we don't have time/budget/patience/interest in doing what we know we should be doing" issue.

    --
    Assorted stuff I do sometimes: Lemuria.org
  4. Re:I see it more like a proof that by Applekid · · Score: 4, Insightful

    That's a closed source/open source distinction. It has nothing to do with development methodology... except that there are more eyes when it's open.

    Depending on whose eyes for closed source, I'm pretty sure the NSA has plenty of great eyes looking over code.

    --
    More Twoson than Cupertino
  5. Re:I see it more like a proof that by icebike · · Score: 5, Insightful

    security doesn't come from obscurity

    Exactly right.

    The best security is the kind where everyone knows how it works, but even given the source code, you can't beat it, or you can't beat it in any useful length of time.

    That being said, the automated code inspection packages you can buy these days look only for the obvious noobie programmer mistakes.

    SELinux, originally from NSA, solves many of the problems of running untrusted code on your box, but even that is not 100% secure, and the maintenance problems it introduces mean that it is seldom used in real life.

    The problem is not how this agency (the NSA) cleans up their code.

    The problem is that we don't know about what backdoors exist in our hardware and our operating systems. Because so much code is embedded in silicon, and so few people actually look at that code, its easy to imagine all sorts of pownage living there.

    A compromised Ethernet card (just sayin by way of example), would be both Obscure, and hard to detect, and have access to just about everything going in and out of your machine.

    Security does not come from obscurity, but insecurity often does.

    --
    Sig Battery depleted. Reverting to safe mode.
  6. Re:Doesn't make sense by hedwards · · Score: 4, Interesting

    I suspect it's more along the lines of people expecting there to be something significant that they have for writing secure code. I'm willing to bet that the only thing they have that most other organizations don't have is a substantial budget for auditing the code for vulnerabilities. They probably wait longer before deploying code as well until it's been thoroughly vetted.

  7. Social engineering always wins by boristdog · · Score: 4, Insightful

    The Soviets almost never used to crack codes. They just social-engineered (blackmail, sex, gifts, schmoozed, etc) to get all the information they wanted.

    It's how Mitnick did most of his work as well.

  8. Security is about preventing unintended outcomes by Anonymous Coward · · Score: 3, Insightful

    Writing bulletproof code isn't really all that hard, but it does take discipline. Discipline to use only those constucts which have been verified with both the compiler and linker.

    Some simple things that coders can do:
    - avoid the use of pointers.
    - Initialize all variables to known values.
    - Perform comparisons with the LHS using a static variable, so you don't accidentally get an assignment instead of a comparison
    - When you are done with a value, reset it to a "known" value. Zero is usually good.
    - Keep functions less than 1 page long. If you can't see the entire function on a single editor page, it is too long.

    Simple.

    BTW, I wrote code for real-time space vehicle flight control systems. When I look at OSS and see variables not set to initial values, I cringe. Sure, it is probably ok, but there isn't any cost to initializing the variables. This is a compile-time decision. Without knowing it, many programmers are counting on memory being zero'ed as the program gets loaded. Not all OSes do this, so if you are writing cross platform code, don't trust it will happen. Do it yourself.

    Oh, and if you want secure programs, loosely typed languages are scary.

  9. Re:Security is about preventing unintended outcome by Jahava · · Score: 3, Informative

    Writing bulletproof code isn't really all that hard, but it does take discipline. Discipline to use only those constucts which have been verified with both the compiler and linker.

    Some simple things that coders can do: - avoid the use of pointers.

    Pointers aren't themselves bad; they just add some layers of complication to the otherwise stack-oriented game. The only reason the stack is nicer than pointers is because they're implicitly managed for you.

    Rather than avoid pointers, what you need is good code structure. Design functions that either manage the lifecycle of a pointer or are explicitly clear about how and what the pointer is going to be used as. Use const aggressively, and avoid typecasting as much as possible. Using good pointer naming techniques and management functions also dissipate the burden. Pointers are too useful to avoid religiously ... rather, build pointer security and management techniques into your coding style from the ground up. Choose descriptive names and try and constrain each pointer to its specific type (this lets the compiler help you keep your pointers straight).

    Initialize all variables to known values.

    Meh, I'm divided on this one. It's one thing to explicitly initialize global variables to either zero (which costs nothing, since they just end up in BSS sections) or non-zero (which puts them statically in the data segment). Stack variables, on the other hand, only really need to be initialized before they're used the first time. Pre-initializing them could lead to wasted instructions initializing them multiple times or cause them to be initialized in all code paths when they're only used in a few. My general rule of thumb is to be smart about it and, once again, naming conventions.

    Perform comparisons with the LHS using a static variable, so you don't accidentally get an assignment instead of a comparison

    Great tip; it's weird at first writing "if( NULL != p )", and you get a few funny stares, but after seeing enough "if( i = 10 )"s lying within seemingly-functional code, it's an easy selling point to make.

    - When you are done with a value, reset it to a "known" value. Zero is usually good.

    Definitely do this with pointers, descriptors, and other handle types. It also makes cleanup and pointer management easier. Less important to do with things like iterators and intermediate variables.

    - Keep functions less than 1 page long. If you can't see the entire function on a single editor page, it is too long.

    It's a good rule of thumb. I would like to add "any time you can't do this, make absolutely certain that you're not doing it for a good reason."

    Good tips, though. One thing I'd like to add: -Wall -Wextra -Werror (or your language's equivalent). If your code can't compile without a single warning, then you need to re-write your code and either manually disarm situations (e.g., override the compiler's common-sense with an assurance that you know what you're doing) or fix the warnings, which are actually bugs and errors. It's always fun to take someone's "bulletproof" code and turn on these flags and watch the crap spill out. Warnings are amazing, and they are absolutely your friend when it comes to writing bug-free and secure code.