OWASP - The Top 10 Most Critical Web Application Security Risks 2010
更新时间:2023-05-10 08:58:01 阅读量: 实用文档 文档下载
- owasp推荐度:
- 相关推荐
Web Application Security Risks
OWASP Top 10 – 2010The Top 10 Most Critical Web Application Security Risks
Dave Wichers COO, Aspect Security OWASP Board Member dave.wichers@ dave.wichers@Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License.
The OWASP Foundation/
Web Application Security Risks
What’s Changed?
OWASP - 2010
Web Application Security Risks
Mapping from 2007 to 2010 Top 10OWASP Top 10 – 2007 (Previous)A2 – Injection Flaws A1 – Cross Site Scripting (XSS) A7 – Broken Authentication and Session Management A4 – Insecure Direct Object Reference A5 – Cross Site Request Forgery (CSRF) <was T10 2004 A10 – Insecure Configuration Management> A8 – Insecure Cryptographic Storage A10 – Failure to Restrict URL Access A9 – Insecure Communications <not in T10 2007> A3 – Malicious File Execution A6 – Information Leakage and Improper Error Handling
OWASP Top 10 – 2010 (New)A1 – Injection A2 – Cross Site Scripting (XSS) A3 – Broken Authentication and Session Management
= A4 – Insecure Direct Object References = A5 – Cross Site Request Forgery (CSRF) + A6 – Security Misconfiguration (NEW)A7 – Insecure Cryptographic Storage A8 – Failure to Restrict URL Access
= A9 – Insufficient Transport Layer Protection + A10 – Unvalidated Redirects and Forwards (NEW)
-
<dropped from T10 2010> <dropped from T10 2010>
OWASP - 2010
Web Application Security Risks
OWASP Top 10 Risk Rating Methodology
Threat Agent
Attack Vector
Weakness Prevalence Widespread Common Uncommon
Weakness Detectability Easy Average Difficult
Technical Impact Severe Moderate Minor
Business Impact
?
1 2 3
Easy Average Difficult
?
1
2 1.66
2 *
1 1
Injection Example
1.66 weighted risk ratingOWASP - 2010
Web Application Security Risks
OWASP Top Ten (2010 Edition)
/index.php/Top_10
OWASP - 2010
Web Application Security Risks
A1 – Injection
OWASP - 2010
Web Application Security Risks
SQL Injection – IllustratedCommunication Knowledge Mgmt E-Commerce Bus. Functions
Legacy Systems
Administration Transactions
Application Layer
Human Resrcs
Web Services
Directories
Accounts Finance
Databases
HTTP request APPLICATIONATTACK
HTTP SQL response queryCustom Code
DB Table
Billing
"SELECT * FROM Account Summary Account: Account: accounts WHERE SKU: acct=‘’ OR 1=1-Acct:5424-6066-2134-4334 Acct:4128-7574-3921-0192 ’"Acct:5424-9383-2039-4029 Acct:4128-0004-1234-0293
1. Application presents a form to the attacker 2. Attacker sends an attack in the form data 3. Application forwards attack to the database in a SQL query 4. Database runs query containing attack and sends encrypted results back to application 5. Application decrypts data as normal and sends results to the userOWASP - 2010
App Server Web Server Network Layer Hardened OS
Firewall
Firewall
Web Application Security Risks
A1 – Avoiding Injection FlawsRecommendations1. Avoid the interpreter entirely, or 2. Use an interface that supports bind variables (e.g., prepared statements, or stored procedures),Bind variables allow
the interpreter to distinguish between code and data
3. Encode all user input before passing it to the interpreter Always perform ‘white list’ input validation on all user supplied input Always minimize database privileges to reduce the impact of a flaw
ReferencesFor more details, read the new/index.php/SQL_Injection_Prevention_Cheat_Sheet OWASP - 2010
Web Application Security Risks
A2 – Cross-Site Scripting (XSS)
OWASP - 2010
Web Application Security Risks
Cross-Site Scripting Illustrated1 Attacker sets the trap – update my profile Application with stored XSS vulnerability
2
Script runs inside victim’s browser with full access to the DOM and cookies
3
Script silently sends attacker Victim’s session cookieOWASP - 2010
Accounts Finance
Victim views page – sees attacker profile
Custom Code
Communication Knowledge Mgmt E-Commerce Commerce Bus. Functions
Attacker enters a malicious script into a web page that stores the data on the server
Administration Transactions
Web Application Security Risks
A2 – Avoiding XSS FlawsRecommendationsEliminate FlawDon’t include user supplied input in the output page
Defend Against the FlawPrimary Recommendation: Output encode all user supplied input (Use OWASP’s ESAPI to output encode: /index.php/ESAPI Perform ‘white list’ input validation on all user input to be included in page For large chunks of user supplied HTML, use OWASP’s AntiSamy to sanitize this HTML to make it safe See: /index.php/AntiSamy
ReferencesFor how to output encode properly, read the new/index.php/XSS_(Cross Site Scripting) Prevention Cheat Sheet OWASP - 2010
(AntiSamy)
Web Application Security Risks
Safe Escaping Schemes in Various HTML Execution Contexts#1: ( &, <, >, " ) &entity; ( ', / ) ESAPI: encodeForHTML() &#xHH;
HTML Element Content(e.g., <div> some text to display </div> )
#2: All non-alphanumeric < 256 &#xHH ESAPI: encodeForHTMLAttribute()
HTML Attribute Values(e.g., <input name='person' type='TEXT' value='defaultValue'> ) #3: All non-alphanumeric < 256 \xHH ESAPI: encodeForJavaScript()
JavaScript Data(e.g., <script> some javascript </script> )
HTML Style Property Values(e.g., .pdiv a:hover {color: red; text-decoration: underline} )
#4: All non-alphanumeric < 256 ESAPI: encodeForCSS()
\HH
URI Attribute Values(e.g., <a href="javascript:toggle('lesson')" )
#5: All non-alphanumeric < 256 ESAPI: encodeForURL()
%HH
ALL other contexts CANNOT include Untrusted DataRecommendation: Only allow #1 and #2 and disallow all others See: /index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet for more OWASP - 2010 details
Web Application Security Risks
A3 – Broken Authentication and Session Management
OWASP - 2010
Web Application Security Risks
Broken Authentication IllustratedCommunication Knowledge Mgmt E-Commerce Bus. Functions Administration Transactions
1
User sends credentialsAccounts Finance
?JSESSIONID=9FA1DB9EA... Site uses URL rewriting (i.e., put session in URL) 2
Custom Code
3
User clicks on a link to
in a forum
Hacker checks referer logs on and finds user’s JSESSIONID 5 Hacker uses JSESSIONID and takes over victim’s account
4
OWASP - 2010
Web Application Security Risks
A3 – Avoiding Broken Authentication and Session ManagementVerify your architectureAuthentication should be simple, centralized, and standardized Use the standard session id provided by your container Be sure SSL protects both credentials and session id at all times
Verify the implementationForget automated analysis approaches Check your SSL certificate Examine all the authentication-related functions Verify that logoff actually destroys the session Use OWASP’s WebScarab to test the implementation
Follow the guidance from/index.php/Authentication_Cheat_SheetOWASP - 2010
Web Application Security Risks
A4 – Insecure Direct Object ReferencesHow do you protect access to your data? This is part of enforcing proper “Authorization”, along with A7 – Failure to Restrict URL Access A common mistake … Only listing the ‘authorized’ objects for the current user, or Hiding the object references in hidden fields … and then not enforcing these restrictions on the server side This is called presentation layer access control, and doesn’t work Attacker simply tampers with parameter value Typical Impact Users are able to access unauthorized files or dataOWASP - 2010
Web Application Security Risks
Insecure Direct Object References Illustratedhttps:///user?acct=6065
Attacker notices his acct parameter is 6065 ?acct=6065 He modifies it to a nearby number ?acct=6066 Attacker views the victim’s account informationOWASP - 2010
Web Application Security Risks
A4 – Avoiding Insecure Direct Object ReferencesEliminate the direct object referenceReplace them with a temporary mapping value (e.g. 1, 2, 3) ESAPI provides support for numeric & random mappingsIntegerAccessReferenceMap & RandomAccessReferenceMap
http://app?file=Report123.xls http://app?file=1 http://app?id=9182374 http://app?id=7d3J93
Access Reference Map
Report123.xls Acct:9182374
Validate the direct object referenceVerify the parameter value is properly formatted Verify the user is allowed to access the target objectQuery constraints work great!
Verify the requested mode of access is allowed to the target object (e.g., read, write, delete)OWASP - 2010
Web Application Security Risks
A5 – Cross Site Request Forgery (CSRF)Cross Site Request Forgery An attack where the victim’s browser is tricked into issuing a command to a vulnerable web application Vulnerability is caused by browsers automatically including user authentication data (session ID, IP address, Windows domain credentials, …) with each request Imagine… What if a hacker could steer your mouse and get you to click on links in your online banking application? What could they make you do? Typical Impact Initiate transactions (transfer funds, logout user, close account) Access sensitive data Change account detailsOWASP - 2010
Web Application Security Risks
CSRF Vulnerability PatternThe Probl
emWeb browsers automatically include most credentials with each request Even for requests caused by a form, script, or image on another site
All sites relying solely on automatic credentials are vulnerable!(almost all sites are this way)
Automatically Provided CredentialsSession cookie Basic authentication header IP address Client side SSL certificates Windows domain authenticationOWASP - 2010
Web Application Security Risks
CSRF Illustrated1 Attacker sets the trap on some website on the internet (or simply via an e-mail)
2
While logged into vulnerable site, victim views attacker site
Custom Code
3 <img> tag loaded by browser – sends GET request (including credentials) to vulnerable site Vulnerable site sees legitimate request from victim and performs the action requestedOWASP - 2010
Communication Knowledge Mgmt E-Commerce Commerce Bus. Functions
Hidden <img> tag contains attack against vulnerable site
Application with CSRF vulnerability
Administration Transactions
Accounts Finance
- 教学能力大赛决赛获奖-教学实施报告-(完整图文版)
- 互联网+数据中心行业分析报告
- 2017上海杨浦区高三一模数学试题及答案
- 招商部差旅接待管理制度(4-25)
- 学生游玩安全注意事项
- 学生信息管理系统(文档模板供参考)
- 叉车门架有限元分析及系统设计
- 2014帮助残疾人志愿者服务情况记录
- 叶绿体中色素的提取和分离实验
- 中国食物成分表2020年最新权威完整改进版
- 推动国土资源领域生态文明建设
- 给水管道冲洗和消毒记录
- 计算机软件专业自我评价
- 高中数学必修1-5知识点归纳
- 2018-2022年中国第五代移动通信技术(5G)产业深度分析及发展前景研究报告发展趋势(目录)
- 生产车间巡查制度
- 2018版中国光热发电行业深度研究报告目录
- (通用)2019年中考数学总复习 第一章 第四节 数的开方与二次根式课件
- 2017_2018学年高中语文第二单元第4课说数课件粤教版
- 上市新药Lumateperone(卢美哌隆)合成检索总结报告
- Application
- Critical
- Security
- OWASP
- Risks
- Most
- 2010
- Top
- Web
- 10
- 10KV系统故障及处理
- 第6章 沉淀溶解平衡
- 氧化泥炭黄腐酸液体肥应用效果的探讨
- office2013分析表格教程
- 2012山东省十次党代会报告
- 2017年大学生暑期最新实习总结
- 中国石油大学 成本会计 第三次在线作业
- 免费下载2009年5月心理咨询师二级理论知识真题职业道德真题(全)
- 食堂食品安全卫生应急预案
- 教你如何建手机网站
- 2011届江苏省百校高三样本分析考试_数学
- 第二章 学前儿童社会性发展
- 2009年中国互联网舆情分析报告
- 徐州企业商会名单
- 科目三考试评判标准
- 国家公务员考试行测言语理解与表达之逻辑填空思维
- 山东省医学科学院附属医院核医学科应用项目环境影响报告表
- Large-Scale Mass Power Spectrum from Peculiar Velocities
- 女方离婚起诉书范文2016
- 汽车维修专业实习计划1