Solving Real-World Problems with an Enterprise Security API (ESAPI) Chris Schmidt ESAPI Project Manager ESAPI4JS Project Owner Application Security Engineer.

Slides:



Advertisements
Similar presentations
Webgoat.
Advertisements

Don’t Teach Developers Security Caleb Sima Armorize Technologies.
OWASP Top Dave Wichers OWASP Top 10 Project Lead OWASP Board Member Cofounder, Aspect Security & Contrast Security.
Don’t get Stung (An introduction to the OWASP Top Ten Project) Barry Dorrans Microsoft Information Security Tools NEW AND IMPROVED!
SEC835 OWASP Top Ten Project.
A NTI S AMY J AVA I NTRODUCTION Wang Wenjun June 2011.
WebGoat & WebScarab “What is computer security for $1000 Alex?”
A Demo of and Preventing XSS in.NET Applications.
ESAPI Pictures For Javadoc.
It’s always better live. MSDN Events Security Best Practices Part 2 of 2 Reducing Vulnerabilities using Visual Studio 2008.
Information Networking Security and Assurance Lab National Chung Cheng University The Ten Most Critical Web Application Security Vulnerabilities Ryan J.W.
It’s always better live. MSDN Events Securing Web Applications Part 1 of 2 Understanding Threats and Attacks.
Information Networking Security and Assurance Lab National Chung Cheng University 1 Top Vulnerabilities in Web Applications (I) Unvalidated Input:  Information.
What is OWASP OWASP Live CD Live Demo Omar Sherin-OWASP Egypt.
The 10 Most Critical Web Application Security Vulnerabilities
Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
10 Steps To Agile Development Without Compromising Enterprise Security
Introduction to InfoSec – Recitation 10 Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il)
“The cost of cybercrime is greater than the combined effect on the global economy of trafficking in marijuana, heroin and cocaine”|
OWASP Zed Attack Proxy Project Lead
HTTP and Server Security James Walden Northern Kentucky University.
Origins, Cookies and Security – Oh My! John Kemp, Nokia Mobile Solutions.
The OWASP Way Understanding the OWASP Vision and the Top Ten.
Security testing of study information system Security team: Matis Alliksoo Alo Konno Urmo Lihten Taavi Podzuks Sander Saarm.
Ryan Dewhurst - 20th March 2012 Web Application (PHP) Security.
Copyright 2007 © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
OWASP Top Ten #1 Unvalidated Input. Agenda What is the OWASP Top 10? Where can I find it? What is Unvalidated Input? What environments are effected? How.
OWASP Cambridge 2 nd December Agenda Networking, food and refreshments Welcome Colin Watson Global Application Security Survey & Benchmarking John.
OWASP Top 10 from a developer’s perspective John Wilander, OWASP/Omegapoint, IBWAS’10.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Web Applications Testing By Jamie Rougvie Supported by.
Building Secure Web Applications With ASP.Net MVC.
OWASP OWASP top 10 - Agenda  Background  Risk based  Top 10 items 1 – 6  Live demo  Top 10 items 7 – 10  OWASP resources.
Copyright © 2002 ProsoftTraining. All rights reserved. Java Servlets.
Deconstructing API Security
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
OWASP Building Secure Web Applications And the OWASP top 10 vulnerabilities.
Getting Started with OWASP The Top 10, ASVS, and the Guides Dave Wichers COO, Aspect Security OWASP Board Member OWASP Top 10 and ASVS Projects Lead.
Securing Angular Apps Brian Noyes
DSpace System Architecture 11 July 2002 DSpace System Architecture.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the Creative Commons Attribution-ShareAlike.
Copyright © The OWASP Foundation This work is available under the Creative Commons SA 2.5 license The OWASP Foundation OWASP Denver February 2012.
Copyright © The OWASP Foundation This work is available under the Creative Commons SA 3.0 license The OWASP Foundation OWASP
OWASP London 4 th December Agenda Networking, food and refreshments Welcome Justin Clark Offensive OSINT Christian Martorella and Zigor Zumalde.
WEB-API & MVC5 - Identity & Security Mait Poska & Andres Käver, IT Kolledž 2014.
ASP.NET 2.0 Security Alex Mackman CM Group Ltd
The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under.
Do not try any of the techniques discussed in this presentation on a system you do not own. It is illegal and you will get caught.
Page 1 Ethical Hacking by Douglas Williams. Page 2 Intro Attackers can potentially use many different paths through your application to do harm to your.
SECURE DEVELOPMENT. SEI CERT TOP 10 SECURE CODING PRACTICES Validate input Use strict compiler settings and resolve warnings Architect and design for.
Web Application Security
Web Application Vulnerabilities
An Introduction to Web Application Security
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
Securing Your Web Application in Azure with a WAF
Vulnerability Chaining Every Low Issue Has its big impact
Finding and Fighting the Causes of Insecure Applications
1. ASSOCILATE DEGREE PROGRAM Application Attacks SUBMITTED TO: Fatima Ashiq SUBMITTED By: University Of Central Punjab Farooq Sardar (V1F16ASOC0012) Adnan.
Bill Riggins III OWASP Orlando Co-Chapter Lead
OWASP in favor of a more secure world
Riding Someone Else’s Wave with CSRF
امنیت نرم‌افزارهای وب تقديم به پيشگاه مقدس امام عصر (عج) عباس نادری
Finding and Fighting the Causes of Insecure Applications
WWW安全 國立暨南國際大學 資訊管理學系 陳彥錚.
Presentation transcript:

Solving Real-World Problems with an Enterprise Security API (ESAPI) Chris Schmidt ESAPI Project Manager ESAPI4JS Project Owner Application Security Engineer Aspect)Security AppSec DC 2010

OWASP Who the heck am I? [Rumour has it I should be presenting my credentials] Application Security Engineer – Aspect Security Project Manager - OWASP ESAPI Developer – ESAPI for Java Project Owner - ESAPI for JS Blogger - Yet Another Developer's Blog Aspiring Author - Designing Secure Enterprise Applications

OWASP Solving Real World Problems with An Enterprise Security API (ESAPI) What is an ESAPI? Using OWASP ESAPI Case Study: Cross Site Scripting Case Study: Direct Object Reference Case Study: Yours! Additional Resources Questions?

OWASP Solving Real World Problems with An Enterprise Security API (ESAPI) What is an ESAPI?

OWASP What is an Enterprise Security API? The ESAPI Family Community Breakdown

OWASP What is an Enterprise Security API? High-Level API that provides access to common security functions as services to the calling code. Centrally configured to keep configuration separate from implementation. Developers don't have to focus on writing custom security controls for components. Compliments a Secure Software Development Environment and Secure Coding Conventions Enforces a common API (interfaces) but also allows customization or extension to adapt to specific environments.

OWASP What is an Enterprise Security API?

OWASP What is an Enterprise Security API? Addressing The OWASP Top Ten OWASP Top Ten OWASP ESAPI A1: Injection A2: Cross Site Scripting (XSS) A3: Broken Authentication and Session Management A4: Insecure Direct Object Reference A5: Cross Site Request Forgery (CSRF) A6: Security Misconfiguration A7: Insecure Cryptographic Storage A8: Failure to Restrict URL Access A9: Insufficient Transport Layer Protection A10: Unvalidated Redirects and Forwards Encoder Encoder, Validator Authenticator, User, HTTPUtilities AccessReferenceMap, AccessController User (CSRF Token) SecurityConfiguration Encryptor AccessController HTTPUtilities AccessController

OWASP What is an Enterprise Security API? OWASP ESAPI Project Scorecard 2.0

OWASP Solving Real World Problems with An Enterprise Security API (ESAPI) What is an ESAPI? Using OWASP ESAPI

OWASP Solving Real World Problems with An Enterprise Security API (ESAPI) Getting OWASP’s ESAPI (Java) Download from Google Code: Use Maven: org.owasp.esapi esapi org.owasp.esapi esapi

OWASP Solving Real World Problems with An Enterprise Security API (ESAPI) Basics OWASP ESAPI Uses a Service Locator class to access implementations of core interfaces. This locator is currently configured via the ESAPI.properties file. ESAPI.encoder() ESAPI.validator() ESAPI.randomizer() ESAPI.encryptor() ESAPI.accessController() ESAPI.authenticator() ESAPI.logger() ESAPI.httpUtilities()

OWASP Solving Real World Problems with An Enterprise Security API (ESAPI) What is an ESAPI? Using OWASP ESAPI Case Study: Cross Site Scripting

OWASP Solving Real World Problems with An Enterprise Security API (ESAPI) The Problem Contact Form is vulnerable to XSS The Solution ”> Full Name ”> Full Name

OWASP Solving Real World Problems with An Enterprise Security API (ESAPI) What is an ESAPI? Using OWASP ESAPI Case Study: Cross Site Scripting Case Study: Direct Object Reference

OWASP Solving Real World Problems with An Enterprise Security API (ESAPI) The Problem Direct Reference to File allows writing to Filesystem Behavior: 1. Servlet POSTs to /save.action 2. Filename is stored in a hidden form field 3. Content is entered through a textfield on the page Post looks like: POST /save.action HTTP/1.1 Host: example.com Content-Type: application/x-www-form-urlencoded Content-Length: 35 filename=user-info.txt&content=test Direct Reference to File allows writing to Filesystem Behavior: 1. Servlet POSTs to /save.action 2. Filename is stored in a hidden form field 3. Content is entered through a textfield on the page Post looks like: POST /save.action HTTP/1.1 Host: example.com Content-Type: application/x-www-form-urlencoded Content-Length: 35 filename=user-info.txt&content=test

OWASP Solving Real World Problems with An Enterprise Security API (ESAPI) The Solution class SaveFileServlet extends HttpServlet { // List of accessible files static Set VALID_FILES = new HashSet (); // add file paths to set public void doPost( … ) { AccessReferenceMap filemap = ESAPI.httpUtilities().getSessionAttribute(“valid-files”); if ( filemap == null ) { filemap = new RandomAccessReferenceMap(); filemap.addAll(VALID_FILES); request.setAttribute(“valid-files”, filemap); } else { String fileToken = request.getParameter(“fileToken”); String filename = filemap.get(filetoken); if ( filename == null ) { throw new EnterpriseSecurityException(…); } else { String content = request.getParameter(“content”); if ( ESAPI.validator().isValidInput( “SaveFile”, content, “FileContent”, 512, true ) ) { //.. Save file } else { throw EnterpriseSecurityException(…); } class SaveFileServlet extends HttpServlet { // List of accessible files static Set VALID_FILES = new HashSet (); // add file paths to set public void doPost( … ) { AccessReferenceMap filemap = ESAPI.httpUtilities().getSessionAttribute(“valid-files”); if ( filemap == null ) { filemap = new RandomAccessReferenceMap(); filemap.addAll(VALID_FILES); request.setAttribute(“valid-files”, filemap); } else { String fileToken = request.getParameter(“fileToken”); String filename = filemap.get(filetoken); if ( filename == null ) { throw new EnterpriseSecurityException(…); } else { String content = request.getParameter(“content”); if ( ESAPI.validator().isValidInput( “SaveFile”, content, “FileContent”, 512, true ) ) { //.. Save file } else { throw EnterpriseSecurityException(…); }

OWASP Solving Real World Problems with An Enterprise Security API (ESAPI) The Solution - Continued <% AccessReferenceMap validFiles = ESAPI.httpUtilities().getRequestAttribute(“valid-files”); String fileToken = validFiles.getIndirectReference(“user-info.txt”); String existingContent = FileHelper.readFile( validFiles.getDirectReference(fileToken)); %> ”/> <% AccessReferenceMap validFiles = ESAPI.httpUtilities().getRequestAttribute(“valid-files”); String fileToken = validFiles.getIndirectReference(“user-info.txt”); String existingContent = FileHelper.readFile( validFiles.getDirectReference(fileToken)); %> ”/>

OWASP Solving Real World Problems with An Enterprise Security API (ESAPI) What is an ESAPI? Using OWASP ESAPI Case Study: Cross Site Scripting Case Study: Direct Object Reference Case Study: Yours!

OWASP Solving Real World Problems with An Enterprise Security API (ESAPI) The Problem YOU TELL ME! Describe a problem or requirement that you have encountered and let’s discuss how using an ESAPI you could resolve the issue, or meet the requirement. YOU TELL ME! Describe a problem or requirement that you have encountered and let’s discuss how using an ESAPI you could resolve the issue, or meet the requirement.

OWASP Solving Real World Problems with An Enterprise Security API (ESAPI) What is an ESAPI? Using OWASP ESAPI Case Study: Cross Site Scripting Case Study: Direct Object Reference Case Study: Yours! Additional Resources

OWASP Additional Resources OWASP Home Page o ESAPI Project Page o ESAPI-Users Mailing List o ESAPI-Dev Mailing List o Me o Follow me on Twitter o

OWASP Solving Real World Problems with An Enterprise Security API (ESAPI) What is an ESAPI? Using OWASP ESAPI Case Study: Cross Site Scripting Case Study: Direct Object Reference Case Study: Yours! Additional Resources Questions?

OWASP Questions? Comments? Feel free to stop me in the hall or speak to me after the talk with any additional questions you may have. Interested in contributing to the OWASP ESAPI project or any other OWASP Project – let me know! Cycles to Spare? We are looking for people to contribute cycles to ESAPI on documentation and helping to bring non-java languages up to date with the 2.0 API. Interested – See me!

GET IN TOUCH WITH ME Twitter twitter.com/carne