Testing Guide.Docx
Total Page:16
File Type:pdf, Size:1020Kb
Testing Guide 2013 ALPHA Testing Guide 2013 ALPHA OWASP Foundation OWASP ISBN 978-1-304-61314-1 90000 Foundation 9 781304 613141 OWASP Testing Guide 2013: ALPHA 1 2 OWASP Testing Guide 2013: ALPHA OWASP Foundation 2013 3 4 1. FRONTISPIECE 1.1 Welcome to the OWASP Testing Guide 4.0 “Open and collaborative knowledge: that’s the OWASP way.” -- Matteo Meucci OWASP thanks the many authors, reviewers, and editors for their hard work in bringing this guide to where it is today. If you have any comments or suggestions on the Testing Guide, please e-mail the Testing Guide mail list: http://lists.owasp.org/mailman/listinfo/owasp-testing Copyright and License Copyright (c) 2008 The OWASP Foundation. This document is released under the Creative Commons 2.5 License. Please read and understand the license and copyright conditions. 5 Revision History The Testing guide originated in 2003 with Dan Cuthbert as one of the original editors. It was handed over to Eoin Keary in 2005 and transformed into a wiki. Matteo Meucci has taken on the Testing guide and is now the lead of the OWASP Testing Guide Project. 15th September, 2008 "OWASP Testing Guide", Version 3.0 December 25, 2006 "OWASP Testing Guide", Version 2.0 July 14, 2004 "OWASP Web Application Penetration Checklist", Version 1.1 December 2004 "The OWASP Testing Guide", Version 1.0 Editors Matteo Meucci: OWASP Testing Guide Lead since 2007. Eoin Keary: OWASP Testing Guide 2005-2007 Lead. Daniel Cuthbert: OWASP Testing Guide 2003-2005 Lead Trademarks ● Java, Java Web Server, and JSP are registered trademarks of Sun Microsystems, Inc. ● Merriam-Webster is a trademark of Merriam-Webster, Inc. ● Microsoft is a registered trademark of Microsoft Corporation. ● Octave is a service mark of Carnegie Mellon University. ● VeriSign and Thawte are registered trademarks of VeriSign, Inc. ● Visa is a registered trademark of VISA USA. 6 ● OWASP is a registered trademark of the OWASP Foundation All other products and company names may be trademarks of their respective owners. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark. 1.2 About the Open Web Application Security Project The OWASP Foundation came online on December 1st 2001 it was established as a not- for-profit charitable organization in the United States on April 21, 2004 to ensure the ongoing availability and support for our work at OWASP. OWASP is an international organization and the OWASP Foundation supports OWASP efforts around the world. OWASP is an open community dedicated to enabling organizations to conceive, develop, acquire, operate, and maintain applications that can be trusted. All of the OWASP tools, documents, forums, and chapters are free and open to anyone interested in improving application security. We advocate approaching application security as a people, process, and technology problem because the most effective approaches to application security include improvements in all of these areas. We can be found at www.owasp.org. OWASP is a new kind of organization. Our freedom from commercial pressures allows us to provide unbiased, practical, cost-effective information about application security. OWASP is not affiliated with any technology company, although we support the informed use of commercial security technology. Similar to many open-source software projects, OWASP produces many types of materials in a collaborative, open way. The OWASP Foundation is a not- for-profit entity that ensures the project's long-term success. Core Values OPEN Everything at OWASP is radically transparent from our finances to our code. INNOVATION OWASP encourages and supports innovation/experiments for solutions to software security challenges. GLOBAL Anyone around the world is encouraged to participate in the OWASP community. INTEGRITY OWASP is an honest and truthful, vendor neutral, global community. Core Purpose Be the thriving global community that drives visibility and evolution in the safety and security of 7 the world’s software. 8 Contents 1.FRONTISPIECE……………………………………………………………...………....……….5 1.1 About the OWASP Testing Guide Project…………………………………………...........5 1.2 About the Open Web Application Security Project…………………………….….....…..7 FORWARD……………………………………………………………………………………….15 2.INTRODUCTION……………………………..………………………………………………..18 2.1 The OWASP Testing Project……………………………………………………………..18 2.2 Principles of Testing……………………………………………….....…………………...21 2.3 Testing Techniques Explained…………………………………………………………….25 2.4 Security Requirements Test Derivation, Functional and Nonfunctional Test Requirements, and Test Cases Through and Misuse Cases……………………………... 2.5 Security Test Data Analysis and Reporting: Root Cause Identification and Business/Role Case Test Data Reporting……………………………………………………….. 3. THE OWASP TESTING FRAMEWORK………………………………………………………………. 3.1Overview……………………………………………………………………………………. 3.2 Phase 1: Before Development Begins………………………………………………………. 3.3 Phase 2: During Definition and Design…………………………………………………. 3.4 Phase 3: During Development ……………………………………………………………. 3.5 Phase 4: During Deployment………………………………………………………………. 3.6 Phase 5: Maintenance and Operations………………………………………………. 3.7 A Typical SDLC Testing Workflow……………………………………………………….. 4. WEB APPLICATION PENETRATION TESTING………………………………………… 4.1 Introduction and Objectives……………………………………………………………….. 4.1.1 Testing Checklist…………………………………………………………………….. 4.2 Information Gathering……………………………………………………………………… 4.2.1 Conduct Search Engine Discovery and Reconnaissance for Information Leakage 4.2.2 Fingerprint Web Server 9 4.2.3 Review Webserver Metafiles for Information Leakage 4.2.4 Enumerate Applications on Webserver 4.2.5 Review Webpage Comments and Metadata for Information Leakage……. 4.2.6 Identify Application Entry Points 4.2.7 Identify Application Exit/Handover Points 4.2.8 Map Execution Paths Through Application 4.2.9 Fingerprint Web Application Framework 4.2.10 Fingerprint Web Application 4.2.11 Map Network and Application Architecture ……………………………………… 4.3 Configuration and Deploy Management Testing………………………………………….. 4.3.1 Testing Network/Infrastructure Configuration 4.3.2 Testing Application Platform Configuration 4.3.3 Test File Extensions Handling for Sensitive Information 4.3.4 Review Old, Backup and Unreferenced Files for Sensitive Information 4.3.5 Enumerate Infrastructure and Application Admin Interfaces 4.3.6 Test HTTP Methods 4.3.7 Testing for Database Credentials/ Connection Strings Available 4.3.8 Test Content Security Policy 4.3.9 Test HTTP Strict Transport Security 4.3.10 Test Frame Options 4.3.11 Test RIA Cross Domain Policy 4.3.12 Test Content Type Options 4.4 Identity Management Testing 4.4.1 Test Role Definitions 4.4.2 Test User Registration Process 4.4.3 Test Account Provisioning Process 4.4.4 Testing for Account Enumeration and Guessable User Account………………… 4.4.5 Testing for Weak or Unenforced Username Policy…………………………………. 4.4.6 Test Permissions of Guest/Training Accounts 4.4.7 Test Account Suspension/Resumption Process 4.4.8 Test User Deregistration Process 4.4.9 Test Account Deregistration Process 4.5 Authentication Testing 4.5.1 Testing for Credentials Transported Over an Encrypted Channel……………. 10 4.5.2 Testing for Default Credentials……………………………………………………….. 4.5.3 Testing for Weak Lock Out Mechanism…………………………………………… 4.5.4 Testing for Bypassing Authentication Schema………………………………………. 4.5.5 Test Remember Password Functionality……………………………………………. 4.5.6 Testing for Browser Cache Weakness………………………………………………. 4.5.7 Testing for Weak Password Policy………………………………………………….. 4.5.8 Testing for Weak Security Question/Answer……………………………………….. 4.5.9 Testing for Weak Password Change or Reset Functionalities…………………… 4.5.10 Testing for Weaker Authentication in Alternative Channel……………………. 4.6 Authorization Testing……………………………………………………………………….. 4.6.1 Test Management of Account Permissions…………………………………………. 4.6.2 Testing Directory Traversal File/ Include…………………………………………… 4.6.3 Testing for Bypassing Authorization Schema……………………………………… 4.6.4 Testing for Privilege Escalation……………………………………………………. 4.6.5 Testing for Insecure Direct Object References……………………………………… 4.6.6 Testing for Failure to Restrict Access to Authorized Resource……………….. 4.6.7 Test Privileges of Server Components……………………………………………… 4.6.8 Test Enforcement of Application Entry Points…………………………………….. 4.6.9 Testing for Failure to Restrict Access to Authenticated Resource…………… 4.7 Session Management Testing……………………………………………………………….. 4.7.1 Testing for Bypassing Session Management Schema……………………………. 4.7.2 Testing for Cookies Attributes……………………………………………………… 4.7.3 Testing for Session Fixation………………………………………………………… 4.7.4 Testing for Exposed Session Variables…………………………………………….. 4.7.5 Testing for Cross Site Request Forgery……………………………………………… 4.7.6 Test Session Token Strength…………………………………………………………. 4.7.7 Testing for Logout Functionality…………………………………………………… 4.7.8 Testing for Session Puzzling………………………………………………………….. 4.7.9 Test Session Timeout…………………………………………………………………. 4.7.10 Test Multiple Concurrent Sessions………………………………………………… 4.8 Data Validation Testing…………………………………………………………………… 4.8.1 Testing for Reflected Cross Site Scripting…………………………………………… 4.8.2 Testing for Stored Cross Site Scripting………………………………………………. 4.8.3 Testing for HTTP Verb Tampering………………………………………………….. 11 4.8.4 Testing for HTTP Parameter Pollution……………………………………………… 4.8.5 Testing for Unvalidated Redirects and Forwards………………………………….. 4.8.6 Testing for SQL Injection…………………………………………………………….. 4.8.6.1 Oracle Testing…………………………………………………………………… 4.8.6.2