(General purpose) Program security. What does it mean for a pgm to be secure? Depends whom you ask. Takes a long time to break its security controls.



Similar documents
CS574 Computer Security. San Diego State University Spring 2008 Lecture #7

Introduction to Security

CS52600: Information Security

CS 392/681 - Computer Security. Module 16 Vulnerability Analysis

Threats and Attacks. Modifications by Prof. Dong Xuan and Adam C. Champion. Principles of Information Security, 5th Edition 1

SY system so that an unauthorized individual can take over an authorized session, or to disrupt service to authorized users.

Malware: Malicious Code

FINAL DoIT v.4 PAYMENT CARD INDUSTRY DATA SECURITY STANDARDS APPLICATION DEVELOPMENT AND MAINTENANCE PROCEDURES

Department of Computer & Information Sciences. INFO-450: Information Systems Security Syllabus

CMSC 421, Operating Systems. Fall Security. URL: Dr. Kalpakis

Malicious Software. Ola Flygt Växjö University, Sweden Viruses and Related Threats

Security+ Guide to Network Security Fundamentals, Third Edition. Chapter 2 Systems Threats and Risks

3. Broken Account and Session Management. 4. Cross-Site Scripting (XSS) Flaws. Web browsers execute code sent from websites. Account Management

Network and Host-based Vulnerability Assessment

Integrated Network Vulnerability Scanning & Penetration Testing SAINTcorporation.com

Malicious Programs. CEN 448 Security and Internet Protocols Chapter 19 Malicious Software

Network Incident Report

Computer Security Threats

Worms, Trojan Horses and Root Kits

Malware. Björn Victor 1 Feb [Based on Stallings&Brown]

E-BUSINESS THREATS AND SOLUTIONS

What Do You Mean My Cloud Data Isn t Secure?

BOTNETS. Douwe Leguit, Manager Knowledge Center GOVCERT.NL

BBM 461: SECURE PROGRAMMING INTRODUCTION. Ahmet Burak Can

CSE331: Introduction to Networks and Security. Lecture 32 Fall 2004

Computer Security DD2395

Security. Definitions

Contact details For contacting ENISA or for general enquiries on information security awareness matters, please use the following details:

Understanding Computer Viruses: What They Can Do, Why People Write Them and How to Defend Against Them

Overview. Common Internet Threats. Spear Phishing / Whaling. Phishing Sites. Virus: Pentagon Attack. Viruses & Worms

NEW JERSEY STATE POLICE EXAMPLES OF CRIMINAL INTENT

Source Code Security Analysis Tool Functional Specification Version 1.0

Recommended Practice Case Study: Cross-Site Scripting. February 2007

10- Assume you open your credit card bill and see several large unauthorized charges unfortunately you may have been the victim of (identity theft)

Hacking Book 1: Attack Phases. Chapter 1: Introduction to Ethical Hacking

WEB SECURITY. Oriana Kondakciu Software Engineering 4C03 Project

Online Security Awareness - UAE Exchange - Foreign Exchange Send Money UAE Exchange

Payment Card Industry (PCI) Terminal Software Security. Best Practices

Spam, Spyware, Malware and You! Don't give up just yet! Presented by: Mervin Istace Provincial Library Saskatchewan Learning

E-commerce. Security. Learning objectives. Internet Security Issues: Overview. Managing Risk-1. Managing Risk-2. Computer Security Classifications

CS549: Cryptography and Network Security

FORBIDDEN - Ethical Hacking Workshop Duration

WEB ATTACKS AND COUNTERMEASURES

Computer Security. Principles and Practice. Second Edition. Amp Kumar Bhattacharjee. Lawrie Brown. Mick Bauer. William Stailings

The purpose of this report is to educate our prospective clients about capabilities of Hackers Locked.

Web Application Penetration Testing

Advanced Endpoint Protection Overview

CompTIA Security+ (Exam SY0-410)

Discovering passwords in the memory

- Table of Contents -

Tutorial on Smartphone Security

ZNetLive Malware Monitoring

CISSP: Application Security. Presented by Pascal Meunier, M.Sc., Ph.D., CISSP Purdue University CERIAS August 21, 2007

Application Intrusion Detection

WORMS HALMSTAD UNIVERSITY. Network Security. Network Design and Computer Management. Project Title:

Executable Integrity Verification

When you listen to the news, you hear about many different forms of computer infection(s). The most common are:

Secure Web Application Coding Team Introductory Meeting December 1, :00 2:00PM Bits & Pieces Room, Sansom West Room 306 Agenda

Module 5: Analytical Writing

SECURITY TRENDS & VULNERABILITIES REVIEW 2015

Columbia University Web Security Standards and Practices. Objective and Scope

Chapter 15 Operating System Security

Certified Ethical Hacker Exam Version Comparison. Version Comparison

Operating Systems Principles

Top Ten Cyber Threats

Loophole+ with Ethical Hacking and Penetration Testing

How To Protect A Network From Attack From A Hacker (Hbss)

A Systems Engineering Approach to Developing Cyber Security Professionals

Is Drupal secure? A high-level perspective on web vulnerabilities, Drupal s solutions, and how to maintain site security

Security A to Z the most important terms

Network Threats and Vulnerabilities. Ed Crowley

Spyware. Michael Glenn Technology Management 2004 Qwest Communications International Inc.

Homeland Security Red Teaming

Spyware. Summary. Overview of Spyware. Who Is Spying?

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering

Auditing a Web Application. Brad Ruppert. SANS Technology Institute GWAS Presentation 1

HoneyBOT User Guide A Windows based honeypot solution

Using Foundstone CookieDigger to Analyze Web Session Management

Threat Events: Software Attacks (cont.)

Certified Cyber Security Expert V Web Application Development

Soran University Faculty of Science and Engineering Computer Science Department Information Security Module Specification

Developing A Successful Patch Management Process

What s Wrong with Information Security Today? You are looking in the wrong places for the wrong things.

QuickBooks Online: Security & Infrastructure

What is Web Security? Motivation

CDM Software Asset Management (SWAM) Capability

Information Resource Management Directive USAP Software Management and Protection

Malicious Software. Malicious Software. Overview. Backdoor or Trapdoor. Raj Jain. Washington University in St. Louis

Chapter 4 Application, Data and Host Security

Transcription:

(General purpose) Program security These ideas apply also to OS and DB. Read Chapter 3. What does it mean for a pgm to be secure? Depends whom you ask. Takes a long time to break its security controls. Has run for 9 weeks with no failure. Contains no potential security flaw. A program fault is an unexpected (bad) behavior of a pgm Which program is more secure? 1. pgm with 100 faults discovered and fixed. 2. a similar pgm with 20 faults discovered and fixed. 1

Early computer security was penetrate and patch. Not a good solution because: narrow focus on a fault ignores the context. fault may have nonobvious side effects. fixing one problem may cause another. fault not fixed because the fixed system wouldn t work. 2

A better approach to computer security (via software engineering). Program security flaw = pgm behavior not what designers intended or users expected. Flaws may be either inadvertent human errors or malicious, intentional flaws. Unintentional human error are more common than deliberate malicious ones, and they cause more damage. Computer security terms differ IEEE standard terms: error, fault, failure 3

Program security is hard and we can t avoid all flaws because: pgms are complicated; it is hard to describe all unexpected behavior. A thm in CS 526 says that it is NP-complete to decide whether a program is secure. software engineering advances faster than security But we can still do something and make most programs secure. 4

Landwehr et al. [1994] classified flaws as: Intentional flaws 1. malicious 2. nonmalicious Inadvertent errors: 1. validation: incomplete or inconsistent permission check 2. domain: controlled access to data 3. serialization and aliasing: program flow order 4. failed authorization due to bad identification/authentication 5. boundary condition violation: first or last case failure 6. other exploitable logic errors 5

Three classic nonmalicious program errors (pre- Internet) 1. Buffer overflows Memory is finite and so are arrays and strings (buffers). Example: int buff[10]; for (i=0; i<10; i++) buff[i]=2; buff[10]=3; The last instruction may write 3 into 1. the user s data 2. the user s program code 3. another user s data 4. another user s program code 5. system data 6. system program code 6

A malicious attacker who knows about a buffer overflow error in a program he can use may use the error to write malicious code. Data may become code. Overflow a stack to change parameters. Example: passwd, browser URL parameter Control: test after each input character; OS memory protection. Control: use only string utilities with bounded length. Control: paging may help: different pages for intructions and data. 7

2. Incomplete mediation (checking) Not checking whether input data is valid or in range. Example: date 17 Jan 2012 okay, 37 Jat 1843 not okay. Control: check input correctness or use dropdown box. Example: Ebusiness, order form returns total price, and customer changes it. 8

3. Time-of-check to time-of-use error. Synchronization problem Check before use; approve in work ticket ; user changes the request in the ticket before the order is executed. Example: open file (one you may open); after approval, change file name to one you may not open. Control: copy the ticket so the user can t access it. If it is too big to copy and must remain accessible to the user, then save its hash value. 9

Undocumented access point. Often added during pgm development for testing. Also called a back door or trap door. May be added by an intruder who succeeded once. Control: document it; careful code checking. 10

Integer overflow. Consider 16-bit unsigned integer case. Max value is 2 16 1 = 65535, so 65535 + 1 = 0. Do not loop until i = 65536 or while i < 65536, because that will never hold or aways hold. Control: know the limits for each size of integer. 11

Null-terminated strings have variable length. A C pgm that uses such a string does not know its length until it reads the whole string. Java stores the length of a variable string separately. Control: use only C string utilities with bounded length. Use strncpy(to,from,max), not strcpy(to,from). 12

Race condition or serialization flaw. Two processes running concurrently. Example. Two ticket agents selling a seat on the same flight. Example. Tripwire chooses a name for its log file, checks to see whether that name exists, and then writes into it. An attacker changes the name to the system log file and hides his work. 13

So far, we have discussed mostly unintentional mistakes. Malicious code A computer may get malicious code during installation of (good) code, setup, or download of other code. Malicious code runs as you and can do anything you can. Malicious code has been around at least since 1970. 14

Malware definitions Malicious code = rogue program = whole program or code that does unexpected or unintended actions caused by an agent intent on damage. agent = person who wrote or distributed the malicious code. virus = malicious code that can replicate itself by modifying nonmalicious code. transient virus = virus that stops when its attached program stops. resident virus = virus that puts itself in memory and keeps going even when its attached program stops. 15

Worm = whole program that spreads copies of itself through a network, does not attach to other programs. Bot (sort of robot) = worm used in huge numbers. Some are benign and search the web for search engine hosts. Trojan horse = malicious code that has a benign primary effect and a nonobvious malicious effect. Example: passwd, editor, compiler 16

Rabbit = virus or worm that replicates without bound, exhausting time or memory. Logic bomb = malicious code that does something bad when a condition happens (a file is opened). Time bomb = logic bomb with a certain date/- time as condition Dropper = pgm that just copies other malware, like a virus. 17

Trapdoor = backdoor = program feature that lets anyone have special privileges by entering a secret code. Example: ATM program with secret PIN May be used for maintenance or to erase record of crime Script attack = malicious code in JavaScript that is downloaded with a page. 18

Spyware = pgm that intercepts and secretly communicates user activities, like login info. Zombie = malware under control of a remote pgm. It sleeps until activated. Browser hijacker = code that redirects a browser to another site. Rootkit = code installed in root of OS; hard to detect. 19

Tool or toolkit = pgm with a set of tests for vulnerabilities. Each successful test identifies a vulnerable host that can be attacked. Scareware = false warning of malware attack; may suggest remedial action to fix a problem, but actually creates one. 20