© 2003 CigitalSSI 2003 Getting Past Why Architecture is the Key to Software Security Gary McGraw, Ph.D. CTO, Cigital

Slides:



Advertisements
Similar presentations
Authenticating Users. Objectives Explain why authentication is a critical aspect of network security Explain why firewalls authenticate and how they identify.
Advertisements

Chapter 1  Introduction 1 Chapter 1: Introduction.
Principles of Computer Security: CompTIA Security + ® and Beyond, Third Edition © 2012 Principles of Computer Security: CompTIA Security+ ® and Beyond,
CSCE 522 Building Secure Software. CSCE Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,
VM: Chapter 5 Guiding Principles for Software Security.
Secure Design Principles  secure the weakest link  reduce the attack surface  practice defense in depth  minimize privilege  compartmentalize  fail.
August 1, 2006 Software Security. August 1, 2006 Essential Facts Software Security != Security Features –Cryptography will not make you secure. –Application.
It’s always better live. MSDN Events Security Best Practices Part 2 of 2 Reducing Vulnerabilities using Visual Studio 2008.
Chapter 7 HARDENING SERVERS.
SOFTWARE SECURITY TESTING IS IMPORTANT, DIFFERENT AND DIFFICULT Review by Rayna Burgess 4/21/2011.
Security Engineering II. Problem Sources 1.Requirements definitions, omissions, and mistakes 2.System design flaws 3.Hardware implementation flaws, such.
Applied Software Project Management 1 Introduction Dr. Mengxia Zhu Computer Science Department Southern Illinois University Carbondale.
Software Security Testing by Gary McGraw, Bruce Potter presented by Edward Bonver 11/07/2005.
1 Security and Software Engineering Steven M. Bellovin AT&T Labs – Research
Vulnerability Assessments
Software Security Course Course Outline Course Overview Introduction to Software Security Common Attacks and Vulnerabilities Overview of Security.
OWASP Mobile Top 10 Why They Matter and What We Can Do
Secure Software Development SW Penetration Testing Chapter 6 Rasool Jalili & M.S. Dousti Dept. of Computer Engineering Fall 2010.
Thomas Levy. Agenda 1.Aims: CIAN 2.Common Business Attacks 3.Information Security & Risk Management 4.Access Control 5.Cryptography 6.Physical Security.
Lecture 18 Page 1 CS 111 Online Design Principles for Secure Systems Economy Complete mediation Open design Separation of privileges Least privilege Least.
CSCE 548 Secure Software Development Risk-Based Security Testing.
CS 325: Software Engineering April 14, 2015 Software Security Security Requirements Software Security in the Life Cycle.
 Protect customers with more secure software  Reduce the number of vulnerabilities  Reduce the severity of vulnerabilities  Address compliance requirements.
A Security Review Process for Existing Software Applications
May 2, 2007St. Cloud State University Software Security.
Important acronyms AO = authorizing official ISO = information system owner CA = certification agent.
The Protection of Information in Computer Systems Part I. Basic Principles of Information Protection Jerome Saltzer & Michael Schroeder Presented by Bert.
Engineering Secure Software. A Ubiquitous Concern  You can make a security mistake at every step of the development lifecycle  Requirements that allow.
Lecture 16 Page 1 Advanced Network Security Perimeter Defense in Networks: Virtual Private Networks Advanced Network Security Peter Reiher August, 2014.
Watching Software Run Brian ChessNov 18, Success is foreseeing failure. – Henry Petroski.
1 Vulnerability Assessment of Grid Software James A. Kupsch Computer Sciences Department University of Wisconsin Condor Week 2007 May 2, 2007.
 Chapter 14 – Security Engineering 1 Chapter 12 Dependability and Security Specification 1.
Security Policies and Procedures. cs490ns-cotter2 Objectives Define the security policy cycle Explain risk identification Design a security policy –Define.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
CSCE 522 Secure Software Development Best Practices.
12 Steps to Cloud Security A guide to securing your Cloud Deployment Vishnu Vettrivel Principal Engineering Lead,
Security (Keep your site secure at extension level) Sergey Gorstka Fastw3b.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Introduction to Information Security
Security: The Goal Computers are as secure as real world systems, and people believe it. This is hard because: Computers can do a lot of damage fast. There.
Lecture 13 Page 1 CS 236 Online Principles for Secure Software Following these doesn’t guarantee security But they touch on the most commonly seen security.
CSCE 201 Secure Software Development Best Practices.
Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.
OWASP Building Secure Web Applications And the OWASP top 10 vulnerabilities.
©SoftMoore ConsultingSlide 1 Serialization. ©SoftMoore ConsultingSlide 2 Serialization Allows objects to be written to a stream Can be used for persistence.
IS3220 Information Technology Infrastructure Security
By Ramesh Mannava.  Overview  Introduction  10 secure software engineering topics  Agile development with security development activities  Conclusion.
Engineering Secure Software. Does Security Even Matter?  Find two other people near you Introduce yourself What is your favorite software development.
ASP.NET 2.0 Security Alex Mackman CM Group Ltd
Important acronyms AO = authorizing official ISO = information system owner CA = certification agent.
How We Got Here PC and Internet changed the rules –Viruses, information sharing, “outside” and “inside” indistinguishable –Vulnerability research for.
Lecturer: Eng. Mohamed Adam Isak PH.D Researcher in CS M.Sc. and B.Sc. of Information Technology Engineering, Lecturer in University of Somalia and Mogadishu.
Engineering Secure Software. A Ubiquitous Concern  You can make a security mistake at every step of the development lifecycle  Requirements that allow.
Software Security Q: What does it mean to say that a program is secure? A: There is a sufficient amount of trust that the program maintains _____________,
Lecture 19 Page 1 CS 236 Online 6. Application Software Security Why it’s important: –Security flaws in applications are increasingly the attacker’s entry.
Security Defined “Freedom from undesirable events”. (Neumann) There are usually three elements to security :  Confidentiality  Integrity  Availability.
SE-1021 Software Engineering II
CSCE 548 Secure Software Development Risk-Based Security Testing
Security+ All-In-One Edition Chapter 1 – General Security Concepts
Security Standard: “reasonable security”
Software Security Testing
Outline Introduction Principles for secure software
A Security Review Process for Existing Software Applications
Research for Cyber Security Warwick University Industry Day 2018
How to Mitigate the Consequences What are the Countermeasures?
Topic 5: Communication and the Internet
O.S. Security.
6. Application Software Security
Presentation transcript:

© 2003 CigitalSSI 2003 Getting Past Why Architecture is the Key to Software Security Gary McGraw, Ph.D. CTO, Cigital

© 2003 CigitalSSI 2003 Old school security is reactive Defend the perimeter with a firewall To keep stuff out Over-rely on crypto We use SSL Review products when theyre done Why your code is bad Promulgate penetrate and patch Disallow advanced technologies Extensible systems (Java and.NET) are dangerous The fat guy with keys does not really understand software development.

© 2003 CigitalSSI 2003 Modern security is about managing risks There is no such thing as 100% secure Must make tradeoffs Should be business decisions Proactive security is about building things right Design for security Security analysis Secure coding practice Security testing Its all about the software Most security problems are caused by software bugs and flaws We must build secure software Software vulnerability reports to CERT/CC

© 2003 CigitalSSI 2003 Software Security Pitfalls

© 2003 CigitalSSI 2003 Technology choices are glossed Language (#1) C/C++ Java, C# Perl, python, PHP Operating system Windows 9X Windows NT/XP Unix flavors The environment in which software operates is critical Container systems CORBA EJB DCOM Authentication mechanism Biometrics Password systems Tokens Smart cards PCI keys Network b (wireless)

© 2003 CigitalSSI 2003 Sociology problems Most security organizations are made up of network security people MIS, IT focus CISSP Network people do not often understand software development Code reviews alone do not cut it! Most development shops have good intentions, but little security knowledge Want to build stuff No good knowledge source See security review as a waste of time and a big hassle Software security is currently nobodys job.

© 2003 CigitalSSI 2003 Security problems are complicated IMPLEMENTATION BUGS THAT PROBLEM String format One-stage attacks Race conditions TOCTOU (time of check to time of use) Unsafe environment variables Unsafe system calls System() Untrusted input problems ARCHITECTURAL FLAWS Misuse of cryptography Privileged block protection failure Catastrophic security failure (fragility) Type safety confusion error Insecure auditing Broken or illogical access control

© 2003 CigitalSSI 2003 FLAW: Architectural problems with Java Javas classloading architecture flawed Separate instantiate class from manage name spaces Every release had problems March 96: JDK 1.0 March 97: JDK July 98: JDK 1.2 What is Java anyway? (and what is.NET?!) J2EE J2SE JavaCard J2ME MicroChai TINI More resources

© 2003 CigitalSSI 2003 Principles and Guidelines for Better Design

© 2003 CigitalSSI 2003 Reaching for the brass ring Design for security is critical Teaching people HOW to do this is very hard Apprenticeship is the state of the art today Guidelines can help (but tend to be unsatisfyingly high level) Guidelines can help, but are no magic bullet

© 2003 CigitalSSI 2003 Ten guiding principles for secure design 1. Secure the weakest link 2. Practice defense in depth 3. Fail securely 4. Follow the principle of least privilege 5. Compartmentalize 6. Keep it simple 7. Promote privacy 8. Remember that hiding secrets is hard 9. Be reluctant to trust 10. Use your community resources

© 2003 CigitalSSI 2003 Twelve guidelines for writing safer Java 1. dont depend on initialization 2. limit access to entities 3. make everything final 4. dont depend on package scope 5. dont use inner classes 6. avoid signing your code 7. put all signed code in one archive 8. make classes uncloneable 9. make classes unserializeable 10. make classes undeserializeable 11. dont compare classes by name 12. dont store secrets

© 2003 CigitalSSI 2003 Problem: Serialization While serialized, objects arent protected by access controls An attacker can read or modify the object in its serialized form An attacker can create a serialized representation from scratch to insert into the system with bad data Serialized data can be modified in several ways Extending objects and overriding read/writeObject() Extending ObjectInputStream/ObjectOutputStream Capturing the data through network monitoring

© 2003 CigitalSSI 2003 Fix: Serialization Declare sensitive fields as transient if possible If class will be serialized Implement final writeObject() and readObject() methods to prevent subclasses overriding Make sure readObject() was called - initialized set If class should not be serialized Prevent subclasses from overriding methods private final void writeObject()(ObjectOutputStream out) throws java.io.IOException { throw new java.io.IOException(Object can not be serialized); } private final void readObject()(ObjectOutputStream out) throws java.io.IOException { throw new java.io.IOException(Object can not be deserialized); }

© 2003 CigitalSSI 2003 Fix: Serialization Disallow permissions that allow modification to IO streams SerializablePermission(enableSubclassImplementation) SerializablePermission(enableSubstitution) Encrypt serialized streams At application level (key management is hard) Through network mechanisms (SSL, IPSEC) Consider using externalization as an alternative Less data is transferred Less ability for attacker to inject new classes Guidelines: Make your classes Unserializable, Make your classes Undeserializable

© 2003 CigitalSSI 2003 Why Design?

© 2003 CigitalSSI 2003 On Bricks and Walls Proper use of dangerous system calls is equivalent to using solid bricks Without an architecture, using all the right system calls wont help

© 2003 CigitalSSI 2003 On architectural analysis Designers should not do this Build a one page white board design model (like that ) Use hypothesis testing to categorize risks Threat modeling/Attack patterns Rank risks Tie to business context Suggest fixes Repeat

© 2003 CigitalSSI 2003 Defects at Each Stage of Software Development Requirements Design Testing Coding Maintenance Percentage of Defects Source: TRW

© 2003 CigitalSSI 2003 Cost of Fixing Defects at Each Stage of Software Development Requirements Design Testing Coding Maintenance 0 $3,000 $6,000 $9,000 $12,000 $15,000 Cost Per Defect Source: TRW

© 2003 CigitalSSI Security Defects Source: - The Hoover Project (n=45)

© 2003 CigitalSSI Early is Good Although benefits can be found throughout the lifecycle, earlier involvement is most beneficial Vulnerabilities are harder to address post-design System-wide changes may be required at later stages Enabling improvements can be made at design state Source: - The Hoover Project

© 2003 CigitalSSI 2003 Microsofts software security process Secure questions during interviews ConceptDesigns Complete Test plans Complete Code Complete ShipPost Ship Threat analysis Security Review Team member training Data mutation & Least Priv Tests Review old defects Check-ins checked Secure coding guidelines Use tools Security push/audit = on-going Learn & Refine External review Where we need new tools and techniques

© 2003 CigitalSSI 2003 Open Questions How is security best integrated into a standard engineering-based approach? Do all engineers need to understand security? What kind of organization can build secure software? Is expertise and experience necessary for good security analysis? Where does it come from? How does auditing designs differ from auditing source code? What role should security testing play in analysis?

© 2003 CigitalSSI 2003 Suggested research agenda Quantify, analyze, and explain bug/flaw categories Do more cost/benefit analysis proving that early is good Untangle security software from software security at the requirements stage Explain why the software security problem is growing Build tools for earlier in the lifecycle Find out how to teach this stuff Invent measures and metrics

© 2003 CigitalSSI 2003 Pointers Cigitals Software Security Group invents and practices Software Quality Management Get Building Secure Software Send So now, when we face a choice between adding features and resolving security issues, we need to choose security. -Bill Gates