owaspappsec2006seattle_agileandsecure.ppt

36
Copyright © 2006 - The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the Creative Commons Attribution-ShareAlike 2.5 License. To view this license, visit http://creativecommons.org/licenses/by-sa/2.5/ The OWASP Foundation OWASP AppSec Seattl e Oct 2006 http://www.owasp.org / Agile and Secure: Can We Be Both? Dan Cornell, OWASP San Antonio Leader Principal, Denim Group Ltd. [email protected] (210) 572-4400

Upload: softwarecentral

Post on 11-May-2015

507 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: OWASPAppSec2006Seattle_AgileAndSecure.ppt

Copyright © 2006 - The OWASP FoundationPermission is granted to copy, distribute and/or modify this document under the terms of the Creative Commons Attribution-ShareAlike 2.5 License. To view this license, visit http://creativecommons.org/licenses/by-sa/2.5/

The OWASP Foundation

OWASP

AppSec

Seattle

Oct 2006 http://www.owasp.org/

Agile and Secure:Can We Be Both?

Dan Cornell, OWASP San Antonio LeaderPrincipal, Denim Group [email protected](210) 572-4400

Page 2: OWASPAppSec2006Seattle_AgileAndSecure.ppt

2OWASP AppSec Seattle 2006

The Agile Practitioner’s Dilemma

Agile Forces: More responsive

to business concerns

Increasing the frequency of stable releases

Decreasing the time it takes to deploy new features

Secure Forces: More aggressive

regulatory environment

Increasing focus on need for security

Traditional approaches are top-down, document centric

Page 3: OWASPAppSec2006Seattle_AgileAndSecure.ppt

3OWASP AppSec Seattle 2006

Objectives

Background

Goals of Agile Methods

Goals of Secure Development Lifecycle (SDL)

Review the Momentum of Agile Methods

Look at An Integrated Process

Challenges & Compromises

Page 4: OWASPAppSec2006Seattle_AgileAndSecure.ppt

4OWASP AppSec Seattle 2006

Background

Dan Cornell Principal of Denim Group, Ltd. MCSD, Java 2 Certified Programmer

Challenges facing our own agile teamsDeliver projects in an economically-responsible

mannerUphold security goals

Page 5: OWASPAppSec2006Seattle_AgileAndSecure.ppt

5OWASP AppSec Seattle 2006

Notable Agile Methods

eXtreme Programming (XP) Feature Driven Development (FDD) SCRUM MSF for Agile Software Development Agile Unified Process (AUP) Crystal Clear Dynamic Systems Development Method

(DSDM)

Page 6: OWASPAppSec2006Seattle_AgileAndSecure.ppt

6OWASP AppSec Seattle 2006

Manifesto for Agile Software Development

Individuals and interactions over processes and tools

Working software over comprehensive documentation

Customer collaboration over contract negotiation

Responding to change over following a plan

Source: http://www.agilemanifesto.org/

Page 7: OWASPAppSec2006Seattle_AgileAndSecure.ppt

7OWASP AppSec Seattle 2006

Agile’s Core Values

Communication

Simplicity

Feedback

Courage

Page 8: OWASPAppSec2006Seattle_AgileAndSecure.ppt

8OWASP AppSec Seattle 2006

Principles of Agile Development

Rapid Feedback

Simple Design

Incremental Change

Embracing Change

Quality Work

• The system is appropriate for the intended audience.

• The code passes all the tests.

• The code communicates everything it needs to.

• The code has the smallest number of classes and methods.

Page 9: OWASPAppSec2006Seattle_AgileAndSecure.ppt

9OWASP AppSec Seattle 2006

Agile Practices

The Planning Game

The Driving Metaphor

Shared Vision

On-Site Customer

Small Releases

• Customer: scope, priorities and release dates

• Developer: estimates, consequences and detailed scheduling

• Development iterations or cycles that last 1-4 weeks.

• Release iterations as soon as possible (weekly, monthly, quarterly).

Page 10: OWASPAppSec2006Seattle_AgileAndSecure.ppt

10OWASP AppSec Seattle 2006

More Agile Practices

Collective Ownership

Test Driven

Continuous Integration

Coding Standards

Pair Programming

Page 11: OWASPAppSec2006Seattle_AgileAndSecure.ppt

11OWASP AppSec Seattle 2006

Definition of Secure

A secure product is one that protects the

confidentiality, integrity, and availability of

the customers’ information, and the

integrity and availability of processing

resources under control of the system’s

owner or administrator.

-- Source: Writing Secure Code (Microsoft.com)

Page 12: OWASPAppSec2006Seattle_AgileAndSecure.ppt

12OWASP AppSec Seattle 2006

A Secure Development Process…

Strives To Be A Repeatable Process

Requires Team Member Education

Tracks Metrics and Maintains Accountability

Sources:“Writing Secure Code” 2nd Ed., Howard & LeBlanc

“The Trustworthy Computing Security Development Lifecycle”

by Lipner & Howard

Page 13: OWASPAppSec2006Seattle_AgileAndSecure.ppt

13OWASP AppSec Seattle 2006

Secure Development Principles

SD3: Secure by Design, Secure by Default, and in Deployment

Learn From Mistakes Minimize Your Attack Surface Assume External Systems Are Insecure Plan On Failure Never Depend on Security Through

Obscurity Alone Fix Security Issues Correctly

Page 14: OWASPAppSec2006Seattle_AgileAndSecure.ppt

14OWASP AppSec Seattle 2006

Secure Development Practices

Education, Education, Education

Threat Modeling

Secure Coding Techniques

Security Testing

Security Code Reviews

Page 15: OWASPAppSec2006Seattle_AgileAndSecure.ppt

15OWASP AppSec Seattle 2006

Microsoft’s Secure Development Lifecycle (SDL)

Requirements Design Implementation Verification Release (Waterfall!)

Page 16: OWASPAppSec2006Seattle_AgileAndSecure.ppt

16OWASP AppSec Seattle 2006

Observations of the SDL in Practice

Threat Modeling is the Highest-Priority Component

Penetration Testing Alone is Not the Answer

Tools Should be Complementary

Page 17: OWASPAppSec2006Seattle_AgileAndSecure.ppt

17OWASP AppSec Seattle 2006

Threat Modeling

STRIDE – classify threats Spoofing Identity Tampering with Data Repudiation Information Disclosure Denial of Service Elevation of Privilege

DREAD – rank vulnerabilities Damage Potential Reproducibility Exploitability Affected Users Discoverability

Page 18: OWASPAppSec2006Seattle_AgileAndSecure.ppt

18OWASP AppSec Seattle 2006

Dr. Dobb’s says Agile Methods Are Catching On

41% of organizations have adopted an agile methodology

Of the 2,611 respondents doing agile… 37% using eXtreme Programming 19% using Feature Driven Development (FDD) 16% using SCRUM 7% using MSF for Agile Software Development

Source: http://www.ddj.com/dept/architect/191800169

Page 19: OWASPAppSec2006Seattle_AgileAndSecure.ppt

19OWASP AppSec Seattle 2006

Agile Teams are “Quality Infected”

60% reported increased productivity

66% reported improved quality

58% improved stakeholder satisfaction

Page 20: OWASPAppSec2006Seattle_AgileAndSecure.ppt

20OWASP AppSec Seattle 2006

Adoption Rate for Agile Practices

Of the respondents using an agile method…

36% have active customer participation

61% have adopted common coding guidelines

53% perform code regression testing

37% utilize pair programming

Page 21: OWASPAppSec2006Seattle_AgileAndSecure.ppt

21OWASP AppSec Seattle 2006

Let’s Look at Some Specific Agile Methods

eXtreme Programming (XP)

Feature Driven Development (FDD)

SCRUM

MSF for Agile Software Development

Page 22: OWASPAppSec2006Seattle_AgileAndSecure.ppt

22OWASP AppSec Seattle 2006

eXtreme Programming (XP)

Page 23: OWASPAppSec2006Seattle_AgileAndSecure.ppt

23OWASP AppSec Seattle 2006

Feature Driven Development (FDD)

Startup Phase

Develop an Overall

Model

BuildFeatures

ListPlanning

Designby

Feature

Buildby

Feature

Construction Phase

Source: http://featuredrivendevelopment.com/

Page 24: OWASPAppSec2006Seattle_AgileAndSecure.ppt

24OWASP AppSec Seattle 2006

SCRUM

Commonly Used to Enhance Existing Systems

Feature Backlog 30 Day Sprints Daily Team Meeting

Source: http://www.controlchaos.com/

Page 25: OWASPAppSec2006Seattle_AgileAndSecure.ppt

25OWASP AppSec Seattle 2006

MSF for Agile Software Development

Adapted from the Spiral / Waterfall Hybrid

Product definition, development and testing occurs in overlapping iterations

Different iterations have a different focus

Page 26: OWASPAppSec2006Seattle_AgileAndSecure.ppt

26OWASP AppSec Seattle 2006

An Integrated Process

Making Agile Trustworthy

Page 27: OWASPAppSec2006Seattle_AgileAndSecure.ppt

27OWASP AppSec Seattle 2006

Project Roles

Product Manager / Customer Program Manager / Coach Architect Developer Tester Security Adviser

Page 28: OWASPAppSec2006Seattle_AgileAndSecure.ppt

28OWASP AppSec Seattle 2006

Project Setup

Education & Training (include Security) Developers Testers Customers

User Stories / Use Case Development Architecture Decisions (spikes) Agree on Threat Modeling standards for

the projectSTRIDE prioritiesDREAD ratings

Page 29: OWASPAppSec2006Seattle_AgileAndSecure.ppt

29OWASP AppSec Seattle 2006

Release Planning

User Stories / Use Cases Drive… Acceptance Test Scenarios Estimations may affect priorities and thus the

composition of the release Inputs for Threat Modeling Security Testing Scenarios Determine the qualitative “risk budget”

Keep the customer involved in making risk tradeoffs

Finalize Architecture & Development Guidelines Common Coding Standards (include security)

Crucial for collective code ownership Conduct Initial Threat Modeling (assets & threats) Designer’s Security Checklist

Page 30: OWASPAppSec2006Seattle_AgileAndSecure.ppt

30OWASP AppSec Seattle 2006

Iteration Planning

1-4 Weeks in Length (2 weeks is very common) Begins with an Iteration Planning Meeting

User Stories are broken down into Development Tasks Developers estimate their own tasks Document the Attack Surface (Story Level) Model the threats alongside the user story documentation

Crucial in documentation-light processes Capture these and keep them

– Code will tell you what decision was made, threat models will tell you why decisions were made

– Crucial for “refactoring” in the face of changing security priorities

Never Slip the Date Add or Remove Stories As Necessary

Page 31: OWASPAppSec2006Seattle_AgileAndSecure.ppt

31OWASP AppSec Seattle 2006

Executing an Iteration

Daily Stand-ups

Continuous Integration Code Scanning Tools Security Testing Tools

Adherence to Common Coding Standards and Security Guidelines Crucial for communal code ownership

Developer’s Checklist

Page 32: OWASPAppSec2006Seattle_AgileAndSecure.ppt

32OWASP AppSec Seattle 2006

Closing an Iteration

Automation of Customer Acceptance Tests Include negative testing for identified threats

Security Code ReviewSome may have happened informally during

pair programming

Page 33: OWASPAppSec2006Seattle_AgileAndSecure.ppt

33OWASP AppSec Seattle 2006

Stabilizing a Release

Schedule Defects & VulnerabilitiesPrioritize vulnerabilities with client input based

on agreed-upon STRIDE and DREAD standards

Security Push Include traditional penetration testing

Page 34: OWASPAppSec2006Seattle_AgileAndSecure.ppt

34OWASP AppSec Seattle 2006

Compromises We’ve Made

Feature-focus in iterations removes some “top down” control

More documentation than is required in pure Agile developmentSecurity coding standardsProject-specific STRIDE and DREAD standardsUser story threat models

Page 35: OWASPAppSec2006Seattle_AgileAndSecure.ppt

35OWASP AppSec Seattle 2006

Values of an Agile and Secure Process

Communication Simplicity Feedback Courage Trustworthy

Page 36: OWASPAppSec2006Seattle_AgileAndSecure.ppt

36OWASP AppSec Seattle 2006

Questions

Dan [email protected]: www.denimgroup.comBlog: www.agileandsecure.com