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

Reduce Security Risk in Your Development
DESIGNING A PUBLIC KEY INFRASTRUCTURE
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.
(Remote Access Security) AAA. 2 Authentication User named "flannery" dials into an access server that is configured with CHAP. The access server will.
The 10 Most Critical Web Application Security Vulnerabilities
Designing Security In Web Applications Andrew Tomkowiak 10/8/2013 UW-Platteville Software Engineering Department
Web Application Vulnerabilities Checklist. EC-Council Parameter Checklist  URL request  URL encoding  Query string  Header  Cookie  Form field 
Martin Kruliš by Martin Kruliš (v1.0)1.
NUAGA May 22,  IT Specialist, Utah Department of Technology Services (DTS)  Assigned to Department of Alcoholic Beverage Control  PCI Professional.
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
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 3 Administration of Users.
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.
A Security Review Process for Existing Software Applications
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.
1 In the good old days... Years ago… the WWW was made up of (mostly) static documents. –Each URL corresponded to a single file stored on some hard disk.
OSI and TCP/IP Models And Some Vulnerabilities AfNOG th May 2011 – 10 th June 2011 Tanzania By Marcus K. G. Adomey.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Top Five Web Application Vulnerabilities Vebjørn Moen Selmersenteret/NoWires.org Norsk Kryptoseminar Trondheim
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.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
SEC835 Runtime authentication Secure session management Secure use of cryptomaterials.
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.
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.
Configuring and Troubleshooting Identity and Access Solutions with Windows Server® 2008 Active Directory®
Security Issues with PHP  PHP installation  PHP programming Willa Zhu & Eugene Burger.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
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.
Design Principles and Common Security Related Programming Problems
Copyright © The OWASP Foundation This work is available under the Creative Commons SA 2.5 license The OWASP Foundation OWASP Denver February 2012.
Information Security Measures Confidentiality IntegrityAccessibility Information cannot be available or disclosed to unauthorized persons, entities or.
PHP Security Ryan Dunn Jason Pack. Outline PHP Overview PHP Overview Common Security Issues Common Security Issues Advanced Security Issues Advanced Security.
Writing secure Flex applications  MXML tags with security restrictions  Disabling viewSourceURL  Remove sensitive information from SWF files  Input.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
ASP.NET 2.0 Security Alex Mackman CM Group Ltd
ASHRAY PATEL Protection Mechanisms. Roadmap Access Control Four access control processes Managing access control Firewalls Scanning and Analysis tools.
Chapter 29: Program Security Dr. Wayne Summers Department of Computer Science Columbus State University
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
19 Copyright © 2008, Oracle. All rights reserved. Security.
ArcGIS for Server Security: Advanced
Building Secure ColdFusion Applications
Web Application Vulnerabilities
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
Chapter 7: Identifying Advanced Attacks
TOPIC: Web Security (Part-4)
World Wide Web policy.
Secure Software Confidentiality Integrity Data Security Authentication
Cryptography and Network Security
Server Concepts Dr. Charles W. Kann.
A Security Review Process for Existing Software Applications
Security mechanisms and vulnerabilities in .NET
OWASP Secure Coding Practices Quick Reference Guide
Lesson 16-Windows NT Security Issues
Chapter 29: Program Security
BACHELOR’S THESIS DEFENSE
BACHELOR’S THESIS DEFENSE
WWW安全 國立暨南國際大學 資訊管理學系 陳彥錚.
PHP Forms and Databases.
Test 3 review FTP & Cybersecurity
Preventing Privilege Escalation
Fast-Track UiPath Developer Module 10: Sensitive Data Handling
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 OWASP Secure Coding Practices Quick Reference Guide Miguel Almeida December, 2010

OWASP 2 About Me  Independent Author and Consultant  Used to work on security for KPMG and Deloitte  Been working on security since 2000  Main focus on Financial Institutions Security  More info at

OWASP 3 Guide Overview  Technology agnostic coding practices  What to do, not how to do it  Compact, but comprehensive checklist format  Focuses on secure coding requirements, rather then on vulnerabilities and exploits  Includes a cross referenced glossary to get developers and security folks talking the same language

OWASP 4 Checklist Sections  Input Validation  Output Encoding  Authentication and Password Management  Session Management  Access Control  Cryptographic Practices  Error Handling and Logging  Data Protection  Communication Security  System Configuration  Database Security  File Management  Memory Management  General Coding Practices - Only 17 pages long

OWASP 5 Input Validation  Conduct all data validation on a trusted system (e.g.,The Server)  Validate all client provided data before processing, including all parameters, URLs and HTTP header content (e.g. Cookie names and values). Be sure to include automated post backs from JavaScript, Flash or other embedded code  There should be a centralized input validation routine for the application ...

OWASP 6 Output Encoding  Conduct all encoding on a trusted system (e.g.,The Server)  Encode all characters unless they are known to be safe for the intended interpreter  Contextually sanitize all output of un-trusted data to queries for SQL,XML, and LDAP ...

OWASP 7 Authentication and Password Management  Require authentication for all pages and resources, except those specifically intended to be public  Establish and utilize standard, tested, authentication services whenever possible  Enforce password complexity requirements established by policy or regulation. Authentication credentials should be sufficient to withstand attacks that are typical of the threats in the deployed environment. (e.g., requiring the use of alphabetic as well as numeric and/or special characters) ...

OWASP 8 Session Management  Use the server or framework’s session management controls.The application should only recognize these session identifiers as valid  Session identifier creation must always be done on a trusted system (e.g.,The Server)  Set the "secure" attribute for cookies transmitted over an TLS connection ...

OWASP 9 Access Control  Enforce authorization controls on every request, including those made by server side scripts, "includes" and requests from rich client- side technologies like AJAX and Flash  Use the "referer" header as a supplemental check only, it should never be the sole authorization check, as it is can be spoofed  Implement account auditing and enforce the disabling of unused accounts ...

OWASP 10 Cryptographic Practices  All random numbers, random filenames, random GUIDs, and random strings should be generated using the cryptographic module’s approved random number generator when these random values are intended to be un-guessable  Protect master secrets from unauthorized access  Establish and utilize a policy and process for how cryptographic keys will be managed ...

OWASP 11 Error Handling and Logging  Do not disclose sensitive information in error responses, including system details, session identifiers or account information  Logging controls should support both success and failure of specified security events  Do not store sensitive information in logs, including unnecessary system details, session identifiers or passwords ...

OWASP 12 Data Protection  Implement least privilege, restrict users to only the functionality, data and system information that is required to perform their tasks  Encrypt highly sensitive stored information, like authentication verification data, even on the server side. Always use well vetted algorithms, see "Cryptographic Practices" for additional guidance  Disable client side caching on pages containing sensitive information. Cache-Control:no-store, may be used in conjunction with the HTTP header control "Pragma: no-cache", which is less effective, but is HTTP/1.0 backward compatible ...

OWASP 13 Communication Security  Implement encryption for the transmission of all sensitive information  TLS certificates should be valid and have the correct domain name, not be expired, and be installed with intermediate certificates when required  Filter parameters containing sensitive information from the HTTP referer, when linking to external sites ...

OWASP 14 System Configuration  Ensure servers, frameworks and system components have all patches issued for the version in use  Remove all unnecessary functionality and files  Disable unnecessary HTTP methods, such as WebDAV extensions. If an extended HTTP method that supports file handling is required, utilize a well-vetted authentication mechanism ...

OWASP 15 Database Security  Utilize input validation and output encoding and be sure to address metacharacters. If these fail,do not run the database command  Connection strings should not be hardcoded within the application. Connection strings should be stored in a separate configuration file on a trusted system and they should be encrypted.  Use stored procedures to abstract data access and allow for the removal of permissions to the base tables in the database ...

OWASP 16 File Management  Validate uploaded files are the expected type by checking fileheaders. Checking for filetype by extension alone is not sufficient  Ensure application files and resources are read-only  Scan user uploaded files for viruses and malware ...

OWASP 17 Memory Management  Check buffer boundaries if calling the function in a loop and make sure there is no danger of writing past the allocated space  Truncate all input strings to a reasonable length before passing them to the copy and concatenation functions  Use non-executable stacks when available ...

OWASP 18 General Coding Practices  Explicitly initialize all your variables and other datastores, either during declaration or just before the first usage  In cases where the application must run with elevated privileges, raise privileges as late as possible, and drop them as soon as possible  Review all secondary applications, third party code and libraries to determine business necessity and validate safe functionality, as these can introduce new vulnerabilities ...

OWASP 19 Using the guide  Scenario #1: Developing Guidance Documents Coding Practices General Security Policies Application Security Procedures Application Security Coding Standards Guiding PrinciplesWhat to doHow to do it

OWASP 20 Using the guide continued  Scenario #2: Support Secure Development Lifecycle Application Security Requirements Secure Development Processes Standardized Libraries Standard Guidance for non-Library Solutions Review Solutions Test Solution Implementation What to doHow you should do itWhat you didDid it work Coding Practices

OWASP 21 RFP Best Software Ever Using the guide continued  Scenario #3: Contracted Development  Identify security requirements to be added to outsourced software development projects.  Include them in the RFP and Contract Contract Best Software Ever I need cool Software We can build anything How do I make it work CustomerSalesmanProgrammer Coding Practices

OWASP 22 A Secure Development Framework  Implement a secure software development lifecycle  OWASP CLASP Project  Establish secure coding standards  OWASP Development Guide Project  Build a re-usable object library  OWASP Enterprise Security API (ESAPI) Project  Verify the effectiveness of security controls  OWASP Application Security Verification Standard (ASVS) Project)  Establish secure outsourced development practices including defining security requirements and verification methodologies in both the RFP and contract  OWASP Legal Project Guidance on implementing a secure software development framework is beyond the scope of the Quick reference Guide, however the following OWASP projects can help:

OWASP 23 Questions