25 Security Dangers
Recently 30 security organizations from around the globe released their list of the 25 Most Dangerous Programming Errors (see complete article at: https://www.sans.org/top25errors/). Note that this list was put together by the “rock stars” of security including organizations like Symantec, Microsoft, DHS’s National Cyber Security Division and NSA’s Information Assurance Division, MITRE, and OWASP.
You would think that such a diverse group would have difficulty reaching consensus on such a broad topic as the most dangerous programming errors. But apparently consensus was reached rather quickly. What does this tell you? That identifying these must-not-do items is not the challenging part, rather the challenge is getting us practitioners to train our development staff to be aware of the poor practices. If we did a good job educating our development staff, then the easy items would disappear and it would be much more difficult to achieve a consensus list!
The Top 25 Errors are listed below in three categories:
Insecure Interaction Between Components (9 errors)
#1: Improper Input Validation *
#2: Improper Encoding or Escaping of Output *
#3: Failure to Preserve SQL Query Structure (aka ‘SQL Injection’) *
#4: Failure to Preserve Web Page Structure (aka ‘Cross-site Scripting’) *
#5: Failure to Preserve OS Command Structure (aka ‘OS Command Injection’)
#6: Cleartext Transmission of Sensitive Information *
#7: Cross-Site Request Forgery (CSRF)
#8: Race Condition *
#9: Error Message Information Leak
Risky Resource Management (9 errors)
#10: Failure to Constrain Operations within the Bounds of a Memory Buffer *
#11: External Control of Critical State Data *
#12: External Control of File Name or Path
#13: Untrusted Search Path
#14: Failure to Control Generation of Code (aka ‘Code Injection’) *
#15: Download of Code Without Integrity Check *
#16: Improper Resource Shutdown or Release
#17: Improper Initialization *
#18: Incorrect Calculation *
Porous Defenses (7 errors)
#19: Improper Access Control (Authorization) *
#20: Use of a Broken or Risky Cryptographic Algorithm
#21: Hard-Coded Password *
#22: Insecure Permission Assignment for Critical Resource *
#23: Use of Insufficiently Random Values
#24: Execution with Unnecessary Privileges *
#25: Client-Side Enforcement of Server-Side Security *
Do any of these sound familiar to you? Now I am no security expert, and I write precious little code these days, but thought it might be interesting to tabulate how many of the top 25 were understood or know or otherwise recognizable by me. The observant reader may have noted the asterisk at the end of some of the items above. These are the security holes that a non-expert like myself is well aware of – my score: 17 of 25 or 68%.
So what does it tell you if a non-expert can recognize or explain 68% of these items? It tells me that we are not doing a good job of educating our IT resources about these dangers. In essence, we’re not addressing the easy ones well enough.
I’ll put a reminder in my calendar to check the list again in 5 years. Here’s to hoping many if not most of these well-known, relatively easy to address biggies are off the list in 2014 and my score drops down to the F- range of 5%.
I welcome your comments.