SB SoftSec16 03 Security Software Engineering
SB SoftSec16 03 Security Software Engineering
DEVELOPMENT
SECURE DEVELOPMENT
LIFECYCLE (SDL)
…
5
WHAT IS “SOFTWARE SECURITY”?
NOT just a set of features
11
TRADITIONAL SOFTWARE ENGINEERING
12
RESULTS FROM CURRENT SOFTWARE
ENGINEERING METHODS
>1000 new vulnerabilities reported every year
About 50% of vulnerabilities are commonly repeated
mistakes
About 25% could be avoided by considering secure
design principles
Need new methods
“We can't solve problems by using the same kind of
thinking we used when we created them.”
(Albert Einstein)
13
ASSURANCE
Axiom: It is impossible to demonstrate with absolute
certainty that a moderately complex application doesn't have
any vulnerabilities.
14
HOW DO YOU MEASURE ASSURANCE?
15
SECURE SOFTWARE ENGINEERING
Goal: minimize the number of security vulnerabilities in
design, implementation and deployment
Identify and remove vulnerabilities in the development lifecycle as
early as possible.
16
SDL – REQUIREMENTS PHASE
Requirements Design Implementation Verification Deployment Maintenance
Development of requirements
Gather information about application [costumer/experience/survey]
Analysis of requirements
Areall the security issues addressed
CIA (Confidentiality, Integrity, Availability)
Verification of requirements
Arethere are any inconsistencies / system interface / correctness
Documentation
Feasibility of requirements
[repeat]
18
SDL – DESIGN PHASE
Requirements Design Implementation Verification Deployment Maintenance
Develop documentation
19
SDL – DESIGN PHASE
Requirements Design Implementation Verification Deployment Maintenance
To Do:
Threat Models
Input Data Types
Security Use Cases
Security Architecture
How to Secure?
SecureDesign Principles should be applied
We may use Secure Design Patterns
Tools
E.g. SecureUML – Secure Unified Modeling Language
20
SECURITY DESIGN PRINCIPLES
21
SECURITY DESIGN PRINCIPLES
Principle of Least Privilege
Principle of defense in depth (Layering)
Economy of Mechanism
Complete Mediation
Separation of Privilege
Psychological Acceptability
Isolation
Encapsulation
Modularity
Least Astonishment
22
Keep security simple
LEAST PRIVILEGE
24
PARTITIONING (COMPARTMENTALIZATION)
privileges
Secunia advisory SA10949, Dell TrueMobile WLAN card utility
25
FAIL-SAFE DEFAULTS
26
ECONOMY OF MECHANISM
Keep Security Simple
Security mechanisms/measures should be as simple as possible
Simplerto implement and to verify
Fewer vulnerabilities
modeled
configured
implemented
used
28
COMPLETE MEDIATION
30
OPEN DESIGN
(source: Kohno, Stubblefield, Rubin and Wallach, 2003 Johns Hopkins University)
32
NOTES ON OPEN DESIGN
33
SEPARATION OF PRIVILEGE
“A system should not grant permission based on a single
condition.”
Removes a single point of failure
34
SEPARATION OF PRIVILEGE: SUCCESSFUL EXAMPLE
This example is from Bishop M., "Computer Security: Art and Science")
35
NOTES ON THE SEPARATION OF PRIVILEGE
36
LEAST COMMON MECHANISM
37
LEAST COMMON MECHANISM: FAILED EXAMPLE
38
PSYCHOLOGICAL ACCEPTABILITY
40
ISOLATION
Public access should be isolated from critical resources (no
connection between public and critical information)
Users files should be isolated from one another (except
when desired)
Security mechanism should be isolated (i.e., preventing
access to those mechanisms)
41
OTHER SECURITY DESIGN PRINCIPLES
42
SDL – IMPLEMENTATION PHASE
Requirements Design Implementation Verification Deployment Maintenance
OWASP Top 10
44
SDL – VERIFICATION PHASE
Requirements Design Implementation Verification Deployment Maintenance
Code Reviews
Documentation
45
SDL – RELEASE PHASE
Requirements Design Implementation Verification Deployment Maintenance
46
DEPLOYMENT PRINCIPLES
Requirements Design Implementation Verification Deployment Maintenance
47
DEPLOYMENT PATTERNS
Requirements Design Implementation Verification Deployment Maintenance
Causes:
Costumer feedback
Security incident details and vulnerability reports
…
Types of maintenance
Need to introduce new functionality
Need to upgrade to keep up with technology
Discovered vulnerability
49
FACTS:
Every security vulnerability / flaw ignored in an earlier
phase will end-up at later phase[s]
50
EARLIER, BETTER
Defects at Each Stage of Software Development
60
Percentage of Defects
50 Requirements
40 Design
Coding
30
Testing
20
Maintenance
10
0
Cost of Fixing Defects at Each Stage of
Software Development
$15,000
Source: TRW
$12,000
Cost Per Defect
$9,000
$6,000
$3,000
0
CASE STUDY: MICROSOFT
SD3 + C
Secure by Design
Software designed and implemented to “protect” itself and its
information
Secure by Default
To minimize the harm when vulnerabilities exploited, software’s
default state should promote security (ex. least necessary
privileges)
Secure in Deployment
Software accompanied by tools and guidance to assist secure use
Communications
Developers should be prepared for discovery of product
vulnerabilities and should communicate openly and responsibly
with end users. (e.g. patching, deploying workarounds) 52
SDL @ MICROSOFT
• the secure software development process model at
Microsoft
54
SDL Practice #4: Perform Security and Privacy Risk Assessments
SDL @ MICROSOFT
56
SDL @ MICROSOFT
57
SDL @ MICROSOFT
58
SDL @ MICROSOFT
59
SDL @ MICROSOFT
60
SDL @ MICROSOFT
61
SDL @ MICROSOFT
63
RESEARCH TOPICS
Secure Design: Threat Modeling methods / tools
64