About the OWASP Top 10

Similar documents
OWASP Top Dave Wichers OWASP Top 10 Project Lead OWASP Board Member COO/Cofounder, Aspect Security

OWASP Top 10 Risks. Many thanks to Dave Wichers & OWASP

OWASP Top The Top 10 Most Critical Web Application Security Risks. The OWASP Foundation

CIT 380: Securing Computer Systems. Web Security II

Penetration Testing following OWASP. Boyan Yanchev Chief Technology Ofcer Peter Dimkov IS Consultant

Vulnerability Scanner Tools. Security intelligence

Web Security. New Browser Security Technologies

OWASP Top 10 The Ten Most Critical Web Application Security Risks

Copyright

C1: Define Security Requirements

Web Application Vulnerabilities: OWASP Top 10 Revisited

Welcome to the OWASP TOP 10

OWASP Top 10. Copyright 2017 Ergon Informatik AG 2/13

W e b A p p l i c a t i o n S e c u r i t y : T h e D e v i l i s i n t h e D e t a i l s

OWASP TOP Release. Andy Willingham June 12, 2018 OWASP Cincinnati

Attacks Against Websites 3 The OWASP Top 10. Tom Chothia Computer Security, Lecture 14

Applications Security

Sichere Software vom Java-Entwickler

CSCD 303 Essential Computer Security Fall 2017

Application Security through a Hacker s Eyes James Walden Northern Kentucky University

Your Turn to Hack the OWASP Top 10!

Provide you with a quick introduction to web application security Increase you awareness and knowledge of security in general Show you that any

SOLUTION BRIEF CA API MANAGEMENT. Enable and Protect Your Web Applications From OWASP Top Ten With CA API Management

Defend Your Web Applications Against the OWASP Top 10 Security Risks. Speaker Name, Job Title

Hacking Web Sites OWASP Top 10

Client Side Injection on Web Applications

Web Application Security. Philippe Bogaerts

1 About Web Security. What is application security? So what can happen? see [?]

Exploiting and Defending: Common Web Application Vulnerabilities

Web Security, Summer Term 2012

Web Security, Summer Term 2012

CSWAE Certified Secure Web Application Engineer

Application Security for the Masses. OWASP Greek Chapter Meeting 16/3/2011. The OWASP Foundation

Evaluating the Security Risks of Static vs. Dynamic Websites

Solutions Business Manager Web Application Security Assessment

OWASP Top David Caissy OWASP Los Angeles Chapter July 2017

CSCD 303 Essential Computer Security Fall 2018


Web insecurity Security strategies General security Listing of server-side risks Language specific security. Web Security.

Security and Privacy. SWE 432, Fall 2016 Design and Implementation of Software for the Web

epldt Web Builder Security March 2017

Kenna Platform Security. A technical overview of the comprehensive security measures Kenna uses to protect your data

OPEN WEB APPLICATION SECURITY PROJECT OWASP TOP 10 VULNERABILITIES

Attacks Against Websites. Tom Chothia Computer Security, Lecture 11

GOING WHERE NO WAFS HAVE GONE BEFORE

Application Layer Security

Computer Security 3e. Dieter Gollmann. Chapter 18: 1

Bank Infrastructure - Video - 1

OWASP TOP OWASP TOP

Secure Coding, some simple steps help. OWASP EU Tour 2013

Certified Secure Web Application Engineer

Aguascalientes Local Chapter. Kickoff

SECURITY TESTING. Towards a safer web world

EasyCrypt passes an independent security audit

Web Application Penetration Testing

Application. Security. on line training. Academy. by Appsec Labs

(System) Integrity attacks System Abuse, Malicious File upload, SQL Injection

ME?

Kishin Fatnani. Founder & Director K-Secure. Workshop : Application Security: Latest Trends by Cert-In, 30 th Jan, 2009

Web Security: Vulnerabilities & Attacks

Development Security Guide Oracle Banking Credit Facilities Process Management Release [July] [2018]

Application vulnerabilities and defences

A4: Insecure Direct Object References

Mobile Malfeasance. Exploring Dangerous Mobile Code. Jason Haddix, Director of Penetration Testing

Web Application Security

Development Security Guide Oracle Banking Virtual Account Management Release July 2018

Andrew Muller, Canberra Managing Director, Ionize, Canberra The challenges of Security Testing. Security Testing. Taming the Wild West

Application Security Introduction. Tara Gu IBM Product Security Incident Response Team

CSCE 813 Internet Security Case Study II: XSS

RKN 2015 Application Layer Short Summary

Ethical Hacking and Countermeasures: Web Applications, Second Edition. Chapter 3 Web Application Vulnerabilities

Vulnerabilities in online banking applications

Integrity attacks (from data to code): Cross-site Scripting - XSS

Finding Vulnerabilities in Web Applications

This slide shows the OWASP Top 10 Web Application Security Risks of 2017, which is a list of the currently most dangerous web vulnerabilities in

Domino Web Server Security

CSE361 Web Security. Attacks against the server-side of web applications. Nick Nikiforakis

INF3700 Informasjonsteknologi og samfunn. Application Security. Audun Jøsang University of Oslo Spring 2015

Excerpts of Web Application Security focusing on Data Validation. adapted for F.I.S.T. 2004, Frankfurt

VULNERABILITIES IN 2017 CODE ANALYSIS WEB APPLICATION AUTOMATED

Web Application Whitepaper

Information Security. Gabriel Lawrence Director, IT Security UCSD

Featuring. and. Göteborg. Ulf Larson Thursday, October 24, 13

OWASP TOP 10. By: Ilia

"Charting the Course to Your Success!" Securing.Net Web Applications Lifecycle Course Summary

Using the Cisco ACE Application Control Engine Application Switches with the Cisco ACE XML Gateway

TIBCO Cloud Integration Security Overview

Why bother? Causes of data breaches OWASP. Top ten attacks. Now what? Do it yourself Questions?

Advanced Web Technology 10) XSS, CSRF and SQL Injection

GUI based and very easy to use, no security expertise required. Reporting in both HTML and RTF formats - Click here to view the sample report.

SAP Security. BIZEC APP/11 Version 2.0 BIZEC TEC/11 Version 2.0

Security Best Practices. For DNN Websites

Mitigating Security Breaches in Retail Applications WHITE PAPER

COMP9321 Web Application Engineering

Web Application & Web Server Vulnerabilities Assessment Pankaj Sharma

16th Annual Karnataka Conference

Continuously Discover and Eliminate Security Risk in Production Apps

Chrome Extension Security Architecture

DEFENSIVE PROGRAMMING. Lecture for EDA 263 Magnus Almgren Department of Computer Science and Engineering Chalmers University of Technology

THREAT MODELING IN SOCIAL NETWORKS. Molulaqhooa Maoyi Rotondwa Ratshidaho Sanele Macanda

Transcription:

OWASP Top-10 2017 Dave Wichers Previous OWASP Top 10 Project Lead (2003 thru 2017) Former OWASP Board Member (2003 thru 2013) CoFounder and COO, Aspect Security which is now EY

About the OWASP Top 10 2

OWASP Top Ten (2017 Edition) 3

What Didn t Change 4

OWASP Top 10 Risk Rating Methodology Threat Agent? 3 2 1 Attack Vector Weakness Prevalence Weakness Detectability Technical Impact Easy Widespread Easy Severe Average Common Average Moderate Difficult Uncommon Difficult Minor 3 2 3 3 2.66 * 3 Injection Example Business Impact 8.00 weighted risk rating? 5

What s Changed? 6

Mapping from 2013 to 2017 Top 10

2017-A1 Injection 8

ATTACK Custom Code Billing Directories DB Table "SELECT * FROM Account Summary Account: accounts WHERE SKU: acct= OR Acct:5424-6066-2134-4334 Acct:4128-7574-3921-0192 1=1-- " 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 App Server 3. Application forwards attack to the database in a SQL query Web Server Hardened OS Firewall Firewall Network Layer Human Resrcs Web Services HTTP SQL response query HTTP request APPLICATION Legacy Systems Databases Communicaton Knowledge Mgmt E-Commerce Bus. Functons Administraton Transactons Accounts Finance Applicaton Layer SQL Injection Illustrated 4. Database runs query containing attack and sends encrypted results back to application 5. Application decrypts data as normal and sends results to the user 9

A1 Avoiding Injection Flaws 10

2017-A2 Broken Authentication 11

www.boi.com?jsessionid=9fa1db9ea... Site uses URL rewriting (i.e., put session in URL) 3 2 Hacker uses JSESSIONID and takes over victim s account Custom Code User clicks on a link to http://www.hacker.com in a forum Hacker checks referrer logs on www.hacker.com and finds user s JSESSIONID 5 Communication Knowledge Mgmt E-Commerce Bus. Functions User sends credentials Accounts Finance 1 Administration Transactions Broken Authentication Illustrated 4

A2 Avoiding Broken Authentication 13

2017-A3 Sensitive Data Exposure

1 Victim enters credit card number in form Accounts Finance Administration Transactions Communication Knowledge Mgmt E-Commerce Bus. Functions Insecure Cryptographic Storage Illustrated Custom Code 4 Log files Malicious insider steals 4 million credit card numbers Logs are accessible to all members of IT staff for debugging purposes Error handler logs CC details because merchant gateway is unavailable 3 2

Avoiding Insecure Cryptographic Storage Verify your architecture Protect with appropriate mechanisms File encryption, database encryption, data element encryption https://www.owasp.org/index.php/password_storage_cheat_sheet Use the mechanisms correctly Identify all sensitive data Identify all the places that data is stored Ensure threat model accounts for possible attacks Use encryption to counter the threats, don t just encrypt the data Use standard strong algorithms Generate, distribute, and protect keys properly Be prepared for key change Verify the implementation A standard strong algorithm is used, and it s the proper algorithm for this situation All keys, certificates, and passwords are properly stored and protected Safe key distribution and an effective plan for key change are in place

Insufficient Transport Layer Protection Illustrated Business Partners External Victim Custom Code 1 External attacker steals credentials and data off network External Attacker Backend Systems 2 Employees Internal attacker steals credentials and data from internal network Internal Attacker

Avoiding Insufficient Transport Layer Protection Protect with appropriate mechanisms Use TLS on all connections with sensitive data Use HSTS (HTTP Strict Transport Security) Use key pinning Individually encrypt messages before transmission E.g., XML-Encryption Sign messages before transmission E.g., XML-Signature Use the mechanisms correctly Use standard strong algorithms (disable old SSL algorithms) Manage keys/certificates properly Verify SSL certificates before using them Use proven mechanisms when sufficient E.g., SSL vs. XML-Encryption https://www.owasp.org/index.php/transport_layer_protection_cheat_sheet https://www.owasp.org/index.php/http_strict_transport_security_cheat_sheet

2017-A4 XML external Entity (XXE) Attack 19

XXE Attack Examples <?xml version="1.0" encoding="utf-8" standalone="no"?> <!DOCTYPE meh [<!ENTITY xxefun SYSTEM "file:///etc/passwd"> ]>> <somestuff> <ishere> If This XML document is received from an external Hi! &xxefun; provider, </ishere> evaluated, then </somestuff> returned to the user The contents of /etc/passwd are returned to the attacker <?xml version="1.0"?> <!DOCTYPE kaboom [ <!ENTITY a "aaaaaaaaaaaaaaaaaa..."> ]> <kaboom>&a;&a;&a;&a;&a;&a;&a;&a;&a;...</kaboom> What happens this time?

XXE Defense Examples Defense 1: Disable Entity inclusion. The XML Validator will throw a Fatal Exception if such an entity is included. Xerces Example: DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setnamespaceaware(true); try { dbf.setfeature("http://apache.org/xml/features/disallow-doctype-decl", true); // Use DBF here to parse XML (safely) } catch (ParserConfigurationException e) { //handle error } Defense 2: If entities need to be allowed, disable expansion of external entities. Xerces Example: DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setnamespaceaware(true); try { dbf.setfeature("http://xml.org/sax/features/external-general-entities", false); dbf.setfeature("http://xml.org/sax/features/external-parameter-entities", false); // Use DBF here } catch (ParserConfigurationException e) { //handle error }

A4 Avoiding XXE 22

2017-A5 Broken Access Control

Missing Function Level Access Control Illustrated /p /h ts:t A s g c o e tu n tc o /m n u e b w s ra n k.iw /o n w l. Attacker notices the URL indicates his role /user/getaccounts He modifies it to another directory (role) /admin/getaccounts, or /manager/getaccounts Attacker views more accounts than just their own

Insecure Direct Object References Illustrated Attacker notices his acct https://www.onlinebank.com/user?acct=6065 parameter is 6065?acct=6065 He modifies it to a nearby number?acct=6066 Attacker views the victim s account information 25

Avoiding Broken Access Control For a function, a site needs to do at least these things Restrict access to authenticated users (if not public) Enforce any user or role based permissions (if private) For data, a site needs to verify User has required role to see that data, or User has been granted access (i.e., is data owner, is in associated group, etc.) User has the TYPE of access being used (Read, Write, Delete, etc.) Verify your architecture Use a simple, positive model at every layer Be sure you actually have a mechanism at every layer Verify the implementation Forget automated analysis approaches Verify each URL (plus any parameters) referencing a function or data is protected by An external filter, like Java EE web.xml or a commercial product

2017-A6 Security Misconfiguration

Communicaton Knowledge Mgmt E-Commerce Bus. Functons Administraton Transactons Accounts Finance Security Misconfiguration Illustrated Database Custom Code App Configuraton Framework Development App Server QA Servers Web Server Insider Hardened OS Test Servers Source Control

Avoiding Security Misconfiguration Verify your system s configuration management Secure configuration hardening guideline Automation is REALLY USEFUL here Must cover entire platform and application Analyze security effects of changes Can you dump the application configuration Build reporting into your process If you can t verify it, it isn t secure Verify the implementation Scanning finds generic configuration and missing patch problems

2017-A7 Cross-Site Scripting (XSS) 30

Cross-Site Scripting Illustrated Attacker sets the trap update my profile Victim views page sees attacker profile Communicaton Knowledge Mgmt E-Commerce Bus. Functons 2 Administraton Transactons Attacker enters a malicious script into a web page that stores the data on the server Application with stored XSS vulnerability Accounts Finance 1 Custom Code Script runs inside victim s browser with full access to the DOM and cookies 3 Script silently sends attacker Victim s session cookie 31

Avoiding XSS Flaws Recommendations Eliminate Flaw Don t include user supplied input in the output page Defend Against the Flaw Use Content Security Policy (CSP) Primary Recommendation: Output encode all user supplied input (Use OWASP s Java Encoders to output encode) https://www.owasp.org/index.php/owasp_java_encoder_project 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: https://www.owasp.org/index.php/antisamy References For how to output encode properly, read the https://www.owasp.org/index.php/xss_(cross Site Scripting) Prevention Cheat Sheet (AntSamy) 32

Safe Escaping Schemes in Various HTML Execution Contexts #1: ( &, <, >, " ) &entity; ( ', / ) &#xhh; ESAPI: encodeforhtml() 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'> ) JavaScript Data (e.g., <script> somefunction( DATA )</script> ) CSS Property Values #3: All non-alphanumeric < 256 \xhh ESAPI: encodeforjavascript() #4: All non-alphanumeric < 256 \HH ESAPI: encodeforcss() (e.g.,.pdiv a:hover {color: red; text-decoration: underline} ) URI Attribute Values #5: All non-alphanumeric < 256 %HH ESAPI: encodeforurl() (e.g., <a href=" http://site.com?search=data" ) ALL other contexts CANNOT include Untrusted Data Recommendation: Only allow #1 and #2 and disallow all others See: www.owasp.org/index.php/xss_(cross_site_scripting)_prevention_cheat_sheet https://www.owasp.org/index.php/dom_based_xss_prevention_cheat_sheet 33

2017-A8 Insecure Deserialization 34

Deserialization Examples CVE-2017-5954 serialize-to-js package 0.5.0 for Node.js. Untrusted data passed into the deserialize() functon can be exploited to achieve arbitrary code executon by passing a JavaScript Object with an Immediately Invoked Functon Expression (IIFE). CVE-2017-9424 IdeaBlade Breeze Breeze.Server.NET before 1.6.5 allows remote attackers to execute arbitrary code, related to use of TypeNameHandling in JSON deserializaton. CVE-2017-9805 REST Plugin in Struts 2.1.2 thru 2.3.33 and 2.5.x before 2.5.13 uses an XStreamHandler with an instance of XStream for deserializaton without any type filtering, which can lead to Remote Code Executon when deserializing XML payloads. CVE-2017-1000034 Akka versions <=2.4.16 and 2.5-M1 are vulnerable to a java deserializaton attack in its Remotng component resultng in remote code executon

Avoiding Deserialization Vulnerabilities 36

2017-A9 Using Known Vulnerable Components 37

What Can You Do to Avoid This? 38

Automation Example for Java Use Maven Versions Plugin Output from the Maven Versions Plugin Automated Analysis of Libraries Status against Central repository Most out of Date! Details Developer Needs This can automatically be run EVERY TIME software is built!! 39

2017-A10 Insufficient Logging & Monitoring

Providing Sufficient Logging & Monitoring 41

Summary: How do you address these problems? Develop Secure Code Follow the best practices in OWASP s Guide to Building Secure Web Applications https://www.owasp.org/index.php/guide And the cheat sheets: https://www.owasp.org/index.php/cheat_sheets Use OWASP s Application Security Verification Standard as a guide to what an application needs to be secure https://www.owasp.org/index.php/asvs Use standard security components that are a fit for your organization Use OWASP s ESAPI to help identify what standard security components you are likely to need https://www.owasp.org/index.php/esapi Review Your Applications Have an expert team review your applications Review your applications yourselves following OWASP Guidelines OWASP Code Review Guide: https://www.owasp.org/index.php/code_review_guide OWASP Testing Guide: https://www.owasp.org/index.php/testing_guide

Thank you OWASP Top-10 2017