) Copyright © 2008 – Aspect Security – www.aspectsecurity.com Establishing an Enterprise Security API to Reduce Application Security Costs Jeff Williams.

Slides:



Advertisements
Similar presentations
Webgoat.
Advertisements

OWASP’s Ten Most Critical Web Application Security Vulnerabilities
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.
Creating Stronger, Safer, Web Facing Code JPL IT Security Mary Rivera June 17, 2011.
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.
OWASP. To ensure that strong simple security controls are available to every developer in every environment ESAPI Mission.
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.
CS 290C: Formal Models for Web Software Lecture 1: Introduction Instructor: Tevfik Bultan.
Solving Real-World Problems with an Enterprise Security API (ESAPI) Chris Schmidt ESAPI Project Manager ESAPI4JS Project Owner Application Security Engineer.
The 10 Most Critical Web Application Security Vulnerabilities
Designing Security In Web Applications Andrew Tomkowiak 10/8/2013 UW-Platteville Software Engineering Department
Copyright © The OWASP Foundation This work is available under the Creative Commons SA 2.5 license The OWASP Foundation OWASP BeNeLux 2010
By: Razieh Rezaei Saleh.  Security Evaluation The examination of a system to determine its degree of compliance with a stated security model, security.
10 Steps To Agile Development Without Compromising Enterprise Security
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the Creative Commons Attribution-ShareAlike.
Secure Software Development Mini Zeng University of Alabama in Huntsville 1.
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 Zed Attack Proxy Project Lead
Prevent Cross-Site Scripting (XSS) attack
Ladd Van Tol Senior Software Engineer Security on the Web Part One - Vulnerabilities.
Meet OWASP: resources you can use, today. Antonio Fontes OWASP Geneva Chapter Leader Switzerland.
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.
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.
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 This work is available under the Creative Commons SA 2.5 license The OWASP Foundation The Open Web Application.
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 ESAPI SwingSet An introduction by Fabio Cerullo.
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 © 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 This work is available under the Creative Commons SA 2.5 license The OWASP Foundation OWASP
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.
Web2.0 Secure Development Practice Bruce Xia
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.
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.
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
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.
SECURE DEVELOPMENT. SEI CERT TOP 10 SECURE CODING PRACTICES Validate input Use strict compiler settings and resolve warnings Architect and design for.
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 Application Vulnerabilities
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
TOPIC: Web Security (Part-4)
The OWASP Enterprise Security API
Ofer Shezaf, CTO, Breach Security
Establishing an Enterprise Security API to Reduce Application Security Costs Jeff Williams Aspect CEO and Founder Volunteer Chair of OWASP
Finding and Fighting the Causes of Insecure Applications
What is REST API ? A REST (Representational State Transfer) Server simply provides access to resources and the REST client accesses and presents the.
OWASP in favor of a more secure world
An Introduction to Web Application Security
Finding and Fighting the Causes of Insecure Applications
WWW安全 國立暨南國際大學 資訊管理學系 陳彥錚.
Presentation transcript:

) Copyright © 2008 – Aspect Security – Establishing an Enterprise Security API to Reduce Application Security Costs Jeff Williams Aspect CEO and Founder Volunteer Chair of OWASP

) Copyright © 2008 – Aspect Security – 2 The Problem… Java Logging BouncyCastle Spring Log4j Jasypt JCE JAAS Cryptix HDIV xml-dsig xml-enc Many More ACEGI Commons Validator Commons Validator Struts Reform Anti-XSS Stinger Standard Control Java Pattern Java URL Encoder Java URL Encoder Write Custom Code

) Copyright © 2008 – Aspect Security – 3 Vulnerability Theory Vector Vulnerability Asset Technical ImpactBusiness ImpactVulnerabilityVectorThreat Agent Vulnerability Business Impact Business Impact Function Asset Business Impact Control Missing Control A risk is a path from threat agent to business impact

) Copyright © 2008 – Aspect Security – 4 More Vulnerability Theory Every vulnerability stems from…. Missing control ) Lack of encryption ) Failure to perform access control Broken control ) Weak hash algorithm ) Fail open Ignored Control ) Failure to use encryption ) Forgot to use output encoding

) Copyright © 2008 – Aspect Security – 5 Time to Stamp Out Homegrown Controls Security controls are very difficult to get right ) Requires extensive understanding of attacks One was built with stuff “Larry” had lying around!

) Copyright © 2008 – Aspect Security – 6 Imagine an Enterprise Security API All the security controls a developer needs Standard Centralized Organized Integrated High Quality Intuitive Tested Solves the problems of missing and broken controls

) Copyright © 2008 – Aspect Security – 7 Ignored Controls Not solved but we can make it far simpler… ) Coding Guidelines ) Static Analysis ) Developer Training ) Unit Testing ) Etc…

) Copyright © 2008 – Aspect Security – 8 Enterprise Security API 8 Custom Enterprise Web Application Enterprise Security API Authenticator User AccessController AccessReferenceMap Validator Encoder HTTPUtilities Encryptor EncryptedProperties Randomizer Exception Handling Logger IntrusionDetector SecurityConfiguration Existing Enterprise Security Services/Libraries

) Copyright © 2008 – Aspect Security – 9 Validation, Encoding, and Injection Controller User Interface Business Functions Web Service Database Mainframe File System User Data Layer Etc… Set Character Set Encode For HTML Any Encoding Global Validate Any Interpreter Canonicalize Specific Validate Sanitize Canonicalize Validate

) Copyright © 2008 – Aspect Security – 10 Handling Validation, and Encoding Backend ControllerBusiness Functions User Data Layer Validator Encoder encodeForURL encodeForJavaScript encodeForVBScript encodeForDN encodeForHTML encodeForHTMLAttribute encodeForLDAP encodeForSQL encodeForXML encodeForXMLAttribute encodeForXPath isValidDirectoryPath isValidCreditCard isValidDataFromBrowser isValidListItem isValidFileContent isValidFileName isValidHTTPRequest isValidRedirectLocation isValidSafeHTML isValidPrintable safeReadLine Canonicalization Double Encoding Protection Normalization Sanitization

) Copyright © 2008 – Aspect Security – 11 Handling Authentication and Users Backend ControllerBusiness Functions User Data Layer ESAPI Access Control Logging Intrusion Detection Authentication Users Strong Passwords Random Tokens CSRF Tokens Lockout Remember Me Screen Name Roles Timeout

) Copyright © 2008 – Aspect Security – 12 Handling Access Control Controller User Interface Business Functions Web Service Database Mainframe File System User Data Layer Etc… isAuthorizedForURL isAuthorizedForFunction isAuthorizedForService isAuthorizedForData isAuthorizedForFile

) Copyright © 2008 – Aspect Security – 13 Handling Direct Object References Access Reference Map Web Service Database Mainframe File System User Etc… Report123.xls Direct ReferencesIndirect References Acct:

) Copyright © 2008 – Aspect Security – 14 Handling Sensitive Information Backend ControllerBusiness Functions User Data Layer Encrypted Properties Encryptor Encryption Digital Signatures Integrity Seals Strong GUID Random Tokens Timestamp Salted Hash Safe Config Details

) Copyright © 2008 – Aspect Security – 15 Handling Exceptions, Logging, and Detection Intrusion Detector Enterprise Security Exceptions Logger Log Intrusion Logout User Disable Account AccessControlException AuthenticationException AvailabilityException EncodingException EncryptionException ExecutorException IntegrityException IntrusionException ValidationException User Message (no detail) Log Message (w/Identity) Configurable Thresholds Responses Backend ControllerBusiness Functions User Data Layer

) Copyright © 2008 – Aspect Security – 16 Handling HTTP Backend ControllerBusiness Functions User Data Layer HTTP Utilities Add Safe Cookie No Cache Headers CSRF Tokens Safe Request Logging Encrypt State in Cookie Add Safe Header Querystring Encryption Change SessionID isSecureChannel sendSafeRedirect sendSafeForward Safe File Uploads Set Content Type Kill Cookie Hidden Field Encryption

) Copyright © 2008 – Aspect Security – 17 Handling Application Security Configuration Select crypto algorithms Select encoding algorithms Define sets of characters Define global validation rules Select logging preferences Establish intrusion detection thresholds and actions Etc… Backend ControllerBusiness Functions User Data Layer ESAPI Configuration ESAPI

) Copyright © 2008 – Aspect Security – 18 Coverage OWASP Top Ten A1. Cross Site Scripting (XSS)A2. Injection FlawsA3. Malicious File ExecutionA4. Insecure Direct Object Reference A5. Cross Site Request Forgery (CSRF) A6. Leakage and Improper Error HandlingA7. Broken Authentication and SessionsA8. Insecure Cryptographic StorageA9. Insecure Communications A10. Failure to Restrict URL Access OWASP ESAPI Validator, EncoderEncoderHTTPUtilities (Safe Upload)AccessReferenceMap, AccessController User (CSRF Token) EnterpriseSecurityException, HTTPUtilsAuthenticator, User, HTTPUtilsEncryptorHTTPUtilities (Secure Cookie, Channel) AccessController

) Copyright © 2008 – Aspect Security – 19 Frameworks and ESAPI Frameworks already have some security ) Controls are frequently missing, incomplete, or wrong ESAPI is NOT a framework ) Just a collection of security building blocks, not “lock in” ) Designed to help retrofit existing applications with security ESAPI Framework Integration Project ) We’ll share best practices for integrating ) Hopefully, framework teams like Struts adopt ESAPI

) Copyright © 2008 – Aspect Security – 20 Potential Enterprise Cost Savings Application Security Program ) AppSec Training ) Secure Development Lifecycle ) AppSec Guidance and Standards ) AppSec Inventory and Metrics Assumptions ) 1000 applications, many technologies, some outsourcing ) 300 developers, 10 training classes a year ) 50 new application projects per year ) Small application security team ) 50 reviews per year

) Copyright © 2008 – Aspect Security – 21 Small Project Costs to Handle XSS Cost AreaTypicalWith Standard XSS Control XSS Training1 days2 hours XSS Requirements2 days1 hour XSS Design (Threat Model, Arch Review) 2.5 days1 hour XSS Implementation (Build and Use Controls) 7 days16 hours XSS Verification (Scan, Code Review, Pen Test) 3 days12 hours XSS Remediation3 days4.5 hours Totals18.5 days4.5 days

) Copyright © 2008 – Aspect Security – 22 Potential Enterprise ESAPI Cost Savings Cost AreaTypicalWith ESAPI AppSec Training (semiannual)$270K$135K AppSec Requirements250 days ($150K)50 days ($30K) AppSec Design (Threat Model, Arch Review) 500 days ($300K)250 days ($150K) AppSec Implementation (Build and Use Controls) 1500 days ($900K)500 days ($300K) AppSec Verification (Scan, Code Review, Pen Test) 500 days ($300K)250 days ($150K) AppSec Remediation500 days ($300K)150 days ($90K) AppSec Standards and Guidelines 100 days ($60K)20 days ($12K) AppSec Inventory, Metrics, and Management 250 days ($150K)200 days ($120K) Totals$2.43M$1.00M

) Copyright © 2008 – Aspect Security – 23 OWASP Project Status

) Copyright © 2008 – Aspect Security – 24 Source Code and Javadoc Online Now!

) Copyright © 2008 – Aspect Security – 25 Banned Java APIs System.out.println() -> Logger.* Throwable.printStackTrace() -> Logger.* Runtime.exec() -> Executor.safeExec() Reader.readLine() -> Validator.safeReadLine() Session.getId() -> Randomizer.getRandomString() (better not to use at all) ServletRequest.getUserPrincipal() -> Authenticator.getCurrentUser() ServletRequest.isUserInRole() -> AccessController.isAuthorized*() Session.invalidate() -> Authenticator.logout() Math.Random.* -> Randomizer.* File.createTempFile() -> Randomizer.getRandomFilename() ServletResponse.setContentType() -> HTTPUtilities.setContentType() ServletResponse.sendRedirect() -> HTTPUtilities.sendSafeRedirect() RequestDispatcher.forward() -> HTTPUtilities.sendSafeForward() ServletResponse.addHeader() -> HTTPUtilities.addSafeHeader() ServletResponse.addCookie() -> HTTPUtilities.addSafeCookie() ServletRequest.isSecure() -> HTTPUtilties.isSecureChannel() Properties.* -> EncryptedProperties.* ServletContext.log() -> Logger.* java.security and javax.crypto -> Encryptor.* java.net.URLEncoder/Decoder -> Encoder.encodeForURL/decodeForURL java.sql.Statement.execute -> PreparedStatement.execute ServletResponse.encodeURL -> HTTPUtilities.safeEncodeURL (better not to use at all) ServletResponse.encodeRedirectURL -> HTTPUtilities.safeEncodeRedirectURL (better not to use at all)

) Copyright © 2008 – Aspect Security – 26 About Aspect Security Exclusive focus on Application Security since 2002 Key contributors to OWASP and authors of OWASP Top Ten Application security champions in FISMA and SSE-CMM Specialists in Application Security Millions of lines of code verified per month Java, JSP, C/C++, C#, ASP, VB.NET, ABAP, PHP, CFMX, Perl… Platforms – J2EE,.NET, SAP, Oracle, PeopleSoft, Struts, … Assurance Services for Critical Applications Proven application security initiatives Integrate key security activities into existing software teams Framework and tool tailoring for producing secure code Acceleration Services for Software, Security, and Management Teams Over 180 course offerings per year Secure coding for developers (hands-on, language-specific) Leaders and managers, testers, architects, threat modeling Application Security Education and Training Curriculum

) Copyright © 2008 – Aspect Security – 27 Questions and Answers

) Copyright © 2008 – Aspect Security – 28 Extra Slides

) Copyright © 2008 – Aspect Security – 29 Rich Data == Code 29 Tove Jani Reminder Don't forget me this weekend! Tove Jani Reminder Don't forget me this weekend! {"text": { "data": "Click Here", "size": 36, "style": "bold", "name": "text1", "hOffset": 250, "vOffset": 100, "alignment": "center", "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;" } }} {"text": { "data": "Click Here", "size": 36, "style": "bold", "name": "text1", "hOffset": 250, "vOffset": 100, "alignment": "center", "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;" } }}

) Copyright © 2008 – Aspect Security – 30 Browser Same Origin Policy investorsblog.net XHR document, cookies TAG JS

) Copyright © 2008 – Aspect Security – 31 Operating System Javascript Engine Browser == Operating System Javascript Engine Java Engine Flash Engine Quicktime Engine Acrobat Reader Acrobat Reader Silverlight, etc…

) Copyright © 2008 – Aspect Security – 32 DOM Checker IE 7.0.6… latest patches (remote)Firefox latest patches (remote)

) Copyright © 2008 – Aspect Security – 33 Network == Computer Storage Services CPU, Identities, and Access loop through top 100 banks { use local credentials to attempt access to bank if access allowed { pull list of attacks from storage attack 1: use checking service to steal $99 attack 2: post this comment to a blog... } Internet API

) Copyright © 2008 – Aspect Security – 34 Potential Enterprise ESAPI Cost Savings