22
CSCE 522 CSCE 522 Building Secure Building Secure Software Software

CSCE 522 Building Secure Software. CSCE 548 - Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,

Embed Size (px)

Citation preview

Page 1: CSCE 522 Building Secure Software. CSCE 548 - Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,

CSCE 522 CSCE 522 Building Secure SoftwareBuilding Secure Software

Page 2: CSCE 522 Building Secure Software. CSCE 548 - Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,

CSCE 548 - Farkas 2

Reading Reading

This lecture– McGraw: Ch. 3– G. McGraw, Software Security ,

http://www.cigital.com/papers/download/bsi1-swsec.pdf – Ted Demopoulos, Worst Practices in Developing Secure Software,

http://www.demop.com/articles/developing-secure-software.html Next Lecture

– McGraw: Ch. 4 (overview, we’ll cover code review in details later)

Page 3: CSCE 522 Building Secure Software. CSCE 548 - Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,

CSCE 548 - Farkas 3

Three Pillars of Software SecurityThree Pillars of Software Security

Risk ManagementSoftware Security TouchpointsKnowledge

Page 4: CSCE 522 Building Secure Software. CSCE 548 - Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,

CSCE 548 - Farkas 4

Risk ManagementRisk Management

How much effort to invest in securityConsequences of security breachesAcceptable-level of security Tracking and mitigating risk throughout the

full SDLC

Page 5: CSCE 522 Building Secure Software. CSCE 548 - Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,

CSCE 548 - Farkas 5

TouchpointsTouchpoints

System-wide activity: from design to testing and feedback Focus on security from ground up Touchpoints:

1. Code review2. Architectural risk analysis3. Penetration testing4. Risk-based security testing5. Abuse cases6. Security requirements7. Security operations8. External Analysis

Prioritize activities!

Page 6: CSCE 522 Building Secure Software. CSCE 548 - Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,

CSCE 548 - Farkas 6

KnowledgeKnowledge

Gathering, encapsulating, and sharing security knowledge

Knowledge catalogs: principles, guidelines, rules, vulnerabilities, exploits, attack patterns, historical risks

Knowledge categories: – Prescriptive knowledge– Diagnostic knowledge– Historical knowledge

Applied along the SDLC

Can you give examples?

Page 7: CSCE 522 Building Secure Software. CSCE 548 - Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,

CSCE 548 - Farkas 7

Security EngineeringSecurity Engineering

Reduce the need for reactive technologies (e.g., intrusion detection) by safer products Understand software

Need for:– Software developers– Operations people– Administrators– Users– Executives

Why do these people need Security Engineering?

Page 8: CSCE 522 Building Secure Software. CSCE 548 - Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,

CSCE 548 - Farkas 8

Software Security TouchpointsSoftware Security Touchpoints

Best PracticesBoth White Hat (constructive) and Black

Hat (destructive) activitiesThroughout the SDLC

How do you think about security? Which is more important? White hat or Black hat

type of activities?

Page 9: CSCE 522 Building Secure Software. CSCE 548 - Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,

CSCE 548 - Farkas 9

Application of TouchpointsApplication of Touchpoints

Requirement and Use cases

Architecture and Design

Test Plans Code Tests andTest Results

Feedback fromthe Field

5. Abuse casesAbuse cases

6. Security Requirements

2. Risk Analysis

External Review

4. Risk-Based Security Tests

1. Code Review(Tools)

2. Risk Analysis

3. Penetration Testing

7. Security Operations

Page 10: CSCE 522 Building Secure Software. CSCE 548 - Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,

CSCE 548 - Farkas 10

Code Review (Tool)Code Review (Tool)

Artifact: CodeImplementation bugsStatic Analysis toolsWhite Hat

Requirement and Use cases

Architecture and Design

Test Plans Code Tests andTest Results

Feedback fromthe Field

5. Abuse cases

6. Security Requirements

2. Risk Analysis

External Review

4. Risk-Based Security Tests

1. Code Review(Tools)

2. Risk Analysis

3. Penetration Testing

7. Security Operations

Page 11: CSCE 522 Building Secure Software. CSCE 548 - Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,

CSCE 548 - Farkas 11

Architectural Risk AnalysisArchitectural Risk Analysis

Artifact: Design and specification System must be coherent and present a uniform security

front Document assumptions and identify possible attacks Both at specification-based architecture stage and class-

hierarchy design stage White hat

Requirement and Use cases

Architecture and Design

Test Plans Code Tests andTest Results

Feedback fromthe Field

5. Abuse cases

6. Security Requirements

2. Risk Analysis

External Review

4. Risk-Based Security Tests

1. Code Review(Tools)

2. Risk Analysis

3. Penetration Testing

7. Security Operations

Page 12: CSCE 522 Building Secure Software. CSCE 548 - Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,

CSCE 548 - Farkas 12

Penetration TestingPenetration Testing

Artifact: system in its environment Understanding fielded software in its environment Information supplied by architectural risk analysis Who does it? Black Hat

Requirement and Use cases

Architecture and Design

Test Plans Code Tests andTest Results

Feedback fromthe Field

5. Abuse cases

6. Security Requirements

2. Risk Analysis

External Review

4. Risk-Based Security Tests

1. Code Review(Tools)

2. Risk Analysis

3. Penetration Testing

7. Security Operations

Page 13: CSCE 522 Building Secure Software. CSCE 548 - Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,

CSCE 548 - Farkas 13

Risk-Based Security TestingRisk-Based Security Testing

Artifact: unit and system Strategies:

– Testing of security functionality (standard functional testing)

– Risk-based security testing (attack pattern, risk analysis, abuse cases)

Attacker’s mindset White Hat + Black Hat

Requirement and Use cases

Architecture and Design

Test Plans Code Tests andTest Results

Feedback fromthe Field

5. Abuse cases

6. Security Requirements

2. Risk Analysis

External Review

4. Risk-Based Security Tests

1. Code Review(Tools)

2. Risk Analysis

3. Penetration Testing

7. Security Operations

Page 14: CSCE 522 Building Secure Software. CSCE 548 - Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,

CSCE 548 - Farkas 14

Abuse CasesAbuse Cases

Artifact: requirements and use cases Describe system behavior under attack Explicit coverage of

– What should be protected– From whom– For how long

White Hat + Black Hat

Requirement and Use cases

Architecture and Design

Test Plans Code Tests andTest Results

Feedback fromthe Field

5. Abuse cases

6. Security Requirements

2. Risk Analysis

External Review

4. Risk-Based Security Tests

1. Code Review(Tools)

2. Risk Analysis

3. Penetration Testing

7. Security Operations

Page 15: CSCE 522 Building Secure Software. CSCE 548 - Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,

CSCE 548 - Farkas 15

Security RequirementsSecurity Requirements

Artifact: RequirementsSecurity explicitly worked into the

requirements levelBoth functional security and emergent

characteristicsWhite Hat

Requirement and Use cases

Architecture and Design

Test Plans Code Tests andTest Results

Feedback fromthe Field

5. Abuse cases

6. Security Requirements

2. Risk Analysis

External Review

4. Risk-Based Security Tests

1. Code Review(Tools)

2. Risk Analysis

3. Penetration Testing

7. Security Operations

Page 16: CSCE 522 Building Secure Software. CSCE 548 - Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,

CSCE 548 - Farkas 16

Security OperationsSecurity Operations

Artifact: fielded systemMonitoring system usageCombines both network centric and

software specific operationsWhite Hat

Requirement and Use cases

Architecture and Design

Test Plans Code Tests andTest Results

Feedback fromthe Field

5. Abuse cases

6. Security Requirements

2. Risk Analysis

External Review

4. Risk-Based Security Tests

1. Code Review(Tools)

2. Risk Analysis

3. Penetration Testing

7. Security Operations

Page 17: CSCE 522 Building Secure Software. CSCE 548 - Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,

CSCE 548 - Farkas 17

External AnalysisExternal Analysis

Evaluate security by outside members Why?Advantages/disadvantages

Requirement and Use cases

Architecture and Design

Test Plans Code Tests andTest Results

Feedback fromthe Field

5. Abuse cases

6. Security Requirements

2. Risk Analysis

External Review

4. Risk-Based Security Tests

1. Code Review(Tools)

2. Risk Analysis

3. Penetration Testing

7. Security Operations

Page 18: CSCE 522 Building Secure Software. CSCE 548 - Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,

CSCE 548 - Farkas 18

When to Apply Security? When to Apply Security? Economical consideration: early is better Effectiveness of touchpoints:

– Economics– Which software artifacts are available– Which tools are available– Cultural changes

Bad: reactive strategy need: secure development

Page 19: CSCE 522 Building Secure Software. CSCE 548 - Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,

CSCE 548 - Farkas 19

Best PracticesBest Practices

Earlier the betterChange “operational” view to secure

softwareBest practices: expounded by experts and

adopted by practitioners

Page 20: CSCE 522 Building Secure Software. CSCE 548 - Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,

Worst Practices to AvoidWorst Practices to AvoidFrom T. Demopoulos, “Worst Practices in Developing Secure Software

1. Assuming only “important’ SW needs to be secure

2. Emphasizing hitting deadlines over “good code”

3. Having IT make all risk management decisions

4. Not considering security during the entire SDLC

5. Assuming the SW won’t be attacked

6. Not doing any security testing

7. Not planning for failure

8. Counting on “security through obscurity”

9. Disallowing bad input instead of only allowing good input

10. SW that is not secure by default

11. Coding your own cryptography

CSCE 548 - Farkas 20

Page 21: CSCE 522 Building Secure Software. CSCE 548 - Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,

CSCE 548 - Farkas 21

Who Should Care?Who Should Care?

DevelopersArchitectsOther buildersOperations people

Do not start with security people.Start with software people.

Page 22: CSCE 522 Building Secure Software. CSCE 548 - Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,

CSCE 548 - Farkas 22

Next ClassNext Class

Code Review