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

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

David Rook. Agnitio Security code review swiss army knife. Hack in Paris, Paris

Your Turn to Hack the OWASP Top 10!

C1: Define Security Requirements

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

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

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

Securing Web Applications. Architecture Alternatives. Web Application Security Roadmap. Defense in Depth. Defense in Depth

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

SECURITY TESTING. Towards a safer web world

Solutions Business Manager Web Application Security Assessment

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

What someone said about junk hacking

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

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

Secure Programming Techniques

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

Copyright

OPEN WEB APPLICATION SECURITY PROJECT OWASP TOP 10 VULNERABILITIES

Web Application Security. Philippe Bogaerts

Bank Infrastructure - Video - 1

Students should have an understanding and a working knowledge in the following topics, or attend these courses as a pre-requisite:

Students should have an understanding and a working knowledge in the following topics, or attend these courses as a pre-requisite:

Attacks Against Websites. Tom Chothia Computer Security, Lecture 11

01/02/2014 SECURITY ASSESSMENT METHODOLOGIES SENSEPOST 2014 ALL RIGHTS RESERVED

Web Applications Penetration Testing

Application Layer Security

Symlink attacks. Do not assume that symlinks are trustworthy: Example 1

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

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

Applications Security

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

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

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

Web Application Penetration Testing

CNIT 129S: Securing Web Applications. Ch 8: Attacking Access Controls

OWASP Top 10 The Ten Most Critical Web Application Security Risks

WEB APPLICATION SCANNERS. Evaluating Past the Base Case

GOING WHERE NO WAFS HAVE GONE BEFORE

Avoiding Web Application Flaws In Embedded Devices. Jake Edge LWN.net URL for slides:

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

Protect Your Application with Secure Coding Practices. Barrie Dempster & Jason Foy JAM306 February 6, 2013

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

Sichere Software vom Java-Entwickler

Mobile Payment Application Security. Security steps to take while developing Mobile Application s. SISA Webinar.

Drone /12/2018. Threat Model. Description. Threats. Threat Source Risk Status Date Created

Slides adopted from Laurie Williams. OWASP Top Ten. John Slankas

Web Application Threats and Remediation. Terry Labach, IST Security Team

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

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

Web Application Security GVSAGE Theater

Application vulnerabilities and defences

IBM Future of Work Forum

OWASP Thailand. Proxy Caches and Web Application Security. OWASP AppSec Asia October 21, Using the Recent Google Docs 0-Day as an Example

Welcome to the OWASP TOP 10

Certified Secure Web Application Engineer

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

EPRI Software Development 2016 Guide for Testing Your Software. Software Quality Assurance (SQA)

Computer Forensics: Investigating Network Intrusions and Cyber Crime, 2nd Edition. Chapter 3 Investigating Web Attacks

INNOV-09 How to Keep Hackers Out of your Web Application

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

Finding Architectural Flaws in Android Apps Is Easy

OWASP Top David Caissy OWASP Los Angeles Chapter July 2017

Application Security Approach

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

SQL Injection. EECS Introduction to Database Management Systems


The Android security jungle: pitfalls, threats and survival tips. Scott

Web Application Vulnerabilities: OWASP Top 10 Revisited

ME?

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

Application Security. Doug Ashbaugh CISSP, CISA, CSSLP. Solving the Software Quality Puzzle

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

Aguascalientes Local Chapter. Kickoff

OWASP 5/07/09. The OWASP Foundation OWASP Static Analysis (SA) Track Session 1: Intro to Static Analysis

COMP9321 Web Application Engineering

EasyCrypt passes an independent security audit

Important Points to Note

Ch 1: The Mobile Risk Ecosystem. CNIT 128: Hacking Mobile Devices. Updated

MBFuzzer - MITM Fuzzing for Mobile Applications

About the OWASP Top 10

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

Certified Secure Web Application Security Test Checklist

SECURE CODING PART 1 MAGDA LILIA CHELLY ENTREPRENEUR CISO ADVISOR CYBERFEMINIST PEERLYST BRAND AMBASSADOR TOP 50 CYBER CYBER

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.

Advanced Systems Security: Ordinary Operating Systems

Web Application Security. OWASP 11 th August, The OWASP Foundation Basic SQL injection Basic Click Jacking

Backend IV: Authentication, Authorization and Sanitization. Tuesday, January 13, 15

Top 10 Web Application Vulnerabilities

Information Security. Gabriel Lawrence Director, IT Security UCSD

PHP is a scripting language that can be embedded into HTML. Estimated 20 million PHP websites as of 2007

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

Attacking the Application OWASP. The OWASP Foundation. Dave Ferguson, CISSP Security Consultant FishNet Security.

Engineering Your Software For Attack

HP 2012 Cyber Security Risk Report Overview

Development*Process*for*Secure* So2ware

TIBCO Cloud Integration Security Overview

Advanced Web Technology 10) XSS, CSRF and SQL Injection

F5 Application Security. Radovan Gibala Field Systems Engineer

Transcription:

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

About Me Steven van der Baan - Dutch - 7Safe, part of PA Consulting Group - Developer - Pentester - Consultant - CISSP, OSCP

It's amazing how many drivers think the brakes are for slowing the car down Brakes allow you to travel faster because you have the power to stop.

Security Principles

Who....with what role....what rights...may do.. in which process?

Principles Input Validation Output Encoding Error Handling Authentication and Authorisation Session Management Specific vulnerabilities for each principle OWASP top 10 WhiteHatSec top 10 Sans top 25 Cross Site Scripting, Cross Site Scripting, SQL Injection Flaws, Malicious Injection, Content Spoofing File Execution Improper Input Validation, Failure to Preserve SQL Query Structure, Failure to Preserve Web Page Structure, Failure to Preserve OS Command Structure, Failure to Constrain Operations within the Bounds of a Memory Buffer, Failure to Control Generation of Code, Client-Side Enforcement of Server- Side Security Cross Site Scripting Cross Site Scripting Improper Encoding or Escaping of Output, Failure to Preserve Web Page Structure Information Leakage and Information Leakage Error Message Information Leak Improper Error Handling Broken Authentication Insufficient Authorisation, and Session Management Insufficient Authentication, Abuse of Functionality Broken Authentication Cross Site Request Forgery and Session management, Cross Site Request forgery Secure Insecure Communications Communications Secure Resource Access Secure Storage Insecure Direct Object Reference, Failure to Restrict URL Access Insecure Cryptographic Storage Predictable Resource Location Impropert Access Control, Hard-Coded Password, Insecure Permission Assignment for Critical Resource, Execution with Unnecessary Privileges Cross Site Request Forgery, Use of Insufficient Random Values Use of a Broken or Risky Cryptographic Algorithm, Cleartext Transmission of Sensitive Information, Use of Insufficiently Random Values External Control of File Name or Path, Untrusted Search Path Use of a Broken or Risky Cryptographic Algorithm, Cleartext Transmission of Sensitive Information, External Control of Critical State Data

Security principles Input Validation Output Encoding Error Handling Authentication and Authorisation Session Management Secure Communications Secure Resource Access Secure Storage

Input validation

Input Validation

Input validation Identify and define the data your application must accept Create regex s to validate EACH datatype (content and size) For example, a creditcard data type: \d{12,16}$ Use whitelisting where possible Blacklist approach harder and potential less secure Blacklist example, replace single quotes: S.replaceAll(Pattern.quote( )); Matcher.quoteReplacement( );

Output Encoding

Output Encoding

Output Encoding Identify and define the data your application must output Understand where (i.e. in an URL) your data should end up Choose the correct output encoding for the data s destination Proper encoding means this attack: www.example.com/home.html?day=<script>alert(document.c ookie)</script> Becomes day=%3cscript%3ealert%28document.cookie%29%3c/script% 3E

Error Handling

Error Handling

Error handling Even the best apps will crash at some point, be prepared! Crashed/errors can help an attacker if you don t handle them Handle error conditions securely, sanitize the message sent No error handling = information leakage Microsoft OLE DB Provider for ODBC Driver(0x80040E14) [Microsoft][ODBC SQL Server Driver] [SQL Server]Invalid column name /example/login.asp, line 10

Authentication & Authorization

Authentication and Authorisation

Authentication and Authorisation Even simple apps often have a need to authenticate users Often at least two levels of authorisation Need to prevent horizontal and vertical privilege escalation Implement strong passwords and management system Ensure A+A is secure, not a false sense of security (CAPTCHA?) Don t rely on fields that are easily spoofed (refer(r)er field)

Session Management

Session Management

Session Management Used to manage authenticated users, no need to re-auth You need to make shure your sessionid s have sufficient entropy SessionID s must not be predictable or reusable Never build your own session management, it will fail Protect SessionID s when in transit (i.e. SSL!) Issue a new value for sensitive actions (i.e. funds transfer)

Secure Communications

Secure Communications

Secure Communications Protect data (i.e. CC no, passwords, sessionid s) in transit As with all crypto, don t create your own Don t use broken protection mechanisms (i.e. SSLv2) Don t just use SSL/TLS for logon pages, protect the session! Try to avoid mixing secure and insecure traffic on a page

Secure Resource Access

Secure Resource Access

Secure Resource Access Obscurity!= security, don t try to hide sensitive resources Understand the users flow through an app, cover weak points T-Mobile didn t do the above, Paris Hiltons account hacked

Secure Storage

Secure Storage

Secure Storage Protect data (i.e. CC no, passwords, sessionid s) when stored As with all crypto, DON T create your own Don t use broken protection mechanisms (i.e. DES) Don t store data in places where you can t confidently secure it Strong protection mechamisms, how strong should it be?