Top 10 Web Software Application Security Risks
OWASP, an open and free organization focused on evaluating and improving software application security, has released the OWASP Top 10 Application Security Risks – 2010 RC1 (PDF), a whitepaper documenting the top 10 web application security risks along with details on how threat agents can exploit these possible vulnerabilities, accompanied with examples and advice on what can be done to avoid them.
Released under the Creative Commons Attribution ShareAlike3.0 license, the OWASP Top 10 Web Application Security Risks – 2010 contains:
|A1 –Injection||Injection flaws, such as SQL, OS, and LDAP injection, occur when untrusted data is sent to an interpreter as part of a command or query. The attacker’s hostile data can trick the interpreter into executing unintended commands or accessing unauthorized data.|
|A2 –Cross Site Scripting (XSS)||XSS flaws occur whenever an application takes untrusted data and sends it to a web browser without proper validation and escaping. XSS allows attackers to execute script in the victim’s browser which can hijack user sessions, deface web sites, or redirect the user to malicious sites.|
|A3 –Broken Authentication and Session Management||Application functions related to authentication and session management are often not implemented correctly, allowing attackers to compromise passwords, keys, session tokens, or exploit implementation flaws to assume other users’ identities.|
|A4 –Insecure Direct Object References||A direct object reference occurs when a developer exposes a reference to an internal implementation object, such as a file, directory, or database key. Without an access control check or other protection, attackers can manipulate these references to access unauthorized data.|
|A5 –Cross Site Request Forgery (CSRF)||A CSRF attack forces a logged-on victim’s browser to send a forged HTTP request, including the victim’s session cookie and any other authentication information, to a vulnerable web application. This allows the attacker to force the victim’s browser to generate requests the vulnerable application thinks are legitimate requests from the victim.|
|A6 –Security Misconfiguration||Security depends on having a secure configuration defined for the application, framework, web server, application server, and platform. All these settings should be defined, implemented, and maintained as many are not shipped with secure defaults.|
|A7 -Failure to Restrict URL Access||Many web applications check URL access rights before rendering protected links and buttons. However, applications need to perform similar access control checks when these pages are accessed, or attackers will be able to forge URLs to access these hidden pages anyway.|
|A8 –Unvalidated Redirects and Forwards||Web applications frequently redirect and forward users to other pages and websites, and use untrusted data to determine the destination pages. Without proper validation, attackers can redirect victims to phishing or malware sites, or use forwards to access unauthorized pages.|
|A9 –Insecure Cryptographic Storage||Many web application do not properly protect sensitive data, such as credit cards, SSNs, and authentication credentials, with appropriate encryption or hashing. Attackers may use this weakly protected data to conduct identity theft, credit card fraud, or other crimes.|
|A10 -Insufficient Transport Layer Protection||Applications frequently fail to encrypt network traffic when it is necessary to protect sensitive communications. When they do, they sometimes support weak algorithms, use expired or invalid certificates, or do not use them correctly.|
The document provides explanations how to identify if your own site is vulnerable to these security risks, how to prevent attacks, and examples of how such an attack can be carried on by a threat agent. For example, the Injection security risk is exploited based on the following vulnerable SQL query:
String query = "SELECT * FROM accounts WHERE custID='" + request.getParameter("id") +"'";
An attacked could use this by replacing “the ‘id’ parameter in their browser to send:
' or '1'='1. This changes the meaning of the query to return all the records from the accounts database, instead of only the intended customer’s” by using:
http://example.com/app/accountView?id=' or '1'='1
This would result in a SQL statement that looks like:
SELECT * FROM accounts WHERE custID='' or '1'='1'
As advice for the Injection risk, the paper recommends “keeping untrusted data separate from commands and queries”:
- The preferred option is to use a safe API which avoids the use of the interpreter entirely or provides a parameterized interface. Beware of APIs, such as stored procedures, that appear parameterized, but may still allow injection under the hood.
- If a parameterized API is not available, you should carefully escape special characters using the specific escape syntax for that interpreter. OWASP’s ESAPI has some of these escaping routines.
- Positive or “whitelist” input validation with appropriate canonicalization also helps protect against injection, but is not a complete defense as many applications require special characters in their input. OWASP’s ESAPI has an extensible library of white list input validation routines.
The top 10 list has been created based on OWASP Risk Rating Methodology which follows these steps in identifying and assessing software application risks:
- Identifying a Risk
- Factors for Estimating Likelihood
- Factors for Estimating Impact
- Determining Severity of the Risk
- Deciding What to Fix
- Customizing Your Risk Rating Model
Compared to the same document released in 2007, the top 10 list has some changes, with the most notable changes being dropping the “Malicious File Execution” and “Information Leakage and Improper Error Handling” risks, and adding two new ones, “Security Misconfiguration” and “Unvalidated Redirects and Forwards”:
The Open Web Application Security Project (OWASP) is supported by OWASP Foundation, a 501c3 not-for-profit charitable organization focused on improving software application security. OWASP provides for free security tools and standards, books on application security testing, secure code development and code review, security controls and libraries, conferences, research, mailing lists.
Caitie McCaffrey Apr 24, 2015