Slashdot Mirror


Secure Programming Exams Launched

An anonymous reader writes "The SANS Software Security Institute, in conjunction with organizations such as Siemens, Symantec, Juniper, OWASP, and Virginia Tech, has announced a program for testing whether programmers know how to write secure code. The Secure Programming Skills Assessment is split into separate language families (C/C++, Java/J2EE, Perl/PHP, and ASP/.NET). Director of research Alan Paller says 'This assessment and certification program will help programmers learn what they don't know, and help organizations identify programmers who have solid security skills.' The pilot exam will be held in Washington DC in August, followed by a global rollout."

85 comments

  1. Question by Southphillyman · · Score: 0, Redundant

    How important is security in non gov. applications? I'm a developer and I don't know shit about security to be honest.

    1. Re:Question by EvanED · · Score: 1

      If the program you're writing is, say, /., it's important but not absolutely critical. If you're my bank, or you're paypal, or you're a health insurance provider, it's essential.

    2. Re:Question by Nerdfest · · Score: 3, Insightful

      Do some work for an a business involving online purchasing, and ask your client their opinion.

    3. Re:Question by tecie · · Score: 4, Insightful

      Extremely important.Nobody looks good when their information is hacked. The main difference between the government and a corporation is a corporation can lose customers and die rather quickly.

    4. Re:Question by Anonymous Coward · · Score: 1, Insightful

      Exactly. It's probably possible to find ways of making virtually anything "more secure". Generally security isn't my number 1 priority when developing applications, but then I'm not developing anything mission critical or handling extremely sensitive data. I know some people on here will always say they do put security first, but how many people truly think of how secure something is after completing it? Not many that I know of - it's usually a case of getting something done by a deadline and that's that.

    5. Re:Question by evil_Tak · · Score: 1

      In a desktop calculator application or a NES emulator, it's probably not too important.

      In a web application that deals with customers' personal data, it is of the utmost importance.

    6. Re:Question by Anonymous Coward · · Score: 0
      How important is security in non gov. applications? I'm a developer and I don't know shit about security to be honest.

      Things like:

      SSN #

      DOB

      Name

      are enough to steal someone's identity. Even if you don't handle that information, you still have to worry about some jerk-off hacking your site and placing kiddie porn or a terrorist message to get you into mucho trouble.

      Being security minded should be at the top of your list, IMHO.

      OTOH, you may work for some big mega corp that doesn't give a rat's ass because the law puts the burden of identity theft on the victim: business, governments, and schools who are completely irresponsible with their customer's data can just shrug their shoulders and say, "My bad!"

      Unless someone can give an example where one the mentioned institutions actually had to pay for their stupidity.

      Now, I have to go into my happy place before I really go off on a rant.

    7. Re:Question by dreamchaser · · Score: 1

      If you even have to ask then you don't fit my definition of a programmer anyways, or at the very least a prime example of what is wrong with our educational system.

      I'm sure banks don't worry about security, or the insurance industry, or hospitals, or the oil industry, or the pharmaceuticals, or...etc.

    8. Re:Question by Anonymous Coward · · Score: 0

      BZZZT! WRONG.

      Security is ALWAYS important. Any poorly written application can be a point of weakness in the system. In fact, it is attitudes like yours that foster lax programming practices in the first place. "Oh, it's just a notepad/icon editor/calendar application. If it gets hacked, so what?"

      Say your paltry little text editor application has a minor buffer overflow flaw that gets hacked, it's an unauthorized point of entry into the system that is the start of real problems. Period.

    9. Re:Question by Southphillyman · · Score: 0

      I said I was a developer not a programmer. Jerk.

    10. Re:Question by evil_Tak · · Score: 1

      If my paltry little text editor application has a minor buffer overflow flaw, then the user who exploits it gains...privileges as the user who was running the text editor. Oh noes!

      It's only on operating systems with absolutely no concept of security where things like office suite macros can do any damage at all.

    11. Re:Question by CompMD · · Score: 1

      If you write anything that can be accessed publicly, you are potentially risking the entirety of the machine it is running on, or worse. A poorly written "Hello World" program written in PHP pulling the string "Hello World" from a MySQL database could be enough to get the server pwn3d. If you don't understand the fundamentals of security in programming, you shouldn't be programming in an environment where your ignorance and lack of education can cause damage to a company.

      I agree that most CS programs in the US don't teach security methods, nor do they teach the concept of vulnerability. How is a box pwned? How do you feed a program the right data to execute arbitrary commands? How can you test that? I know the CS program at the local Big 12 university in the city I live in sure as hell doesn't teach any of that.

    12. Re:Question by Anonymous Coward · · Score: 0

      If my paltry little text editor application has a minor buffer overflow flaw, then the user who exploits it gains...privileges as the user who was running the text editor. Oh noes!

      If you're lucky...

    13. Re:Question by Anonymous Coward · · Score: 0

      I accidentally left this hole in our last system that let A DOCTOR from NIGERIA download all the email addresses from our customer suppport database. But I don't see what possible harm could come from that...

  2. If only by vivaoporto · · Score: 3, Insightful

    If only programmers had time enough to evaluate the code they written, and every now and then to refactor some parts. Every coder with a tight schedule will write anything that gets the manager ready-to-production-rubber-stamp and, if it turns out that it has a vulnerability, by the time it gets discovered either it is up to the maintenance team to fix or a new version of the software will already be out, so no fix will be necessary.

    Big. On schedule. Bugless. Pick 2.

    1. Re:If only by syphax · · Score: 1


      I choose On schedule and Bugless.

      --
      Simple Unexpected Concrete Credible Emotional Stories
    2. Re:If only by LordEd · · Score: 1

      Of cheap, fast, and good, you can only have 2 of them.

    3. Re:If only by Jarjarthejedi · · Score: 1

      I'd say it's more like Works. On Schedule. Bugless. Pick 2. :)

      --
      There are two kinds of fool One says 'This is old therefore good' Another says 'This is new therefore better'- Dean Ing
    4. Re:If only by Big+Boss · · Score: 3, Funny

      One "Hello World" coming right up!

    5. Re:If only by jd3nn1s · · Score: 2, Informative

      I think this misses the point. Common vulnerability types could be avoided with a little education on how they actually work. By understanding how vulnerabilities come about would allow programmers to avoid creating instances of them in the first place.

      If you monitor the bugtraq list you can see that the vast majority of reported vulnerabilities are XSS and SQL injections in web apps. Most of these can be easily avoided if you know how they occur.

      This would mean less time needed for reviews as the code would be more secure in the first place.

    6. Re:If only by ciaohound · · Score: 3, Informative

      It is a management problem, absolutely. But it is also a matter of having seasoned lead developers. A project or program manager per se may not have the technical background to make sure the schedule includes security testing, but his lead developer can explain why it needs to be there.

      --
      Oh, yeah, it's not easy to pad these out to 120 characters.
    7. Re:If only by CastrTroy · · Score: 1

      But the solution recommended for the bugs is not always the best solution. You see people recommending using mysql_real_escape (or whatever it's called), to protect against SQL injection when what they really should be doing is only using prepared queries. Using things like mysql_real_escape are easy to forget at certain places in the code, and hard to check all the code to see if you forgot them later, even when you really try to remember. But it's pretty hard to "forget" to use a prepared query when that's what you are used to doing.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    8. Re:If only by Anonymous Coward · · Score: 0

      Noting is ever bugless. Duh.

      Perhaps I have a small project, and I assign a deadline that is unreasonably short for it. Can I still have both on-schedule and bugless? My prediction is: no.

      The usual breakdown is fast, cheap, good. This trade-off seems to be more isormorphic with reality than your proposed trade-off.

    9. Re:If only by jd3nn1s · · Score: 1

      Agreed, prepared statements are definitely the best protection against SQL injections. I don't see why this point starts with a "but" though. If that is what is "recommended" then those doing the recommending need more education.

      Some blame lies with the way certain web-app languages have been put together; e.g. default output to the browser not being escaped. Further abstraction by newer languages, or in-house built layers can solve these problems though, if the programming team understands the risks.

    10. Re:If only by Lord+Ender · · Score: 1

      It isn't a management problem. It is a client problem. Engineering a system with security requirements will always cost more than engineering a system without security requirements.

      If several groups are bidding on a project, and security is not explicitly and verifiably included in the RFQ, any group that ignores security will be able to undercut groups which take security seriously.

      --
      A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
    11. Re:If only by Anonymous Coward · · Score: 0

      How About Bugless and On Schedule. I know what you meant. the terms here are not proper.

    12. Re:If only by Pollardito · · Score: 1

      it can't possibly be secure to just throw random greetings out like that, can you please revise your program to require a login and password prior to the saying hello?

    13. Re:If only by Anonymous Coward · · Score: 0

      Are you a n00b?

      Make that some biometrics and a public key at least!!

    14. Re:If only by CantStopDancing · · Score: 1

      I don't understand. Why is it any easier to remember method A than method B, if one is not used to either? Not that your larger point (use prepared queries vs. escaping strings) is under dispute, but if a developer is more used to using the latter, how would he be more likely to remember to use the former?

      --
      I'm running a pirated copy of Linux.
    15. Re:If only by tpv · · Score: 1
      It's not simply a matter of "A" or "B".
      1. It's either:
      2. do insecure thing "X", but always make sure you do "A" at the same time in order to undo the damage of doing X
      3. do secure thing "B" all the time
      If you forget to do "B", you app simply doesn't work. If you forget to do "A" (but still do "X") then your app works, but in insecure.

      It's much safer to use safe practices all the time than to apply "fixes" on top of unsafe practices.

      --
      Read more of this story at Slashdot.Read more of this story at Slashdot.Read more of this story at Slashdot.
  3. Important by MathFox · · Score: 3, Insightful

    Security is important: there's confidentiality that should be protected (think credit card numbers and other ID theft); systems should be available (downtime of a webshop or adserver costs revenue) but most important integrety of systems and data should be OK. Consider what happens when people break into a bank and start transfering money from random accounts. (People defacing webservers are small fry in this category.)

    --
    extern warranty;
    main()
    {
    (void)warranty;
    }
    1. Re:Important by Anonymous Coward · · Score: 0

      Your data can be lost without a malicious attacker exploiting a security hole. HW/SW failures, etc. Given that you need to protect data and system integrity even when you have "bulletproof" software security (and allocating the amount of resources producing said security), there's a threshold at which security is "good enough" and those resources need to be allocated do protecting system integrity from other means of losses. backups. employee background checks.

  4. /. needs better editors by Anonymous Coward · · Score: 0

    I first read it as "Secure (Programming Exams)" instead of "(Secure Programming) Exams"

    1. Re:/. needs better editors by Applekid · · Score: 1

      When a statement doesn't have parentheses you evaluate from left to right. :)

      --
      More Twoson than Cupertino
    2. Re:/. needs better editors by Anonymous Coward · · Score: 0

      Aww fsck it... That was funny! I extend my karma (albeit non-existent) to your fingertips sir. Thanks for the laugh.

  5. awww by JeanBaptiste · · Score: 1

    no VB =(

    1. Re:awww by stratjakt · · Score: 1

      What do you think ASP/.Net means? VB is covered there.

      --
      I don't need no instructions to know how to rock!!!!
    2. Re:awww by Anonymous Coward · · Score: 0

      Why wasn't this modded funny? I nearly fell out of my chair when I read this.

  6. and in the spirit of computer security... by 192939495969798999 · · Score: 4, Funny

    can we expect to see the answer keys posted to about 100 .ru sites in a week?

    --
    stuff |
    1. Re:and in the spirit of computer security... by Nerdfest · · Score: 1
      Found question one already ...

      - What is your root password?

      ... answer it and you fail.

  7. I don't need no stinkin' exam by Anonymous Coward · · Score: 0
    All I need to know is this:

    <?php
     
    extract($_GET);
    // etc...
     
    ?>
  8. Am I the only one...? by Anonymous Coward · · Score: 0

    Am I the only one who can't create an account there? It keeps complaining about the password not being long enough.

    1. Re:Am I the only one...? by Anonymous Coward · · Score: 0

      just a thought... but maybe your password isn't long enough

  9. FLUB??? by JCOTTON · · Score: 0
    "Programmers can't be expected to catch every single flub, but consider the evidence collected by Rohit Dhamankar...

    WTF? "flub"? Not in my book. It seems that there is a difference of opinion on a few ideas. First - what is a programmer? And also - what is a flub? Do programmers catch flubs or, alternatively, do flubs catch programmers?
    Here I am, sitting in my cube, pole in hand. "Whatcha doin, Joe?" "I'm goin' flubbin' today." "Catch any?" "No, but you shudda seen the one that got away."

    RUBBER TIRES NEVER BREAK

  10. Yeah... by Anonymous Coward · · Score: 0
  11. There is no language named C/C++ ! by chrism238 · · Score: 3, Insightful

    How long will it take employers, head-hunters, and even some technical people, to realise this?

    1. Re:There is no language named C/C++ ! by colesw · · Score: 1

      That would be why it says different families. Unless you happen to believe that Perl/PHP is a language?

    2. Re:There is no language named C/C++ ! by EvanED · · Score: 1

      That depends. How long will it take forum posters to realize that "/" is often used as abbreviation for "and" and "or"?

    3. Re:There is no language named C/C++ ! by extern_void · · Score: 0

      Sure! There is no Bind, no Linux, no Unix and no slashdot's web server.
      Even this post doesn't exist.
      $host slashdot.org
      slashdot.org does not exist (Authoritative answer)

      Oh, i forgot, there is no ROOTSERVERS...

    4. Re:There is no language named C/C++ ! by happyfrogcow · · Score: 2, Funny

      That depends. How long will it take forum posters to realize that "/" is often used as abbreviation for "and" and "or"?

      I've been wondering the same thing here on AndDot for some time now. Or is that OrDot?

    5. Re:There is no language named C/C++ ! by MyNymWasTaken · · Score: 1

      The same identifier can have multiple meanings. Hooray for overloading! Is that covered in the test?

      Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.

    6. Re:There is no language named C/C++ ! by Anonymous+Brave+Guy · · Score: 2, Informative

      It is ironic that the parent post is modded off-topic. If you read the C and C++ newsgroups, you will soon discover that many regulars dislike the term "C/C++". It is ambiguous, and often used (deliberately or inadvertently) by those who don't understand the differences between the languages to hide their lack of knowledge.

      The SANS sample test here is guilty of exactly that crime, demonstrating a fundamental lack of understanding of the differences between how you program in C and how you do it in C++ if you want to write software as secure as possible. Thus the term "C/C++" carries its usual significance to those in the on-line C and C++ communities: it is a warning flag that the person using it probably doesn't know what they're talking about.

      And why would we value any qualification awarded by a group who don't know what they're talking about?

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    7. Re:There is no language named C/C++ ! by chrism238 · · Score: 1

      Thanks for your comment; it summaries well what I meant from my parent post. The security challenges posed by C are not necessarily the same as those posed by C++, or vice-versa. Similarly, an ignorance of the similarities and differences of the two languages may lead to even great security vulnerabiltiies. [Sorry, however, if my "score" of Off-Topic now affects your article.]

  12. in two months by rubycodez · · Score: 1

    the answers for these exams will be on testking and other cheat sites. which will be great as it will then enable thousands of coders to be certified to write secure code, and we'll never have insecure code again. Soon the SAN SW Security Institute can make exams for bug-free code and perfect IT architecture. I'll get all those certs so everything I do will be perfect.

  13. The Slow Move Toward Software Assurance by Coryoth · · Score: 2, Insightful

    Slowly, but surely, security of software is becoming more if an issue. That doesn't mean writing perfectly secure software -- but it does mean closing up some of the glaring holes. As this article points out, a ridiculously large amount of security flaws in web applications come down to failing to do very basic things like failing to do adequate input validation/filtering, which leaves you open to SQL injection, XSS attacks and all manner of other nastiness. Expecting perfect code for simple things like web apps is unreasonable. On the other hand, if we can educate more programmers on basic techniques for handling these very common sorts of errors then things will undoubtedly improve significantly on the security front. Ultimately we are moving toward software assurance, where developers provide certain assurances about their software to let clients know what they can expect. It's not a matter of assuring perfection, it's being able to state clearly what aspects you can be confident of. Being able to say that all user input gets filtered through specific validation and filtering function, for instance, is an example of assurance. That doesn't mean the filtering function is perfect, but guaranteeing that all input goes through it is a start - if you want to provide assurance of stronger security then you might provide assurances as to what types of attacks the filtering function will prevent, and so on. As security becomes more important, providing such assurance offers in contracts will be increasiongly valuable.

    1. Re:The Slow Move Toward Software Assurance by Applekid · · Score: 1

      ". . . a ridiculously large amount of security flaws in web applications come down to failing to do very basic things . . . [I]f we can educate more programmers on basic techniques for handling these very common sorts of errors then things will undoubtedly improve significantly on the security front."

      The problem I see with these types of certification is that, much like other certifications, they don't really teach you the underlying purposes of a lot of things. I mean, how different is securing a system built on C/C++ versus one on ASP/.NET? It always boils down to the fundamentals of being aware of your bounds, verify input, trust nothing, etc etc etc. In addition to, say, a 8.5"x11" paper containing some functions which are bugged and should never be used.

      The breaking up of subject matter seems to me like a trick to quintuple-dip in this market. If you take security for Java and you apply for a job in C++, it will no longer enough to just know the differences. You'll need to run out and hack out your certs for SECURE C++, which will be pretty much the same test with the same issues handled in some syntactically different ways.

      Then again, far be it for any responsible person to be against any move to improve security.

      --
      More Twoson than Cupertino
  14. Not sure I like this by Secret+Rabbit · · Score: 1

    Security is a very fast paced field with new exploits coming out all the time. Are we going to require a refresher class every couple months to keep this cert?

    I really think that things like this, although well intentioned and not a bad idea, will lull corps into a false sense of security (no pun intended ;)) making it counter productive in the long run. People are lazy after all and I know for a fact that only a handful of people I graduated with are keeping there knowledge up to date.

    So, I predict in the future that we'll have a lot of people with this cert that'll have no clue because it has been so long since they got this cert.

    1. Re:Not sure I like this by Anonymous Coward · · Score: 0

      > only a handful of people I graduated with are keeping there knowledge up to date

      I see your not one of them.

  15. Not impressed by Anonymous Coward · · Score: 5, Interesting

    I took the sample "C/C++" exam, making a point to respond quickly and not to consult any references (something I'd never do when actually programming) and I have to say I was singularly unimpressed. The emphasis wasn't on trying to teach good programming practices but rather on trying to fool the person taking the exam with tricky questions that have little if any relevance in actual programming.

    For example, one question was basically making the point that sizeof is a compile time thing that cannot be used to, say, determine the size of a string buffer passed through a char * parameter. But rather than present the question in a straightforward fashion, they has this business of dividing one sizeof value by another - completely unnecessary and confusing. I got the question right but I could just as easily missed it because of the unnecessary complexity and still understood the underlying concept.

    One I did miss (I got 8 out of 10 right, I think) was one about how to declare a pointer to a array of constant strings. The question was phrased so awkwardly that I got confused as to what theyactually wanted and gave the wrong answer even though I know how to get the effect they want.

    I was also unimpressed that there was no feedback given as to why a given answer was correct or incorrect. No feedback is arguably fine if the intent is purely to assess skill levels, but the stated intent is that this "will help programmers learn what they don't know". You can't do that unless you also explain why a given answer is wrong. Perhaps this is merely an artifact of the sample exams, but if so the samples aren't very interesting.

    If this sample exam is in any way representative I think there's a lot more work to be done before this will actually be useful.

    1. Re:Not impressed by Anonymous Coward · · Score: 0

      This is SANS, they are much more about marketing than actual security.

    2. Re:Not impressed by curunir · · Score: 1

      The Java test is also similarly flawed. I got all but one of the questions right, but for most of the ones that asked the right way, the real answer should have been "none of the above". For instance, they asked one question about preventing a user from embedding their session id in a link sent via email that is then sent to the victim who clicks on it and then logs in, thereby giving access to the client that initialized the session. Their best answer (and the one they considered correct) was to establish a new session at login time. But what wasn't said was that allowing the session id to be any part of the URI is a stupid idea to begin with. One of the first things we always do when we install Tomcat or an other J2EE server is to restrict the session id to a secure session cookie. It's never written to disk, required to be sent only over SSL and should never make it into any URI. Accepting a session id from the URI is just stupid.

      That and they asked a number of stupid questions like which layer validation should be responsible for validation. While I picked the one they wanted (the middle tier), each level needs to perform its own level of validation. The front-end needs to validate that the request was made the way the form would have made it (i.e. the supplied parameters include all expected parameters and only those expected parameters. The middle tier then needs to perform validation based on business rules for the application. Lastly, the data tier needs to perform canonical validation to prevent data that is not valid in any context from being sent to the database.

      All in all, not impressed.

      --
      "Don't blame me, I voted for Kodos!"
    3. Re:Not impressed by Anonymous Coward · · Score: 0

      I took the sample "C/C++" exam [...] determine the size of a string buffer passed through a char * [...] how to declare a pointer to a array of constant strings

      So, I take it that was rather a test on C, not C++.

      std::string s; // ...
      s.length();

      std::vector<const std::string> *pvcs;

      Secure code without having to think about it what-so-ever. Don't you just love C++?

    4. Re:Not impressed by Anonymous Coward · · Score: 0

      Yeah, but people DO this all the time (dividing one sizeof by another) So that one example you gave was actually pretty good example of a poor practice folks engage in.

      Jeremy

    5. Re:Not impressed by david_thornley · · Score: 1

      The emphasis wasn't on trying to teach good programming practices but rather on trying to fool the person taking the exam with tricky questions that have little if any relevance in actual programming.
      And this would make it different from any other certification test in what way?
      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    6. Re:Not impressed by Atario · · Score: 1

      You've just described the problem with every assessment test out there, given by certification places or job interviewers or recruiters or anyone else. It's all to determine how well you handle trick questions and how much of a given reference work you've memorized. Not one bit about how well you can program or administer or whatever.

      --
      "A great democracy must be progressive or it will soon cease to be a great democracy." --Theodore Roosevelt
    7. Re:Not impressed by owlstead · · Score: 1

      Oh, I hate those kind of things. With Java Blackbelt for example they ask if something compiles. You get 3 classes or something and they then ask what goes wrong. Then I have to see the strange compiler error within that somehow. Well, bugger that, my Eclipse environment will alert me on any compiler error long before I do any testing. What's the freakin' use? I'm too old to have to worry about trick questions, so I'll leave these particular tests where they are as well.

    8. Re:Not impressed by tpv · · Score: 1
      I agree.

      I got 8/10 on the java test, because I refused to say "always do input validation on the middle tier". Blanket rules like that are
      (a) wrong
      (b) dangerous
      (c) short-sighted
      (d) all of the above
      Even the ones I got right, in very few cases did I think the question was sensible or well considered.
      The question about errors vs exceptions is just plain wrong, and their filters questions is arguably wrong also.

      I'd give them about a 3/10.

      --
      Read more of this story at Slashdot.Read more of this story at Slashdot.Read more of this story at Slashdot.
  16. If security catches on by HomelessInLaJolla · · Score: 2, Insightful

    We may start to see where zero day exploits really originate (implication: within the mother company). We may begin to see how much personal information is truly being gathered (implication: as much as possible). We may realize how long illegal domestic wiretaps have really been going on (implication: at least as long as the technology has been available).

    In all actuality I see a certification like this to be good at heart to begin with but, give another five years, and it will become a method to ensure that programmers only make mistakes in predictable ways--and then everything will proceed as it currently is.

    --
    the NPG electrode was replaced with carbon blac
  17. Worried about security by HomelessInLaJolla · · Score: 1

    They're worried about security, alright. If it's too open then outsiders can begin exploiting them. If it's too closed then they might get caught passing insider trading information. Security is one of those "just right" things in the eyes of big business.

    --
    the NPG electrode was replaced with carbon blac
  18. Me neither by Anonymous+Brave+Guy · · Score: 1

    I agree. They have BrainBench syndrome: they take it upon themselves to judge others, yet clearly don't understand much of the subject themselves. You can tell this from the way the "C/C++" exam (as if security concerns are even close to the same in those two languages) focusses pretty much entirely on C library functions that most security-conscious programmers would avoid entirely, with a random concurrency question at the end. Strangely, it doesn't even reference ideas like using containers rather than raw strings/arrays in C++, avoiding fixed-size buffers and magic numbers in the first place, and other routine programming practices.

    For the record, I scored only 7/10 according to them. This is odd, considering my experience. (I could name drop and list qualifications, but you can't verify them anyway, so for the sake of this discussion, let's assume that I'm technically competent and none of the answers I gave was actually wrong given my understanding of the question.)

    The sample assessment report (PDF) that gives some headings for a C/C++ test is not reassuring, either.

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  19. Found a vulnerability... by minotaurcomputing · · Score: 1

    ... there is a buffer overflow vulnerability on question #9.

    -m

  20. start with a better environment... by Anonymous Coward · · Score: 0

    program for testing whether programmers know how to write secure code

    Good programmers may even know, before that, how too choose platform/technologies that are inherently more secure than others. I'm certainly not saying that this fix all security issues (it doesn't), but it is a good start.

    For example, I'd be less likely to trust a Webapp written in PHP running on a Windows OS than a Webapp written in a language I won't name on /., running in a bullet-proof VM on a Unix OS.

    Funnily enough most major customer banks (all?) have the same preference as I do. Mod me as a troll if you wish, but I'm stating facts.

    On another topic, it never cease to amaze me how programmers are keen to put passwords in plain-text in various database. More knowledgeable ones will go for a cryptographic hash of the password. This is of course still vulnerable to a dictionnary attack. In some case you'll even see some guys having some basic security knowledge, like what a 'salt' is. But of course most programmers have no clue what a 'salt' is. On the PKI side, you'd be amazed by the number of programmers who are completely unable to explain how a public/private key pair works. To them it simply looks like magic. They simply don't get it.

    It's a really sad state of affair and things won't get better any time soon... At this point, when people are able to prevent "SQL injection attack" they think they know something about security. Woaw.

    1. Re:start with a better environment... by Anonymous Coward · · Score: 0

      Ahh yes. Good ole COBOL.

  21. Virginia Tech? by OriginalArlen · · Score: 1

    Vallllllllllldiiiiiiiisssssss!!!! The only person to post to more lists in one day than Gadi Evron!

    --

    Everything I needed to know about life, I learnt from Blake's Seven
  22. Here's the Java test by Anonymous Coward · · Score: 0
    Here's the Java test... Requires onerous registration in order to take it. You may take it multiple times if you wish; the questions are presented in a random order and the order of the choices is randomized as well. I thought it was a pretty silly test. Answers at the end.
    1. From a security perspective, in which J2EE tier is it sufficient to perform input validation?
      1. The enterprise (backend) tier, as this would prevent injection attacks into backend systems like SQL-injection.
      2. The middle tier, as this is the front-door to your application's resources.
      3. The client tier, as this is the front-door to your application and validation should be done as soon as possible.
      4. Any tier, so long as it gets done properly.
    2. Consider the following attack scenario. Which of the following is the best way to mitigate this threat?

      An attacker browses to a website and receives a JSESSIONID without logging in. He then embeds that ID in a link and emails it to a victim. The victim clicks on the link and proceeds to login, using the JSESSIONID that is known by the attacker. The attacker can now masquerade as the victim.

      1. Users should be required to enter text that is represented in a garbled graphic, proving they are human.
      2. The application should provide a new JSESSIONID to each user when they authenticate.
      3. The application server should be configured to expire the JSESSIONID very quickly to reduce the window of opportunity.
      4. Users should be instructed not to click on links in email.
    3. J2EE Filters can improve the security posture of an application for each of the following reasons, except:
      1. Filters can be used to "wrap" a J2EE application, adding new security measures without modifying existing code.
      2. Filters can be used to protect a backend JDBC connection from allowing encryption and other security operations to occur.
      3. Filters can modify incoming requests to the application, allowing input validation and other security operations to occur.
      4. Filters can modify outgoing responses from the application, allowing header-rewriting and other security operations to occur.
    4. In a J2EE application using a JSESSIONID, which of the following does not help protect a user's session data?
      1. Validating the JSESSIONID to ensure it does not contain meta characters.
      2. Encrypting the communications that transmit the JSESSIONID.
      3. Storing the JSESSIONID as a session cookie instead of a permanent cookie.
      4. Making the JSESSIONID long and random.
    5. The Java synchronized keyword is important to security because of which of the following?
      1. It prevents multiple threads from accessing a block of code at the same time.
      2. It allows two different functions to execute simultaneously.
      3. It prevents multiple developers from writing the same block of code.
      4. It allows the class to be loaded as soon as the JRE starts.
    6. Java offers the PreparedStatement class to protect against SQL injection attacks. What is wrong with its use in the following code snippet that may enable an injection attack?

      PreparedStatement stmt = con.prepareStatement<br>
      ("SELECT ssn FROM usersTable WHERE name = " + getParameter("username") );<br>
      ResultSet rs = stmt.executeQuery();

      1. The SQL string must be defined elsewhere, then put into the PreparedStatement in order for it to protect the query.
      2. Because the user is able to specify the username they can change it to someone else's username and access another user's SSN.
      3. The PreparedStatement is being used as a normal, dynamic SQL query. No data is being entered via the safe substitution methods.
      4. The 'username' parameter still needs to be explicitly validated for dangerous content in order for the PreparedStatement to work.
  23. Dividing sizeof by p3d0 · · Score: 1

    Not that I disagree in general, but that sizeof idiom is one I use all the time to compute the number of elements in an array. The point of the question is that this doesn't work for arrays passed as arguments to a function.

    --
    Patrick Doyle
    I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
    1. Re:Dividing sizeof by insane_coder · · Score: 1

      You said it. I'm surprised by how many C/C++ programmers don't know that is the correct way to keep track of the size of an array. I frequently use the following in programs I write: #define NUM_ELEMENTS(x) (sizeof(x)/sizeof(x[0])) Although, how many programmers know this trick, but mistakenly try it when x is a pointer instead of an array?

      --
      You can be an insane coder too, read: Insane Coding
  24. Oops by dj_tla · · Score: 1

    From the title I thought they were talking about preventing cheating on online exams... Unfortunately, since they're not, I doubt we'll be able to take the secure programming exam online securely any time soon.

  25. Make it competitive by Anonymous Coward · · Score: 0

    Make the students write some app that must be put online, classmates then try to break others apps, score+=1 if you break someones elses score-=5 if someone breaks yours. After a given time students can no longer modify their code and is made viewable to all students and more points can be awarded or deducted for all holes that can be found in the code. If you have a positve score at the end, you pass.

    AC

    1. Re:Make it competitive by Anonymous Coward · · Score: 0

      A very interesting suggestion. While it likely will not fit the SANS milieu, I can anonymously guarantee that (1) Paller himself will hear this idea and (2) it will percolate in at least one other person's brain.

      Of course, some enterprising people could start their own web site to do this, but we all know that slashdotters spend more time typing than doing.

      Yeah, that was both a troll AND a challenge, mofos.

  26. And all languages quoted unsuitable for ... by krischik · · Score: 1

    for secure programming. But that not unusual. In fact that seems to be the Zeitgeist.

    Everybody speaks of secure programming but allays in combinations with unsuitable tools and programming languages.

    Reminds me a bit about the Addams Family. Remember the part where Gomez tries to make huge loss of money. In the end he start a venture in Chocolate-Diet - something he things will never work as chocolate is completely unsuitable for diet purpose and his hope is that people won't fall for such a stupid idea - hence he is going to loose money on the venture.

    Of course we now how it ended: Chocolate-Diet was a huge success! He made tons of extra cash. Because people love to go the easy way - even when it is blatantly clear that it won't work.

    And the same here: Instead of going to the pains of learning a programming language and/or tools suitable for secure programming you just go or be send my management to take a silly test [1]. Only difference: Unlike Gomez Addams the "Software Security Institute" knows very well how people (and especially managers with little technical knowledge) work and that there "Chocolate-Diet" will bring in the cash.

    Of course no ./ article of mine on secure programming without me mention that Ada [2] is well suited for secure programming and since PHP was mentioned: How about using the Ada Web Server [3] for truly secure your web applications? Yes, it will take longer to program for the AWS then quickly hacking together a PHP application. But the bitter truth is: quick hacking and secure programming are mutually exclusive.

    Martin

    [1] http://developers.slashdot.org/comments.pl?sid=228 589&cid=18530047
    [2] http://en.wikibooks.org/wiki/Ada_Programming
    [3] http://en.wikibooks.org/wiki/Ada_Programming/Libra ries/Web/AWS