SECURE PROGRAMMING Chapter 1. Overview What is the problem Cost? Threat? Software Security Concepts Policy Flaws Vulnerabilities Exploits Mitigations.

Slides:



Advertisements
Similar presentations
1 The C Language An International Standard CIS2450 Professional Aspect of Software Engineering.
Advertisements

By Hiranmayi Pai Neeraj Jain
Engineering Secure Software. Does Security Even Matter?  At your table, introduce yourselves: Your name, degree, & app domain What is your favorite software.
Security and Open Source: the 2-Edged Sword Crispin Cowan, Ph.D WireX Communications, Inc wirex.com.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 20 Slide 1 Critical systems development.
1 Topic 1 – Lesson 3 Network Attacks Summary. 2 Questions ► Compare passive attacks and active attacks ► How do packet sniffers work? How to mitigate?
Chapter 1 Introduction. Chapter Overview Overview of Operating Systems Secure Operating Systems Basic Concepts in Information Security Design of a Secure.
SIRT Contact Orientation Security Incident Response Team Departmental Security Contacts April 16, 2004.
Reliability and Security. Security How big a problem is security? Perfect security is unattainable Security in the context of a socio- technical system.
Chapter 4 Hackers: How they get into Computers. Synopsis (I) What is a hacker? What is a cracker and what is the difference? Who are the crackers? What.
Computer Security and Penetration Testing
Internet Quarantine: Requirements for Containing Self-Propagating Code David Moore et. al. University of California, San Diego.
Secure Coding in C and C++ Chapter 1 Running with Scissors.
C++ for Java Programmers Chapter 1 Basic Philosophical Differences.
Java Security. Topics Intro to the Java Sandbox Language Level Security Run Time Security Evolution of Security Sandbox Models The Security Manager.
Malicious Code Brian E. Brzezicki. Malicious Code (from Chapter 13 and 11)
CSCE 548 Secure Software Development Risk-Based Security Testing.
Separate your corporate environment from unknown threats of the WEB. Define trusted WEB policy. Enforce the use of WEB browsers. Automatically distribute.
Introduction to Computer Ethics
Computer Security and Penetration Testing
Detection and Prevention of Buffer Overflow Exploit Cai Jun Anti-Virus Section Manager R&D Department Beijing Rising Tech. Corp. LTD.
Buffer Overflows Lesson 14. Example of poor programming/errors Buffer Overflows result of poor programming practice use of functions such as gets and.
1 Internet Browsing Vulnerabilities and Security ECE4112 Final Lab Ye Yan Frank Park Scott Kim Neil Joshi.
CHAPTER 14 Viruses, Trojan Horses and Worms. INTRODUCTION Viruses, Trojan Horses and worm are malicious programs that can cause damage to information.
CPT 123 Internet Skills Class Notes Internet Security Session A.
Testing Methods Carl Smith National Certificate Year 2 – Unit 4.
Security - Why Bother? Your projects in this class are not likely to be used for some critical infrastructure or real-world sensitive data. Why should.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Lecture 19 Page 1 CS 236 Online 16. Account Monitoring and Control Why it’s important: –Inactive accounts are often attacker’s path into your system –Nobody’s.
Security+ Guide to Network Security Fundamentals, Third Edition Chapter 9 Performing Vulnerability Assessments.
Security. Security Flaws Errors that can be exploited by attackers Constantly exploited.
The course. Description Computer systems programming using the C language – And possibly a little C++ Translation of C into assembly language Introduction.
Computer security By Isabelle Cooper.
1 Chapter 26 Cleanroom Software Engineering Cleanroom Developed in early 80’s by Harlan Mills Reported very good results –reliable, high-quality.
A Global Approach to Protecting the Global Critical Infrastructure Dr. Stephen D. Bryen.
November 19, 2008 CSC 682 Use of Virtualization to Thwart Malware Written by: Ryan Lehan Presented by: Ryan Lehan Directed By: Ryan Lehan Produced By:
Lesson 19-E-Commerce Security Needs. Overview Understand e-commerce services. Understand the importance of availability. Implement client-side security.
1 Debugging and Syntax Errors in C++. 2 Debugging – a process of finding and fixing bugs (errors or mistakes) in a computer program.
Computer Security The World of Cyber Crime Presentation Details This presentation will explain the purpose of bypassing security or stealing information.
Introduction and Overview of Information Security and Policy By: Hashem Alaidaros 4/10/2015 Lecture 1 IS 332.
Computer Security By Duncan Hall.
Understand Malware LESSON Security Fundamentals.
COP 3275 Chapter 01 course website: Jonathan C.L. Liu, Ph.D. CISE Department University of Florida.
Role Of Network IDS in Network Perimeter Defense.
Announcements You will receive your scores back for Assignment 2 this week. You will have an opportunity to correct your code and resubmit it for partial.
Writing Secure Programs. Program Security CSCE Farkas/Eastman - Fall Program Flaws Taxonomy of flaws: how (genesis) when (time) where (location)
VM: Chapter 7 Buffer Overflows. csci5233 computer security & integrity (VM: Ch. 7) 2 Outline Impact of buffer overflows What is a buffer overflow? Types.
Chapter 10 Chapter 10 Implementing Subprograms. Implementing Subprograms  The subprogram call and return operations are together called subprogram linkage.
Engineering Secure Software. Does Security Even Matter?  Find two other people near you Introduce yourself What is your favorite software development.
©2015 Check Point Software Technologies Ltd. 1 [Restricted] ONLY for designated groups and individuals CHECK POINT MOBILE THREAT PREVENTION.
Securing a Host Computer BY STEPHEN GOSNER. Definition of a Host  Host  In networking, a host is any device that has an IP address.  Hosts include.
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 _____________,
Classic Buffer OVERFLOW ATTACKS CSCE 548 Student Presentation Mouiad Al Wahah.
HIPS. Host-Based Intrusion Prevention Systems  One of the major benefits to HIPS technology is the ability to identify and stop known and unknown attacks,
Botnets A collection of compromised machines
Buffer Overflows Incomplete Access Control
CMSC 345 Defensive Programming Practices from Software Engineering 6th Edition by Ian Sommerville.
CSCE 548 Secure Software Development Risk-Based Security Testing
Introduction Edited by Enas Naffar using the following textbooks: - A concise introduction to Software Engineering - Software Engineering for students-
Types for Programs and Proofs
Various Types of Malware
Choosing Technologies
Understand Core Security Principles
Botnets A collection of compromised machines
Introduction Edited by Enas Naffar using the following textbooks: - A concise introduction to Software Engineering - Software Engineering for students-
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Engineering Secure Software
Buffer Overflow Slide Set #7 Textbook Chapter 10 Clicker Questions
16. Account Monitoring and Control
Presentation transcript:

SECURE PROGRAMMING Chapter 1

Overview What is the problem Cost? Threat? Software Security Concepts Policy Flaws Vulnerabilities Exploits Mitigations C and C++ Brief History What is the problem? Legacy code Other languages Development platforms Operating Systems Compilers Summary

Conficker, aka Downup, Downadup, Kido First detected 2008 Uses software flaws and dictionary attacks Forms a big botnet (over 1.5 million and counting)  Reached 9-15 Million in 2009 Discovered in November 2008 Exploited MS08-067, patched on October Problem example/Description

Is all malware bad? Welchia worm, aka Nachia worm exploits another Microsoft RPC service vulnerability. Vulnerability in TFTPD.EXE, on ports , buffer overflow on port 135. Payload:  Patch the vulnerability.  Run a series of Microsoft patches.  Try to remove W32/Lovsan.worm.a (MSBLAST.EXE  Self removes on January 1, 2004 or after 120 days of processing, whichever comes first.

Cost? Variable per worm: Welchia: probably minimal Blaster (estimated at more than $525 million) Conficker? ?????

Cost (2)? Difficult to gauge, due to underreporting Indirect costs are also difficult to gauge Indirect costs (loss of trust) are also difficult to gauge. Lines are blurred. Some estimates (table 1.1)

Threat? It is only increasing; malware is on the rise! More and more malware is appearing out there. I have heard (forgot where) about a marked increase in the first half of this year.

Who is the threat? Crackers/hackers Insiders Criminals Competitive Intelligence Professionals (aka Corporate spies) Terrorists Information warriors

Software Security

Security Concepts

Programmer System Integrator System Administrator Network Administrator Security Flaw Security Analyst Vulnerability=flaw + access + capability Vulnerability Analyst Security researcher Attacker aka adversary, malicious user, hacker, cracker, etc....

Security Policy “A set of rules and practices that specify or regulate how a system or organization provides security services to protect sensitive and critical system resources.” RFC 2828 Internet Security Glossary [2000] Rules and practices can be either explicit or implicit. Explicit = documented + well known + visibly enforced Implicit does not mean that they are less useful.

Flaws Software defects (bugs) → security flaws Thus, the relation between Software Engineering and Secure Programming. However Software Engineers are seldom concerned about attackers. They usually check for “reasonable inputs”, when attackers will try anything but... Identifying and prioritizing security flaws is needed, which mandates expanded tools.

Vulnerabilities “A set of conditions that allows an attacker to violate an explicit or implicit security policy.” ISO/IEC TS (C Secure Coding Rules) A flaw alone is not sufficient to cause a vulnerability. However, sometimes software designers may choose to leave a product vulnerable. (Is it no longer a flaw because it is documented?) Programs contain vulnerabilities or are vulnerable, systems/networks possess vulnerabilities.

Exploits A technique that takes advantage of a security vulnerability to violate an explicit or implicit security policy. Many forms: Malware: worms, viruses, trojans. Proof of concept

Mitigations Methods, techniques, processes, tools, runtime libraries that can prevent or limit exploits against vulnerabilities. Source code correction Turning off a port or filtering traffic. Alerting users Preferred way: Find and correct the actual defect. (Cheaper?) Alternative: stop malicious inputs

C and C++ Why C/C++ Most popular languages, most legacy code, biggest amount of vulnerabilities

Brief History ● Early 1970's Creation of C based on B, which in turn was based on BCPL ● 1966 “The Development of the C Language” (Dennis Ritchie) ● K&R “C Programming Language” published in 1978 ● 1983 ANSI – X3J11 → 1989 ISO/IEC Known as C89 ● Corrected and amended again 99 ● Descendants ● Concurrent C (Gehani 1989) ● Objective-C (Fox 1991) ● Thinking (1990 ● C++ (Stroustrup )

C++ Evolution ● C with Classes (before 1983) ● C++ ( ● 1990 exceptions and templates ● ISO runtime type identification, namespaces, standard library ● Most recent version is C++ 11

What is the problem with C? ● Flexible, lightweight, high level language, small footprint. ● Very little handled by the system, e.g: ● Array bound checking ● Checking integer overflows/truncations, ● calling functions with incorrect number of arguments,

What is the problem with C? (2) C design philosophy: C design charter, point 6: a) Trust the programmer (Trust with verification?) b) Don't prevent the programmer from doing what needs to be done c) Keep the language small and simple d) Provide only one way to do an operation. e) Make it fast, even if it is not guaranteed to be portable.

What is the Problem with C? (3) Different kinds of behaviors: ● Locale specific ● Unspecified behavior ● Implementation defined behavior ● Undefined behavior Another problem: lack of type safety: ● Lack of preservation ● Lack of progress Yet another problem: legacy code

Other languages? Java: Not a perfect solution: Still vulnerable to design and implementation level security flaws. Can mix in C/C++ Legacy code?? Legacy programmers? Other solutions: Cyclone, D

Development Platforms For the textbook and course, emphasis will be on: Languages: C C++ Operating Systems: Microsoft Windows, Linux, sometimes Unix/MAC Compilers: Visual C++, GCC

Summary ● Most software vulnerabilities caused by common programming errors. ● Patches (too many) ● Defective software is a fact of life; at best every 1000 LOC have 1-2 defects; since an OS has several million.... even application software has its problems. If only 1-2% is a vulnerability... ● Purpose of this course is learning to program securely.