MOPS MOdelchecking Security Properties David Wagner U.C. Berkeley.

Slides:



Advertisements
Similar presentations
1 Verification by Model Checking. 2 Part 1 : Motivation.
Advertisements

Static Analysis for Security
Current methods for negotiating firewalls for the Condor ® system Bruce Beckles (University of Cambridge Computing Service) Se-Chang Son (University of.
Mining Specifications Glenn Ammons, Dept. Computer Science University of Wisconsin Rastislav Bodik, Computer Science Division University of California,
Automatic Memory Management Noam Rinetzky Schreiber 123A /seminar/seminar1415a.html.
Ensuring Operating System Kernel Integrity with OSck By Owen S. Hofmann Alan M. Dunn Sangman Kim Indrajit Roy Emmett Witchel Kent State University College.
Computer Security: Principles and Practice EECS710: Information Security Professor Hossein Saiedian Fall 2014 Chapter 10: Buffer Overflow.
Chrome Extentions Vulnerabilities. Introduction Google Chrome Browser Chrome OS Platform Chrome Web Store Applications Open Source Platform.
Software Engineering Session 14 INFM 603. Software Software represents an aspect of reality –Input and output represent the state of the world –Software.
David Brumley, Pongsin Poosankam, Dawn Song and Jiang Zheng Presented by Nimrod Partush.
Security and Open Source: the 2-Edged Sword Crispin Cowan, Ph.D WireX Communications, Inc wirex.com.
1 Defining System Security Policies. 2 Module - Defining System Security Policies ♦ Overview An important aspect of Network management is to protect your.
Using Programmer-Written Compiler Extensions to Catch Security Holes Authors: Ken Ashcraft and Dawson Engler Presented by : Hong Chen CS590F 2/7/2007.
Some Improvements for More Precise Model Checking Zhi Zhang State Key Laboratory for Novel Software Technology Nanjing University, China.
AndroidCompiler. Layout Motivation Literature Review AndroidCompiler Future Works.
Towards a Lightweight Model of BGP Safety Matvey Arye Princeton University Joint work with: Rob Harrison, Richard Wang, Jennifer Rexford (Princeton) Pamela.
Security A system is secure if its resources are used and accessed as intended under all circumstances. It is not generally possible to achieve total security.
1 Property 3: standard file descriptors vulnerability attack.c at.c Standard File Descriptors 0:stdin 1:stdout 2:stderr close(1); close(2); execl(“at”,
Paper Prototyping.
Mimicry Attacks on Host- Based Intrusion Detection David Wagner Paolo Soto University of California at Berkeley.
#1 The Future of Software Security David Wagner U.C. Berkeley.
Why Security Testing Is Hard by Herbert H. Thompson presented by Carlos Hernandez.
Software Reliability Methods Sorin Lerner. Software reliability methods: issues What are the issues?
Software Security David Wagner University of California at Berkeley.
1 Model Checking One Million Lines of C Code Hao Chen Drew Dean (SRI International) David Wagner with David Schultz, Geoff Morrison, Ben Schwarz Jacob.
1 Security and Software Engineering Steven M. Bellovin AT&T Labs – Research
1 setuid Demystified -- Examining the API of Security Operation in OS using Formal Models Hao Chen, David Wagner UC Berkeley Drew Dean SRI International.
SDLC. Information Systems Development Terms SDLC - the development method used by most organizations today for large, complex systems Systems Analysts.
Towards High-Assurance Hypervisors Jason Franklin Joint with Anupam Datta, Sagar Chaki, Ning Qu, Arvind Seshadri.
 QUALITY ASSURANCE:  QA is defined as a procedure or set of procedures intended to ensure that a product or service under development (before work is.
Reliability of Parallel Build Systems Derrick Coetzee, George Necula UC Berkeley Creative Commons Zero Waiver: To the extent possible under law, the author,
Exceptions and Mistakes CSE788 John Eisenlohr. Big Question How can we improve the quality of concurrent software?
The Impact of Programming Language Theory on Computer Security Drew Dean Computer Science Laboratory SRI International.
Operating Systems Protection & Security.
Lecture 18 Page 1 CS 111 Online Design Principles for Secure Systems Economy Complete mediation Open design Separation of privileges Least privilege Least.
Managing Software Quality
1 Setuid Demystified Hao Chen David Wagner UC Berkeley Drew Dean SRI International.
ECE 720T5 Winter 2014 Cyber-Physical Systems Rodolfo Pellizzoni.
™ ™ © 2006, KDM Analytics Software Assurance Ecosystem and its Applications Djenana Campara Chief Executive Officer, KDM Analytics Board Director, Object.
The Protection of Information in Computer Systems Part I. Basic Principles of Information Protection Jerome Saltzer & Michael Schroeder Presented by Bert.
Bug Localization with Machine Learning Techniques Wujie Zheng
1 Vulnerability Assessment of Grid Software James A. Kupsch Computer Sciences Department University of Wisconsin Condor Week 2007 May 2, 2007.
Carnegie Mellon University 10/23/2015 Survivability Analysis via Model Checking Oleg Sheyner Jeannette Wing Carnegie Mellon University.
Model Checking an Entire Linux Distribution for Security Violations Work by Benjamin Schwarz, Hao Chen, David Wagner, Geoff Morrison, Jacob West, Jeremy.
Software Assurance Session 13 INFM 603. Bugs, process, assurance Software assurance: quality assurance for software Particularly assurance of security.
An Introduction to Software Engineering. Communication Systems.
INFO1408 Database Design Concepts Week 15: Introduction to Database Management Systems.
Linux Security. Authors:- Advanced Linux Programming by Mark Mitchell, Jeffrey Oldham, and Alex Samuel, of CodeSourcery LLC published by New Riders Publishing.
Glenn Ammons Ras Bodík Jim Larus Univ. of Wisconsin Univ. of Wisconsin Microsoft Research Mining Specifications (lots of) code  specifications.
Reasoning about programs March CSE 403, Winter 2011, Brun.
Secure Operating Systems Lesson 4: Access Control.
Design - programming Cmpe 450 Fall Dynamic Analysis Software quality Design carefully from the start Simple and clean Fewer errors Finding errors.
CS526: Information Security Chris Clifton November 4, 2003 Assurance.
1 Setuid Demystified Hao Chen David Wagner UC Berkeley Drew Dean SRI International Proceedings of the 11th USENIX Security Symposium San Francisco, California,
Speaker: Xiaojiang Du Authors: Xiali Hei, Xiaojiang Du and Shan Lin Temple University.
Secure Systems Research Group - FAU Model Checking Techniques for Security Systems 5/6/2009 Maha B Abbey PhD Candidate.
1 Model Checking One Million Lines of C Code Hao Chen, UC Berkeley Drew Dean, SRI International David Wagner, UC Berkeley.
Lecture9 Page 1 CS 236 Online Operating System Security, Con’t CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
Lecture 15 Page 1 CS 236 Online Evaluating Running Systems Evaluating system security requires knowing what’s going on Many steps are necessary for a full.
MOPS: an Infrastructure for Examining Security Properties of Software Authors Hao Chen and David Wagner Appears in ACM Conference on Computer and Communications.
Deriving formal specifications (almost) automatically Glenn Ammons and Ras Bodik and James R. Larus.
The PLA Model: On the Combination of Product-Line Analyses 강태준.
TUF: Secure Software Updates Justin Cappos NYU Poly Computer Science and Engineering.
How to Contribute to System Testing and Extract Results
Research in Language-Based Methods
Ik-Soon Kim December 18, 2010 Embedded Software Platform Team
Secure Software Development: Theory and Practice
Verification of Software Security Properties
Autonomous Network Alerting Systems and Programmable Networks
MOPS: an Infrastructure for Examining Security Properties of Software
Presentation transcript:

MOPS MOdelchecking Security Properties David Wagner U.C. Berkeley

The Problem Security holes are often in the software Software bugs are a leading cause of security vulnerabilities Security programming is pitfall-laden It’s too easy to unintentionally violate implicit usage rules of OS API’s

Improving Software Quality If secure programming is hard, let’s build tools that make it easier to get security right An approach: enforce defensive coding Enumerate rules of prudent security coding Use tools to automatically verify that software follows these rules Project goal: explore a novel approach to this

A High-Level View Compile-time analysis of C source code For developers:  Integrating MOPS into build process catches bugs as soon as they’re introduced  Think of MOPS like a type system; would you program without one? For auditers:  MOPS can analyze legacy code to help with code reviews of existing packages A perfect match for open source

Uh-Oh… But: full software verification is totally impractical. Isn’t this idea hopeless??

No Problem! But: full software verification is totally impractical. Isn’t this idea hopeless?? Answer: Wrong! We can do a lot.

Lightweight Verification How to make verification practical: Check application-independent properties  Reduce specification costs through reuse Support only a subclass of properties  Temporal safety properties: i.e., “ordering” Exploit advances in modelchecking  Analyze control flow; ignore data flow Be conservative: warn when unsure

Prudent Coding Rules system() or exec() seteuid(0) seteuid(0) Example of a rule: Avoid calling exec() or system() with root privilege Key insight: Many rules are finite- state machines Good for “ordering properties” Intuitive for programmers

More Example Rules After chroot(f), immediately call chdir(f) Always follow strncpy(d,s,n) by d[n-1] = '\0' chroot(f) other chdir(f) other strncpy(d,s,n) other d[n-1]='\0' other

More Example Rules (2) A stat(f) followed by open(f) is awfully suspicious (race conditions) In a setuid program, open() followed by perror() is very dangerous stat(f)open(f) other open()perror() other

How to check whether code satisfies a property Let Σ = set of security-relevant events, B = set of “bad” traces that violate the property, T = set of feasible traces (T, B  Σ*) If T  B = Ø, then the property is respected Under the Hood T B

How to check whether code satisfies a property Let Σ = set of security-relevant events, B = set of “bad” traces that violate the property, T = set of feasible traces (T, B  Σ*) If T  B = Ø, then the property is respected Framework: software model checking B: finite-state automaton (regular language) T: pushdown automaton (context-free lang.) Under the Hood T B

Other Technical Advances Better modelchecking for security Compaction: for scalability Backtracking: for explaining bugs Automatic model extraction: how to cheaply build a faithful formal model of (parts of) the OS Paper in submission Guidance for programmers on privilege management Tutorial paper on pitfalls in setu*id(), and on how to use it safely A safer API for privilege management Paper accepted at Usenix Security 2002

Some Results OpenSSH Ssh 2.5.2: properly drops root before exec() (new) Ssh, sshd 2.5.2: no set*uid() call will fail (new) Sendmail : has capabilities bug on Linux (old) : fails to drop group privileges properly (old) Wu-ftpd 2.4  11: has tractorbeaming attack (old) 2.4  12: no tractorbeaming attacks -- follows defensive programming rules for setuid, longjmp, signals (new) Login, crontab, … Have fd-inheritance security holes when run setuid (new?)

More Results Buggy manual pages setuid(2) in RH Linux 7.2: omits capabilities setgid(2) in RH Linux 7.2: incorrectly claims gid 0 is special setreuid(2) in FreeBSD 4.4: incorrectly claims ruid/euid can always be swapped Buggy operating systems Linux kernel : fsuid invariant violated; security risk (our proposed fix accepted by Linus) Moral: Formal models are powerful

Status of MOPS Fully functional first cut Parses anything gcc will; allows specification of user-defined properties Some limitations (work-in-progress):  Doesn’t come with a database of rules of defensive programming … yet  UI, build integration isn’t “pretty” … yet Publicly released -- come and get it!

MOPS: building more secure software MOPS Project Summary Our main contributions: Novel techniques for improving software assurance of open source software through model-checking & lightweight formal methods Verification of certain security properties of important open source software; several security bugs found & fixed Release of our tool, MOPS, to open source community Buggy, insecure code Higher-security code MOPS

Conclusion MOPS: making security programming safer