




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































Dr. Leszek Lilien Department of Computer Science Western Michigan University Slides based on Security in Computing. Third Edition by Pfleeger and Pfleeger. Using some slides courtesy of: Prof. Aaron Striegel — course taught at U. of Notre Dame Prof. Barbara Endicott-Popovsky and Prof. Deborah Frincke (U. Idaho) — taught at U. Washington Prof. Jussipekka Leiwo — taught at Vrije Universiteit (Free U.), Amsterdam, The Netherlands Slides not created by the above authors are © 2006 by Leszek T. Lilien Requests to use original slides for non-profit purposes will be gladly granted upon a written request.
3.1. Secure Programs – Defining & Testing a. Introduction b. Judging S/w Security by Fixing Faults c. Judging S/w Security by Testing Pgm Behavior d. Judging S/w Security by Pgm Security Analysis e. Types of Pgm Flaws 3.2. Nonmalicious Program Errors a. Buffer overflows b. Incomplete mediation c. Time-of-check to time-of-use errors d. Combinations of nonmalicious program flaws
3.4. Controls for Security a. Introduction b. Developmental controls for security c. Operating System controls for security d. Administratrive controls for security e. Conclusions
Program security – Our first step on how to apply security to computing Protecting programs is the heart of computer security (^) All kinds of programs, from apps via OS, DBMS, networks Issues: How to keep pgms free from flaws How to protect computing resources from pgms with flaws Issues of trust not considered: How trustworthy is a pgm you buy? How to use it in its most secure way? (^) Partial answers: (^) Third-party evaluations (^) Liability and s/w warranties
3.1. Secure Programs - Defining & Testing Outline a. Introduction b. Judging S/w Security by Fixing Faults c. Judging S/w Security by Testing Pgm Behavior d. Judging S/w Security by Pgm Security Analysis e. Types of Pgm Flaws [cf. B. Endicott-Popovsky]
Pgm is secure if we trust that it provides/enforces: Confidentiality Integrity Availability What is „Program security?” Depends on who you ask user - fit for his task programmer - passes all „her” tests manager - conformance to all specs Developmental criteria for program security include: Correctness of security & other requirements Correctness of implementation Correctness of testing
b. Judging S/w Security by Fixing Faults An approach to judge s/w security: penetrate and patch Red Team / Tiger Team tries to crack s/w If you withstand the attack => security is good Is this true? Rarely. Too often developers try to quick-fix problems discovered by Tiger Team Quick patches often introduce new faults due to: Pressure – causing narrow focus on fault, not context Non-obvious side effects System performance requirements not allowing for security overhead [cf. A. Striegel]
c. Judging S/w Security by Testing Pgm Behavior (1) (^) Better approach to judging s/w security: testing pgm behavior Compare behavior vs. requirements (think testing/SW eng) Program security flaw = = inappropriate behavior caused by a pgm fault or failure Flaw detected as a fault or a failure (^) Important: If flaw detected as a failure (an effect), look for the underlying fault (the cause) Recall: fault seen by insiders, failure – by outsiders If possible, detect faults before they become failures Note: Texbook defines flaw-vulnerability-flaw in a circular way
Judging S/w Security by Testing Pgm Behavior (3) Problems with pgm behavior testing Limitations of testing Can’t test exhaustively Testing checks what the pgm should do Can’t test what the pgm should not do (^) i.e., can’t make sure that pgm does only what it should do – nothing more Complexity – malicious attacker’s best friend (^) Too complex to model / to test (^) Exponential # of pgm states / data combinations (^) a faulty line hiding in 1 0 million lines of code Evolving technology New s/w technologies appear Security techniques catching up with s/w technologies [cf. A. Striegel]
d. Judging S/w Security by Pgm Security Analysis Best approach to judging s/w security: pgm security analysis Analyze what can go wrong At every stage of program development! (^) From requirement definition to testing After deployment (^) Configurations / policies / practices Protect against security flaws Specialized security methods and techniques Specialized security tools (^) E.g., specialized security meth/tech/tools for switching s/w [cf. B. Endicott-
Outline a. Buffer overflows b. Incomplete mediation c. Time-of-check to time-of-use errors d. Combinations of nonmalicious program flaws
Buffer overflow flaw — often inadvertent (=>nonmalicious) but with serious security consequences Many languages require buffer size declaration C language statement: char sample[10]; Execute statement: sample[i] = ‘A’; where i= Out of bounds (0-9) subscript – buffer overflow occurs Some compilers don’t check for exceeding bounds C does not perform array bounds checking. Similar problem caused by pointers (^) No reasonable way to define limits for pointers [cf. B. Endicott-Popovsky]
Buffer Overflows (3) Implications of buffer overflow: Attacker can insert malicious data values/instruction codes into „overflow space” Supp. buffer overflow affects OS code area Attacker code executed as if it were OS code Attacker might need to experiment to see what happens when he inserts A into OS code area Can raise attacker’s privileges (to OS privilege level) When A is an appropriate instruction Attacker can gain full control of OS [cf. B. Endicott-Popovsky]
Buffer Overflows (4) Supp. buffer overflow affects a call stack area A scenario: Stack: [data][data][...] Pgm executes a subroutine => return address pushed onto stack (so subroutine knows where to return control to when finished) Stack: [ret_addr][data][data][...] Subroutine allocates dynamic buffer char sample[10] => buffer (10 empty spaces) pushed onto stack Stack: [..........][ret_addr][data][data][...] Subroutine executes: sample[i] = ‘A’ for i = 10 Stack: [..........][A][data][data][...] Note: ret_address overwritten by A! (Assumed: size of ret_address is 1 char)