1 Validation of Security Protocols Joint work with Gul Agha, Michael Greenwald, Carl Gunter, Sanjeev Khanna, Darko Marinov, Jose Meseguer, Prasanna Thati,

Slides:



Advertisements
Similar presentations
Openflow App Testing Chao SHI, Stephen Duraski. Motivation Network is still a complex stuff ! o Distributed mechanism o Complex protocol o Large state.
Advertisements

Masahiro Fujita Yoshihisa Kojima University of Tokyo May 2, 2008
CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
White Box and Black Box Testing Tor Stålhane. What is White Box testing White box testing is testing where we use the info available from the code of.
Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
PROTOCOL VERIFICATION & PROTOCOL VALIDATION. Protocol Verification Communication Protocols should be checked for correctness, robustness and performance,
1/20 Generalized Symbolic Execution for Model Checking and Testing Charngki PSWLAB Generalized Symbolic Execution for Model Checking and Testing.
Ensuring Operating System Kernel Integrity with OSck By Owen S. Hofmann Alan M. Dunn Sangman Kim Indrajit Roy Emmett Witchel Kent State University College.
Analysis of the i 4-Way Handshake Changhua He, John C Mitchell Stanford University WiSE, Oct. 1, 2004.
1 Formal Modeling and Analysis of DoS Using Probabilistic Rewrite Theories Gul Agha Michael Greenwald Carl Gunter Sanjeev Khanna Jose Meseguer Koushik.
A survey of techniques for precise program slicing Komondoor V. Raghavan Indian Institute of Science, Bangalore.
Hybrid Concolic Testing Rupak Majumdar Koushik Sen UC Los Angeles UC Berkeley.
Dynamic Symbolic Execution CS 8803 FPL Oct 31, 2012 (Slides adapted from Koushik Sen) 1.
CSE503: SOFTWARE ENGINEERING SYMBOLIC TESTING, AUTOMATED TEST GENERATION … AND MORE! David Notkin Spring 2011.
Formal Models of Availability Carl A. Gunter University of Pennsylvania (Soon to be the University of Illinois)
Model Checking. Used in studying behaviors of reactive systems Typically involves three steps: Create a finite state model (FSM) of the system design.
ECE Synthesis & Verification1 ECE 667 Spring 2011 Synthesis and Verification of Digital Systems Verification Introduction.
1 Today Another approach to “coverage” Cover “everything” – within a well-defined, feasible limit Bounded Exhaustive Testing.
Overview of Cryptography Anupam Datta CMU Fall A: Foundations of Security and Privacy.
Research Overview Carl A. Gunter University of Pennsylvania.
DART Directed Automated Random Testing Patrice Godefroid, Nils Klarlund, and Koushik Sen Syed Nabeel.
Software Engineering, COMP201 Slide 1 Protocol Engineering Protocol Specification using CFSM model Lecture 30.
Probabilistic Verification of Discrete Event Systems Håkan L. S. Younes.
EE694v-Verification-Lect5-1- Lecture 5 - Verification Tools Automation improves the efficiency and reliability of the verification process Some tools,
VESTA: A Statistical Model- checker and Analyzer for Probabilistic Systems Authors: Koushik Sen Mahesh Viswanathan Gul Agha University of Illinois at Urbana-Champaign.
1 Formal Engineering of Reliable Software LASER 2004 school Tutorial, Lecture1 Natasha Sharygina Carnegie Mellon University.
The Shared Channel Model for DoS Carl A. Gunter With Sanjeev Khanna, Kaijun Tan, and Santosh Venkatesh.
Chapter 4.1 Interprocess Communication And Coordination By Shruti Poundarik.
Leveraging User Interactions for In-Depth Testing of Web Application Sean McAllister Secure System Lab, Technical University Vienna, Austria Engin Kirda.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 4: SMT-based Bounded Model Checking of Concurrent Software.
Alexander Potapov.  Authentication definition  Protocol architectures  Cryptographic properties  Freshness  Types of attack on protocols  Two-way.
Lucent Technologies – Proprietary Use pursuant to company instruction Learning Sequential Models for Detecting Anomalous Protocol Usage (work in progress)
Cheng/Dillon-Software Engineering: Formal Methods Model Checking.
DART: Directed Automated Random Testing Koushik Sen University of Illinois Urbana-Champaign Joint work with Patrice Godefroid and Nils Klarlund.
CUTE: A Concolic Unit Testing Engine for C Technical Report Koushik SenDarko MarinovGul Agha University of Illinois Urbana-Champaign.
ECE 720T5 Winter 2014 Cyber-Physical Systems Rodolfo Pellizzoni.
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.
VeriFlow: Verifying Network-Wide Invariants in Real Time
PRESENTED BY P. PRAVEEN Roll No: 1009 – 11 – NETWORK SECURITY M.C.A III Year II Sem.
Formal Verification Lecture 9. Formal Verification Formal verification relies on Descriptions of the properties or requirements Descriptions of systems.
Mitigating DoS Attack Through Selective Bin Verification Micah Sherr a, Michael Greenwald b, Carl A. Gunter c, Sanjeev Khanna a, and Santosh S. Venkatesh.
Introduction to Problem Solving. Steps in Programming A Very Simplified Picture –Problem Definition & Analysis – High Level Strategy for a solution –Arriving.
Merkle trees Introduced by Ralph Merkle, 1979 An authentication scheme
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
New Client Puzzle Outsourcing Techniques for DoS Resistance Brent Waters, Ari Juels, J. Alex Halderman and Edward W. Felten.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 05/06 Universität Dortmund Validation - Formal verification -
Verification & Validation By: Amir Masoud Gharehbaghi
HACNet Simulation-based Validation of Security Protocols Vinay Venkataraghavan Advisors: S.Nair, P.-M. Seidel HACNet Lab Computer Science and Engineering.
Random Interpretation Sumit Gulwani UC-Berkeley. 1 Program Analysis Applications in all aspects of software development, e.g. Program correctness Compiler.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Static Techniques for V&V. Hierarchy of V&V techniques Static Analysis V&V Dynamic Techniques Model Checking Simulation Symbolic Execution Testing Informal.
CUTE: A Concolic Unit Testing Engine for C Koushik SenDarko MarinovGul Agha University of Illinois Urbana-Champaign.
Winter 2007SEG2101 Chapter 121 Chapter 12 Verification and Validation.
Dynamic Symbolic Execution (aka, directed automated random testing, aka concolic execution) Slides by Koushik Sen.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
MOPS: an Infrastructure for Examining Security Properties of Software Authors Hao Chen and David Wagner Appears in ACM Conference on Computer and Communications.
CSE 331 SOFTWARE DESIGN & IMPLEMENTATION SYMBOLIC TESTING Autumn 2011.
Using Rhythmic Nonces for Puzzle-Based DoS Resistance Ellick M. Chan, Carl A. Gunter, Sonia Jahid, Evgeni Peryshkin, and Daniel Rebolledo University of.
Cryptographic Hash Function. A hash function H accepts a variable-length block of data as input and produces a fixed-size hash value h = H(M). The principal.
Sub-fields of computer science. Sub-fields of computer science.
Cryptographic Hash Function
Efficient Decentralized Monitoring of Safety in Distributed Systems
Koushik Sen Abhay Vardhan Gul Agha Grigore Rosu
IS 2935: Developing Secure Systems
Statistical Model-Checking of “Black-Box” Probabilistic Systems VESTA
Gul Agha Michael Greenwald Carl Gunter Sanjeev Khanna
On Statistical Model Checking of Stochastic Systems
Gul Agha Michael Greenwald Carl Gunter Sanjeev Khanna
CUTE: A Concolic Unit Testing Engine for C
Presentation transcript:

1 Validation of Security Protocols Joint work with Gul Agha, Michael Greenwald, Carl Gunter, Sanjeev Khanna, Darko Marinov, Jose Meseguer, Prasanna Thati, Mahesh Viswanathan Koushik Sen

2/32 Formal Analysis of Cryptographic Protocols Integrity and Confidentiality  Recipient not fooled or leaks information  algebraic techniques assumes idealized cryptographic primitives  complexity-theoretic techniques based on complexity assumptions

3/32 Availability Attack Availability threats  whether recipient available to valid sender  algebraic and/or complexity theoretic methods are not suitable for finding availability threats assumes adversary can insert, delete, or replay messages  availability attack is assured as the adversary can delete any valid packet

4/32 Availability Attack Availability threats  whether recipient available to valid sender  algebraic and/or complexity theoretic methods are not suitable for finding availability threats assumes adversary can insert, delete, or replay messages  availability attack is assured as the adversary can delete any valid packet  How to model and analyze availability formally?

5/32 Our Goal Given a protocol P, let properties T hold for P  P is a traditional non-deterministic specification  T is a set of integrity and confidentiality properties Extend P to P * and T to T *  P * is DoS hardened P  T * includes availability properties in addition to T Goal  Prove that T * hold for P * without re-proving that T hold for P

6/32 Our Results Given a protocol P, let properties T hold for P  P is a traditional non-deterministic specification  T is a set of integrity and confidentiality properties Extend P to P * and T to T *  P * is DoS hardened P  T * includes availability properties in addition to T Goal  Prove that T * hold for P * without re-proving that T hold for P ?

7/32 Modeling and Analysis Probabilistic Rewrite Theories  PMaude  Unified Algebraic Model  Probabilistic Object Model Properties in Continuous stochastic logic (CSL)  Statistical Model-checking [Sen et al. CAV’04, CAV’05, QEST’05] using VESTA using Monte Carlo simulation and statistical hypothesis testing QuaTEx  Quantitative Temporal Expressions  Query language to gain quantitative insight about a model  Statistical computation of QuaTEx [QAPL’05] in VESTA

8/32 Achievements In the last meeting we presented our preliminary ideas  On formal modeling and analysis of DoS resistant security protocols This year we have worked out the details  Specified TCP/IP 3-way handshaking protocol in PMaude  Model-checked availability properties using the VESTA tool  Designed a language to query more informative quantitative information about a model QuaTEx  Published our results at FCS 05, QAPL 05, CAV 05, and QEST 05

9/32 TCP/IP: A case study Common Susceptible to DoS attacks:  SYN flood and others Existing solutions as benchmark:  Increase size of SYN cache, random drop, SYN cookies

10/32 Selective Sequential Verification SYN flood attack: the adversary can devote his entire channel to fake SYN packets Countermeasure :  Valid sender sends multiple copies of the SYN packet  receiver checks each incoming SYN packet with some probability (say, 25% or 1%) Specified DoS hardened TCP/IP 3-way handshaking protocol in PMaude C Gunter, S Khanna, K Tan, S Venkatesh 2004

11/32 Availability Property Property: The probability that eventually the attacker X successfully fills up the SYN cache of B is less than P <0.01 [§(sucessful_attack())] Statistical Model-checking using Vesta model-checker K Sen, M Viswanathan, G Agha (CAV 2005)

12/32 Results Cache-size = 10,000 timeout = 10 seconds number of valid senders = 100 G. Agha, M. Greenwald, C. Gunter, S. Khanna, J. Meseguer, P. Thati (FCS 05)

13/32 Quantitative Queries Using QuaTEx What is the expected number of clients that successfully connect to S? CountConnected() = if completed() then count() else ° (CountConnected()) fi; eval E[CountConnected()] G Agha, J Meseguer, K Sen (QAPL 2005)

14/32 Quantitative Queries Using QuaTEx What is the probability that a client connected to S within 10 seconds after it initiated the connection request? Prob() = if globaltime()>10 then 0.0 else if connected() then 1.0 else ° (Prob()) fi fi; eval E[Prob()] G Agha, J Meseguer, K Sen (QAPL 2005)

15/32 Linux Kernel Test Attack rate in SYNs/sec received at server Graph shows successful connections per 450 threads Defenseless kernel: >6 SYNs/sec shuts out client Aggregate connections Attack rate Model predicts cliff M Delap, M Greenwald, C Gunter, S Khanna, Y Xu 2004

16/32 Results Expected number of clients out of 100 clients that get connected with the server under DoS attack G. Agha, M. Greenwald, C. Gunter, S. Khanna, J. Meseguer, P. Thati (FCS 05)

17/32 Results Expected number of clients out of 100 clients that get connected with the server under DoS attack Experiments with Linux kernel involved 30 days of work Experiments with PMaude model involved only 1 day work G. Agha, M. Greenwald, C. Gunter, S. Khanna, J. Meseguer, P. Thati (FCS 05)

18/32 Discussion A general framework for modeling and verifying DoS properties of communication protocols. Capable of expressing and proving key availability properties. Performance limitations require us to use scaled down version of parameters. Future Work  Addressing efficiency limitations  Verifying the properties for general systems

19/32 Testing Security Protocol Implementations Integrity and Confidentiality properties  Verification techniques

20/32 Testing Security Protocol Implementations Integrity and Confidentiality properties  Verification techniques  How about verifying real implementations? Intractable

21/32 Testing Security Protocol Implementations Integrity and Confidentiality properties  Verification techniques  How about verifying real implementations? Intractable  How about trying to find security bugs? Concolic testing

22/32 Our Testing Approach CUTE: A Concolic Unit Testing Engine for e  A scalable automated unit testing tool  Combines concrete and symbolic execution  Can test real-world C programs Tested C implementation of security protocols  Needham-Schroeder, TMN, …  Discovered known security attacks in a few seconds K Sen, D Marinov, G Agha (ACM SIGSOFT ESEC/FSE 2005)

23/32 Goal of Concolic Testing Automated Scalable Unit Testing of real- world C Programs  Generate test inputs  Execute unit under test on generated test inputs so that all reachable statements are executed  Any assertion violation gets caught

24/32 Goal of Concolic Testing Automated Scalable Unit Testing of real- world C Programs  Generate test inputs  Execute unit under test on generated test inputs so that all reachable statements are executed  Any assertion violation gets caught Our Approach:  Explore all execution paths of an Unit for all possible inputs Exploring all execution paths ensure that all reachable statements are executed

25/32 Execution Paths of a Program Can be seen as a binary tree with possibly infinite depth  Computation tree Each node represents the execution of a “if then else” statement Each edge represents the execution of a sequence of non-conditional statements Each path in the tree represents an equivalence class of inputs

26/32 Execution Paths of a Program Can be seen as a binary tree with possibly infinite depth  Computation tree Each node represents the execution of a “if then else” statement Each edge represents the execution of a sequence of non-conditional statements Each path in the tree represents an equivalence class of inputs Explicit Path Model Checking

27/32 Existing Approach I Random testing  generate random inputs  execute the program on generated inputs Probability of reaching an error can be astronomically less test_me(int x){ if(x==94389){ ERROR; } Probability of hitting ERROR = 1/2 32

28/32 Existing Approach II Symbolic Execution  use symbolic values for input variables  execute the program symbolically on symbolic input values  collect symbolic path constraints  use theorem prover to check if a branch can be taken Does not scale for large programs test_me(int x){ if((x%10)*4!=17){ ERROR; } else { ERROR; } Symbolic execution will say both branches are reachable: False positive

29/32 Approach Combine concrete and symbolic execution for unit testing  Concrete + Symbolic = Concolic In a nutshell  Use concrete execution over a concrete input to guide symbolic execution  Concrete execution helps Symbolic execution to simplify complex and unmanageable symbolic expressions by replacing symbolic values by concrete values Achieves Scalability  Higher branch coverage than random testing  No false positives or scalability issue like in symbolic execution based testing

30/32 Experiments: Needham-Schroeder Protocol Tested a C implementation of a security protocol (Needham-Schroeder) with a known attack  270 lines of code  Took less than 8 seconds on a machine with 1.8GHz processor to discover middle-man attack In contrast, a software model-checker (VeriSoft) took 8 hours on a similar implementation

31/32 Experiments: TMN Protocol Tested a C implementation of TMN protocol  Tatebayashi, Matsuzaki, and Newman (TMN) Protocol: a protocol for distribution of a fresh symmetric key.  329 lines of code  Took less than 6 seconds on a machine with 1.8GHz processor to discover an attack an intruder can establish a parallel session through eavesdropping and obtain the secret key

32/32 Discussion CUTE is  light-weight  dynamic analysis (compare with static analysis) ensures no false alarms  concrete execution and symbolic execution run simultaneously symbolic execution consults concrete execution whenever dynamic analysis becomes intractable  real tool that works on all C programs completely automatic Requires actual code that can be fully compiled Can sometime reduce to Random Testing Complementary to Static Analysis Tools