IS 2620: Developing Secure Systems Building Security In Lecture 2 Jan 15, 2013.

Slides:



Advertisements
Similar presentations
Automated Software Testing: Test Execution and Review Amritha Muralidharan (axm16u)
Advertisements

Annoucements  Next labs 9 and 10 are paired for everyone. So don’t miss the lab.  There is a review session for the quiz on Monday, November 4, at 8:00.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Principles of Computer Security: CompTIA Security + ® and Beyond, Third Edition © 2012 Principles of Computer Security: CompTIA Security+ ® and Beyond,
Chapter 4 Quality Assurance in Context
Improving Cybersecurity Through Research & Innovation Dr. Steve Purser Head of Technical Competence Department European Network and Information Security.
CSCE 522 Building Secure Software. CSCE Farkas2 Reading This lecture – McGraw: Ch. 3 – G. McGraw, Software Security,
August 1, 2006 Software Security. August 1, 2006 Essential Facts Software Security != Security Features –Cryptography will not make you secure. –Application.
Security Engineering II. Problem Sources 1.Requirements definitions, omissions, and mistakes 2.System design flaws 3.Hardware implementation flaws, such.
(c) 2007 Mauro Pezzè & Michal Young Ch 1, slide 1 Software Test and Analysis in a Nutshell.
Applied Software Project Management 1 Introduction Dr. Mengxia Zhu Computer Science Department Southern Illinois University Carbondale.
Pertemuan Matakuliah: A0214/Audit Sistem Informasi Tahun: 2007.
EE694v-Verification-Lect5-1- Lecture 5 - Verification Tools Automation improves the efficiency and reliability of the verification process Some tools,
Vulnerability Assessments
TEST CASE DESIGN Prepared by: Fatih Kızkun. OUTLINE Introduction –Importance of Test –Essential Test Case Development A Variety of Test Methods –Risk.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
Secure Software Development Chapter 2 Rasool Jalili & M.S. Dousti Dept. of Computer Engineering Fall 2010.
System/Software Testing
SEC835 Database and Web application security Information Security Architecture.
Secure Software Development SW Penetration Testing Chapter 6 Rasool Jalili & M.S. Dousti Dept. of Computer Engineering Fall 2010.
Software Project Management Lecture # 8. Outline Chapter 25 – Risk Management  What is Risk Management  Risk Management Strategies  Software Risks.
CSCE 548 Secure Software Development Risk-Based Security Testing.
Software Quality Assurance Lecture #8 By: Faraz Ahmed.
Information Systems Security Computer System Life Cycle Security.
CS 501: Software Engineering Fall 1999 Lecture 16 Verification and Validation.
Discussing “Risk Analysis in Software Design” 1 FEB Joe Combs.
A Security Review Process for Existing Software Applications
Software Project Management Lecture # 8. Outline Earned Value Analysis (Chapter 24) Topics from Chapter 25.
CSCE 548 Secure Software Development Test 1 Review.
Software Engineering Chapter 23 Software Testing Ku-Yaw Chang Assistant Professor Department of Computer Science and Information.
1 Debugging and Testing Overview Defensive Programming The goal is to prevent failures Debugging The goal is to find cause of failures and fix it Testing.
CSCE 548 Code Review. CSCE Farkas2 Reading This lecture: – McGraw: Chapter 4 – Recommended: Best Practices for Peer Code Review,
Computer Security and Penetration Testing
Version 02U-1 Computer Security: Art and Science1 Penetration Testing by Brad Arkin Scott Stender and Gary McGraw.
What is a Business Analyst? A Business Analyst is someone who works as a liaison among stakeholders in order to elicit, analyze, communicate and validate.
Intent Specification Intent Specification is used in SpecTRM
Testing Workflow In the Unified Process and Agile/Scrum processes.
CSCE 522 Secure Software Development Best Practices.
APPLICATION PENETRATION TESTING Author: Herbert H. Thompson Presentation by: Nancy Cohen.
1 ITGD 2202 Supervision:- Assistant Professor Dr. Sana’a Wafa Al-Sayegh Dr. Sana’a Wafa Al-SayeghStudent: Anwaar Ahmed Abu-AlQumboz.
CSCE 548 Secure Software Development Taxonomy of Coding Errors.
CSCE 548 Building Secure Software. CSCE Farkas2 Reading This lecture: – McGraw: Chapter 1 – Recommended: CyberInsecurity: The Cost of Monopoly,
Linux Security. Authors:- Advanced Linux Programming by Mark Mitchell, Jeffrey Oldham, and Alex Samuel, of CodeSourcery LLC published by New Riders Publishing.
CSCE 522 Secure Software Development Best Practices.
What is Testing? Testing is the process of finding errors in the system implementation. –The intent of testing is to find problems with the system.
CSCE 548 Secure Software Development Security Operations.
LECTURE 20 26/11/15. Summary - Testing ◦ Testing affects all stages of software engineering cycle ◦ One strategy is a bottom-up approach – class, integration,
Chapter 1: Fundamental of Testing Systems Testing & Evaluation (MNN1063)
CSCE 201 Secure Software Development Best Practices.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
Slide 1 Security Engineering. Slide 2 Objectives l To introduce issues that must be considered in the specification and design of secure software l To.
Software Quality Assurance and Testing Fazal Rehman Shamil.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
Exceptions Lecture 11 COMP 401, Fall /25/2014.
By Ramesh Mannava.  Overview  Introduction  10 secure software engineering topics  Agile development with security development activities  Conclusion.
© NALO Solutions Limited NALO Solutions, presents the – Revenue Collector App Using Mobile Phones to gather Revenue SOFTWARE ENGINEERING.
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.
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 _____________,
SE-1021 Software Engineering II
CSCE 548 Secure Software Development Risk-Based Security Testing
Security Testing Methods
Software Security Testing
A Security Review Process for Existing Software Applications
CSCE 548 Secure Software Development Test 1 Review
Verification and Validation Unit Testing
Software Security Building Security In
Testing and Test-Driven Development CSC 4700 Software Engineering
Risk Management CSCE 489/689 (Software Security) Fall 2018
Baisc Of Software Testing
IS2621/TEL3813 Security Management
Presentation transcript:

IS 2620: Developing Secure Systems Building Security In Lecture 2 Jan 15, 2013

Software Security Renewed interest “idea of engineering software so that it continues to function correctly under malicious attack” Existing software is riddled with design flaws and implementation bugs “any program, no matter how innocuous it seems, can harbor security holes” (Check the CBI report)

Software Problem More than half of the vulnerabilities are due to buffer overruns Others such as race conditions, design flaws are equally prevalent # vulnerabilities Reported by CERT/CC

Software security It is about Understanding software-induced security risks and how to manage them Leveraging software engineering practice, thinking security early in the software lifecyle Knowing and understanding common problems Designing for security Subjecting all software artifacts to thorough objective risk analyses and testing It is a knowledge intensive field

Trinity of trouble Bigger problem today.. And growing Three trends Connectivity Inter networked Include SCADA (supervisory control and data acquisition systems) Automated attacks, botnets Extensibility Mobile code – functionality evolves incrementally Web/Os Extensibility Complexity XP is at least 40 M lines of code Add to that use of unsafe languages (C/C++)

It boils down to … more code, more bugs, more security problems

Security problems in software Defect implementation and design vulnerabilities Can remain dormant Bug An implementation level software problem Flaw A problem at a deeper level Bugs + Flaws leads to Risk BugFlaw Buffer overflow: stack smashing Buffer overflow: one-stage attacks Buffer overflow: string format attacks Race conditions: TOCTOU Unsafe environment variables Unsafe system calls (fork(), exec(), system()) Incorrect input validation (black list vs. white list Method over-riding problems (subclass issues) Compartmentalization problems in design Privileged block protection failure (DoPrivilege()) Error-handling problems (fails open) Type safety confusion error Insecure audit log design Broken or illogical access control (role-based access control [RBAC] over tiers) Signing too much code

Solution … Three pillars of security

Pillar I: Applied Risk management Architectural risk analysis Sometimes called threat modeling or security design analysis Is a best practice and is a touchpoint Risk management framework Considers risk analysis and mitigation as a full life cycle activity

Pillar II: Software Security Touchpoints “Software security is not security software” Software security is system-wide issues (security mechanisms and design security) Emergent property Touchpoints in order of effectiveness (based on experience) Code review (bugs) Architectural risk analysis (flaws) These two can be swapped Penetration testing Risk-based security tests Abuse cases Security requirements Security operations

Pillar II: (contd.) Many organization Penetration first Is a reactive approach CR and ARA can be switched however skipping one solves only half of the problem Big organization may adopt these touchpoints simultaneously

Pillar II: (contd.) Software security best practices applied to various software artifacts

Pillar II: (contd.) Microsoft’s move..

Pillar II: (contd.) System-wide Issue System-wide Issue Emergent Property Emergent Property Software Security account for Security Mechanisms Design for Security Process models Apply Security Touchpoints (Process-Agnostic) Apply Security Touchpoints (Process-Agnostic) iCMM XP RUP CMMI

Pillar III: Knowledge Involves Gathering, encapsulating, and sharing security knowledge Software security knowledge catalogs Principles Guidelines Rules Vulnerabilities Exploits Attack patterns Historical risks Can be put into three categories Prescriptive knowledge Diagnostic knowledge Historical knowledge

Pillar III: Knowledge catalogs to s/w artifacts

Risk management framework: Five Stages RMF occurs in parallel with SDLC activities Understand the Business context Understand the Business context Identify the Business and Technical Risk Identify the Business and Technical Risk Artifact Analysis Synthesize and Rank the Risks Synthesize and Rank the Risks Define the Risk Mitigation Strategy Define the Risk Mitigation Strategy Carry out fixes And validate Carry out fixes And validate Business Context Measurement and reporting

Stage 1: Understand Business Context Risk management Occurs in a business context Affected by business motivation Key activity of an analyst Extract and describe business goals – clearly Increasing revenue; reducing dev cost; meeting SLAs; generating high return on investment (ROI) Set priorities Understand circumstances Bottomline – answer the question who cares?

Stage 2: Identify the business & technical risks Business risks have impact Direct financial loss; loss of reputation; violation of customer or regulatory requirements; increase in development cost Severity of risks Should be capture in financial or project management terms Key is – tie technical risks to business context

Stage 3: Synthesize and rank the risks Prioritize the risks alongside the business goals Assign risks appropriate weights for resolution Risk metrics Risk likelihood Risk impact Number of risks mitigated over time

Stage 4: Risk Mitigation Strategy Develop a coherent strategy For mitigating risks In cost effective manner; account for  CostImplementation time  CompletenessImpact  Likelihood of success A mitigation strategy should Be developed within the business context Be based on what the organization can afford, integrate and understand Must directly identify validation techniques

Stage 5: Carry out Fixes and Validate Execute the chosen mitigation strategy Rectify the artifacts Measure completeness Estimate Progress, residual risks Validate that risks have been mitigated Testing can be used to demonstrate Develop confidence that unacceptable risk does not remain

RMF - A Multi-loop Risk management is a continuous process Five stages may need to be applied many times Ordering may be interleaved in different ways Risk can emerge at any time in SDLC  One way – apply in each phase of SDLC Risk can be found between stages Level of application Primary – project level Each stage must capture complete project SDLC phase level Artifact level It is important to know that RM is Cumulative At times arbitrary and difficult to predict

Seven Touchpoints

Cost of fixing defect at each stage

Code review Focus is on implementation bugs Essentially those that static analysis can find Security bugs are real problems – but architectural flaws are just as big a problem Code review can capture only half of the problems E.g. Buffer overflow bug in a particular line of code Architectural problems are very difficult to find by looking at the code Specially true for today’s large software

Code review Taxonomy of coding errors Input validation and representation Some source of problems  Metacharacters, alternate encodings, numeric representations  Forgetting input validation  Trusting input too much  Example: buffer overflow; integer overflow API abuse API represents contract between caller and callee E.g., failure to enforce principle of least privilege Security features Getting right security features is difficult E.g., insecure randomness, password management, authentication, access control, cryptography, privilege management, etc.

Code review Taxonomy of coding errors Time and state Typical race condition issues E.g., TOCTOU; deadlock Error handling Security defects related to error handling are very common Two ways  Forget to handle errors or handling them roughly  Produce errors that either give out way too much information or so radioactive no one wants to handle them E.g., unchecked error value; empty catch block

Code review Taxonomy of coding errors Code quality Poor code quality leads to unpredictable behavior Poor usability Allows attacker to stress the system in unexpected ways E.g., Double free; memory leak Encapsulation Object oriented approach Include boundaries E.g., comparing classes by name Environment Everything outside of the code but is important for the security of the software E.g., password in configuration file (hardwired)

Code review Static analysis tools False negative (wrong sense of security) A sound tool does not generate false negatives False positives Some examples ITS4 (It’s The Software Stupid Security Scanner); RATS; Flawfinder

Rules overlap

Cigital Static analysis process

Architectural risk analysis Design flaws about 50% of security problem Can’t be found by looking at code A higher level of understanding required Risk analysis Track risk over time Quantify impact Link system-level concerns to probability and impact measures Fits with the RMF

ARA within RMF Understand the Business context Understand the Business context Synthesize and Rank the Risks Synthesize and Rank the Risks Define the Risk Mitigation Strategy Define the Risk Mitigation Strategy Validate the artifacts Validate the artifacts Business Context Fix the artifacts 6 Validation loop Identify the Business Risk Identify the Business Risk Artifact Analysis 2 Identify the Technical Risk Identify the Technical Risk Artifact Analysis 3 Technical expertise Measurement and reporting Initiate process improvement Initiate process improvement

ARA process Figure 5-4

ARA process Attack resistance analysis Steps Identify general flaws using secure design literature and checklists  Knowledge base of historical risks useful Map attack patterns using either the results of abuse case or a list of attack patterns Identify risk based on checklist Understand and demonstrate the viability of these known attacks  Use exploit graph or attack graph - Note: particularly good for finding known problems

ARA process Ambiguity analysis Discover new risks – creativity requried A group of analyst and experience helps – use multiple points of view Unify understanding after independent analysis Uncover ambiguity and inconsistencies Weakness analysis Assess the impact of external software dependencies Modern software is built on top of middleware such as.NET and J2EE Use DLLs or common libraries Need to consider COTS Framework Network topology Platform Physical environment Build environment

Software penetration testing Most commonly used today Currently Outside->in approach Better to do after code review and ARA As part of final preparation acceptance regimen One major limitation Almost always a too-little-too-late attempt at the end of a development cycle  Fixing things at this stage  May be very expensive  Reactive and defensive

Software penetration testing A better approach Penetration testing from the beginning and throughout the life cycle Penetration test should be driven by perceived risk Best suited for finding configuration problems and other environmental factors Make use of tools Takes care of majority of grunt work Tool output lends itself to metrics Eg.,  fault injection tools;  attacker’s toolkit: disassemblers and decompilers; coverage tools monitors

Risk based security testing Testing must be Risk-based grounded in both the system’s architectural reality and the attacker’s mindset Better than classical black box testing Different from penetration testing Level of approach Timing of testing  Penetration testing is primarily on completed software in operating environment; outside->in

Risk based security testing Security testing Should start at feature or component/unit level testing Must involve two diverse approaches Functional security testing  Testing security mechanisms to ensure that their functionality is properly implemented Adversarial security testing  Performing risk-based security testing motivated by understanding and simulating the attacker’s approach

Abuse cases Creating anti-requirements Important to think about Things that you don’t want your software to do Requires: security analysis + requirement analysis Anti-requirements Provide insight into how a malicious user, attacker, thrill seeker, competitor can abuse your system Considered throughout the lifecyle  indicate what happens when a required security function is not included

Abuse cases Creating an attack model Based on known attacks and attack types Do the following Select attack patterns relevant to your system – build abuse case around the attack patterns Include anyone who can gain access to the system because threats must encompass all potential sources Also need to model attacker

Abuse cases Figure 8-1

Security requirements and operations Security requirements Difficult tasks Should cover both overt functional security and emergent characteristics Use requirements engineering approach Security operations Integrate security operations E.g., software security should be integrated with network security