AprOwasp LOD FER WAL NewVersion
AprOwasp LOD FER WAL NewVersion
AprOwasp LOD FER WAL NewVersion
OWASP
10/30/2009
Luiz Otvio Duarte Ferrucio de Franco Rosa Walcir M. Cardoso Jr. Renato Archer Information Technology Center Brazilian Ministry of Science and Technology +55-19-37466241
Copyright The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License.
Agenda
Introduction Key Points Techniques for software testing
Software Quality
Web application security testing approach Practical demonstration Conclusions
OWASP
2
Agenda
Introduction Key Points Techniques for software testing
Software Quality
Web application security testing approach Practical demonstration Conclusions
OWASP
3
Motivation The concern with security in developing projects for the Web is essential for the protection of information and business continuity. In recent years the Web has grown significantly and complexity of applications and services even more. New technologies, tools and architectures are adopted without properly concern for security.
OWASP
Statistics data
@Risk/SANS Statistics
SysAdmin, Audit, Network, Security Institute maintains @RISK a weekly vulnerability consensus digest.
NVD/NIST Statistics
National Vulnerability Database - repository of vulnerability resources (USA).
Statistics data
@Risk/SANS
@Risk Vulnerabilites Distribution 01/01/2009 08/20/2009
1400 1200 1000
800
600 400 200 0
Windows Related
Others OS
Others
OWASP
3500
3000 2500 2000 1500 1000 500 0 All
Web Related
All Others
OWASP
8
NVD/NIST
NVD/NIST 01/01/2009 - 09/01/2009
SQL Injection: Cross Site Scripting: Others:
2775; 68%
544; 14% 740; 18%
OWASP
@Risk/SANS
@Risk - Web Application Related Vulnerabilities 01/01/2009 08/20/2009
40 35 30 25 20 15 10 5 0
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
OWASP
10
How to spot web vulnerabilities and the correct then are well known, but repairing could be expensive.
Applications are not properly tested in terms of security. Lack of a de facto standard or approach to conduct a good software security testing for web applications. Know-how on penetration test is far from a good software security testing.
OWASP
12
Goal
Software Testing
Software Quality
Process Documentation
OWASP
13
Goal
Software Testing
Software Quality
Process
Documentation
OWASP
14
Initial Concepts
Mistake
Mistake
Defect
Error
Fail
A human action that can introduce some kind of defect in the software. Defect, Fault
It is a deficiency (step, process or incorrect definition) resident in the software. The defect when executed can cause an error.
OWASP
15
Initial Concepts
Mistake
Error
Defect
Error
Fail
It is caused by the execution of a defect and is characterized by an unexpected or inconsistent program state. It is the incorrect value in a given state of the program. Fail It is an observable event that the software infringed its specification. It is the noticed spread of an error.
OWASP
16
Initial Concepts
Vulnerability
A weakness in a computing system which can be exploited and harmed by one or more threats. Making the system do what it was not designed to do. Web Application (In this presentation)
Is an application coded in a browser-supported language that is acessed via a web browser over a network such as Internet. Some times we will use webapp as a synonymous of Web Application.
OWASP
17
Agenda
Introduction Key Points Techniques for software testing
Software Quality
Web application security testing approach Practical demonstration Conclusions
OWASP
18
OWASP
19
Approach, before software Affect the Preventive quality Affectdeploy the security
Agenda
Introduction Key Points Techniques for software testing
Software Quality
Web application security testing approach Practical demonstration Conclusions
OWASP
23
Software Testing
Software testing is the process of running the software in a controlled way to evaluate whether it behaves as specified. The main goal of software testing is to detect software failures so defects may be uncovered and corrected.
OWASP
24
Software Testing
We test the software only partially? Yes. We can not conclude that the software is free from defects, even after running several test cases. The cost of testing to ensure that software has no defects can overcome the project budget.
28
OWASP
29
Agenda
Introduction Key Points Techniques for software testing
Software Quality
Web application security testing approach Practical demonstration Conclusions
OWASP
32
Software Quality
Is the degree in which the software product meets stated and implied needs when used under specified conditions.
ISO/IEC 25010 Draft Software product Quality Requirements and Evaluation (SQuaRE) Quality models for software product quality and system quality in use. ISO/IEC 14598 Information technology - Software product evaluation - Part 1: General overview. Software product evaluation - Part 5: Process for evaluators.
OWASP
33
Portability Maintainability Software product quality model ISO/IEC 25010 Draft Compatibility Operability Performance Efficiency Reliability Functional Suitability Security
OWASP
34
Accountability
Security
Non-repudiation
Integrity
Confidentiality
OWASP
Authenticity
35
ISO/IEC 14598-1 (ISO/IEC 14598-5) Provides basis for a systematic evaluation process and general software quality.
Establishes evaluation process, such as:
Repeatability / Reproducibility / Impartiality / Objectivity (RRIO).
OWASP
36
Agenda
Introduction Key Points Techniques for software testing
Software Quality
Web application security testing approach Practical demonstration Conclusions
OWASP
37
Proposed Approach
Software Testing
Software Quality
Process
Documentation
OWASP
38
Proposed Approach
Software Testing - Security
Will define the web application security testing criteria; Will define the test case selection criteria; Will define the adequacy criteria.
Software Quality Security The evaluation phases are extends to software security testing, defining The process: Establish security testing requirements; Especify the security testing; Design the security testing; Execute the security testing; Conclusion of the security testing. Based on ISO/IEC 14598-5:
OWASP
39
Proposed Approach
STM N
STM 1 STM 2
SDLC N
OWASP
41
...
Documentation Process Web Application Security Test Cases / Tools
...
Security Test Case Selection Criteria
Adequacy Criteria
...
Web Application Security Test Criteria
OWASP
42
Web Application Security Testing Methodologies Web Application Security Test Cases / Tools Security Test Case Selection Criteria
...
Adequacy Criteria
...
Web Application Security Test Criteria
OWASP
43
A web application security testing criterion Almost all security test case will cause an abnormal behavior in the structure under testing. The oracle must be able to determine if this abnormal behavior is related or not with some kind of security flaw. If the system's behavior is "normal then, either the flaw was not spotted or does not exists.
Web Application Security Testing Methodologies Web Application Security Test Cases / Tools Security Test Case Selection Criteria
...
Documentation Process
...
Adequacy Criteria
...
Web Application Security Test Criteria
OWASP
44
A web application security testing criterion Is any of those webapp security testing criteria a valid criterion?
All of those criteria, in addition to an adequate test case set, have the ability to identify security flaws presence. But we have not yet been able to prove that all flaws (defined by the criterion) can be exercised.
Once established the webapp security testing criterion, we must determine the set of case tests. This is the test case select criterion.
OWASP
45
A security test case selection criterion We already know what kind of security control or threat to prioritize, now we need to determine a criterion to select good test cases. How to define the test data selection criterion?
How to select properly real test cases and automated test case generation tools, so those threats and security controls can be well exercised?
Web Application Security Testing Methodologies Web Application Security Test Cases / Tools Security Test Case Selection Criteria
...
Documentation Process
...
Adequacy Criteria
...
Web Application Security Test Criteria
OWASP
46
The aim is to reduce the testing efforts to the identified vulnerabilities that could be exploited by threats or could be present on security controls.
Web Application Security Testing Methodologies Web Application Security Test Cases / Tools Security Test Case Selection Criteria
...
Documentation Process
...
Adequacy Criteria
...
Web Application Security Test Criteria
OWASP
47
...
Documentation Process
...
Adequacy Criteria
...
Web Application Security Test Criteria
OWASP
48
Web Application Security Testing Methodologies Web Application Security Test Cases / Tools Security Test Case Selection Criteria
...
Documentation Process
...
Adequacy Criteria
...
Web Application Security Test Criteria
OWASP
49
...
Documentation Process
...
Adequacy Criteria
...
Web Application Security Test Criteria
OWASP
50
Web Application Security Test Case / Tools So now it is time to use the security skills to generate test cases. Who can save us?
OSSTMM; OWASP; Pentesting techniques; Exploitation techniques; Security testing tools.
Web Application Security Testing Methodologies Web Application Security Test Cases / Tools Security Test Case Selection Criteria
...
Documentation Process
...
Adequacy Criteria
...
Web Application Security Test Criteria
OWASP
51
Web Application Security Test Case / Tools As the used approach is broad, there might have methodologies that allow the use of the suggested approach. As our goal is a preventive approach, the methodology must be defined during the development of the software product. That is, during the SDLC. Let's take the Vee model as an example.
Web Application Application Security Security Testing Testing Methodologies Methodologies Web Web Application Security Test Cases / Tools Security Test Case Selection Criteria
...
Documentation Process
...
Adequacy Criteria
...
Web Application Security Test Criteria
OWASP
52
OWASP
53
Coding
OWASP
54
Coding
OWASP
55
Coding
OWASP
56
Coding
OWASP
57
Coding
OWASP
58
Coding
OWASP
59
Coding
OWASP
60
Documentation Process The documentation process is the base of RRIO. It is important to use a well-established process of testing so the documentation process is naturally achieved. Remember ISO/IEC 14598-5? We extended it to security testing. So the process of testing follows this ISO and so does documentation.
Web Application Security Testing Methodologies Web Application Security Test Cases / Tools Security Test Case Selection Criteria
...
Documentation Process
...
Adequacy Criteria
...
Web Application Security Test Criteria
OWASP
61
Take measures Compare with criteria did the adequacy criterion Worked? Assess results
Generate a reviewed security testing report
OWASP
62
That is, for each type of test this set of phases should be re-drawn, re-structured, re-thought.
OWASP
63
Web Application Security Testing Methodologies Web Application Security Test Cases / Tools Security Test Case Selection Criteria
...
...
Adequacy Criteria
...
Web Application Security Test Criteria
OWASP
64
Agenda
Introduction Key Points Techniques for software testing
Software Quality
Web application security testing approach Practical demonstration Conclusions
OWASP
65
Agenda
Introduction Key Points Techniques for software testing
Software Quality
Web application security testing approach Practical demonstration Conclusions
OWASP
66
Conclusions It is a preventive approach (and practice), using risk analysis (threat modeling) and other technologies, in order to establish guidelines for test criteria for sensitive applications. The key point is how to use technology properly in a determinated flow of phases in order to achieve a given result. It is fully applicable to any type (adherent) of software testing model and any SDLC.
OWASP
67
Thanks
OWASP
68