Security Analysis of Network Protocols TECS Week Reference: John Mitchell Stanford 2005.

Slides:



Advertisements
Similar presentations
Security attacks. - confidentiality: only authorized parties have read access to information - integrity: only authorized parties have write access to.
Advertisements

Lecture 3Dr. Verma1 COSC 6397 – Information Assurance Module M2 – Protocol Specification and Verification University of Houston Rakesh Verma Lecture 3.
Model Checking for Security Anupam Datta CMU Fall A: Foundations of Security and Privacy.
CS259: Security Analysis of Network Protocols Overview of Murphi Arnab Roy.
SSL CS772 Fall Secure Socket layer Design Goals: SSLv2) SSL should work well with the main web protocols such as HTTP. Confidentiality is the top.
Sri Lanka Institute of Information Technology
Luu Anh Tuan. Security protocol Intruder Intruder behaviors Overhead and intercept any messages being passed in the system Decrypt messages that are.
1 Introduction CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell.
Deeper Security Analysis of Web-based Identity Federation Apurva Kumar IBM Research – India.
15-1 Last time Internet Application Security and Privacy Public-key encryption Integrity.
CS 395T Computational Soundness of Formal Models.
CS555Spring 2012/Topic 161 Cryptography CS 555 Topic 16: Key Management and The Need for Public Key Cryptography.
Analysis of Security Protocols (I) John C. Mitchell Stanford University.
Analysis of Security Protocols (V) John C. Mitchell Stanford University.
Analysis of Security Protocols (III) John C. Mitchell Stanford University.
Authentication John C. Mitchell Stanford University CS 99j.
Symbolic Logic for Complexity- theoretic Model of Security Protocols Anupam Datta Ante Derek John C. Mitchell Vitaly Shmatikov Mathieu Turuani May 5, 2005.
Analysis of Security Protocols (IV) John C. Mitchell Stanford University.
CMSC 414 Computer and Network Security Lecture 2 Jonathan Katz.
Protocol Verification by the Inductive Method John Mitchell Stanford TECS Week2005.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 7 Wenbing Zhao Department of Electrical and Computer Engineering.
Protocol analysis, wireless networking, and mobility John Mitchell Stanford University.
Modelling and Analysing of Security Protocol: Lecture 1 Introductions to Modelling Protocols Tom Chothia CWI.
EEC 688/788 Secure and Dependable Computing Lecture 7 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
Model Checking for Security Anupam Datta CMU Fall A: Foundations of Security and Privacy.
TCP/IP Protocol Suite 1 Chapter 28 Upon completion you will be able to: Security Differentiate between two categories of cryptography schemes Understand.
Security 2 Distributed Systems Lecture# 15. Overview Cryptography Symmetric Assymeteric Digital Signature Secure Digest Functions Authentication.
1 CS 194: Distributed Systems Security Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and Computer Sciences.
Inductive Verification of Protocols Anupam Datta CMU Fall A: Foundations of Security and Privacy.
CS5204 – Fall Cryptographic Security Presenter: Hamid Al-Hamadi October 13, 2009.
Network Security. An Introduction to Cryptography The encryption model (for a symmetric-key cipher).
Network Security. Security Threats 8Intercept 8Interrupt 8Modification 8Fabrication.
Executable specification of cryptofraglets with Maude for security verification Fabio Martinelli and Marinella Petrocchi IIT-CNR, Pisa Italy presented.
Dr. L. Christofi1 Local & Metropolitan Area Networks ACOE322 Lecture 8 Network Security.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Analysis of a Fair Exchange Protocol Vitaly Shmatikov John Mitchell Stanford University.
Basic Cryptography 1. What is cryptography? Cryptography is a mathematical method of protecting information –Cryptography is part of, but not equal to,
Security protocols  Authentication protocols (this lecture)  Electronic voting protocols  Fair exchange protocols  Digital cash protocols.
Security protocols and their verification Mark Ryan University of Birmingham Midlands Graduate School University of Birmingham April 2005 Steve Kremer.
© UCL Crypto group oct.-15 On the Perfect Encryption Assumption in the Study of Security Protocols O. Pereira and J.-J. Quisquater UCL Crypto Group
Design and Analysis of Security Protocols Vitaly Shmatikov CS 395T
CSCE 813 Internet Security Cryptographic Protocol Analysis.
1 Reasoning about Concrete Security in Protocol Proofs A. Datta, J.Y. Halpern, J.C. Mitchell, R. Pucella, A. Roy.
Lecture 16: Security CDK4: Chapter 7 CDK5: Chapter 11 TvS: Chapter 9.
Correctness Proofs and Counter-model Generation with Authentication-Protocol Logic Koji Hasebe Mitsuhiro Okada Department of Philosophy, Keio University.
6 June Lecture 2 1 TU Dresden - Ws on Proof Theory and Computation Formal Methods for Security Protocols Catuscia Palamidessi Penn State University,
CS 395T Game-Based Verification of Contract Signing Protocols.
Security Analysis of Network Protocols Vitaly Shmatikov SRI CS 259 John Mitchell Stanford.
IPSec and TLS Lesson Introduction ●IPSec and the Internet key exchange protocol ●Transport layer security protocol.
Alternating Temporal Logic and Game-Based Properties CS 259 John Mitchell with slides from Vitaly Shmatikov.
Protocol Analysis. CSCE Farkas 2 Cryptographic Protocols Two or more parties Communication over insecure network Cryptography used to achieve goal.
Project: XML Security CS 259 March, 2004 Jun Yoshida (Visiting Scholar from Hitachi Ltd.)
Lecture 9 Overview. Digital Signature Properties CS 450/650 Lecture 9: Digital Signatures 2 Unforgeable: Only the signer can produce his/her signature.
Logical Foundations for Security Protocol Analysis Patrick Lincoln John Mitchell Mark Mitchell Andre Scedrov.
Pertemuan #8 Key Management Kuliah Pengaman Jaringan.
@Yuan Xue CS 285 Network Security Secure Socket Layer Yuan Xue Fall 2013.
Model Checking for Security Protocols Will Marrero, Edmund Clarke, Shomesh Jha.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Security Analysis of Network Protocols
Security Analysis of Network Protocols
Security Protocols Analysis
Analysis of Security Protocols
Man in the Middle Attacks
Protocol Verification by the Inductive Method
CDK4: Chapter 7 CDK5: Chapter 11 TvS: Chapter 9
Security Analysis of Network Protocols
CDK: Chapter 7 TvS: Chapter 9
Protocol Verification by the Inductive Method
Presentation transcript:

Security Analysis of Network Protocols TECS Week Reference: John Mitchell Stanford 2005

Computer Security uCryptography Encryption, signatures, cryptographic hash, … uSecurity mechanisms Access control policy Network protocols uImplementation Cryptographic library Code implementing mechanisms –Reference monitor and TCB –Protocol Runs under OS, uses program library, network protocol stack Analyze protocols, assuming crypto, implementation, OS correct

Cryptographic Protocols uTwo or more parties uCommunication over insecure network uCryptography used to achieve goal Exchange secret keys Verify identity (authentication) JR Rao: Public-key encryption, symmetric-key encryption, CBC, hash, signature, key generation, random-number generators

Correctness vs Security uProgram or System Correctness Program satisfies specification –For reasonable input, get reasonable output uProgram or System Security Program properties preserved in face of attack –For unreasonable input, output not completely disastrous uMain differences Active interference from adversary Refinement techniques may fail –More functionality can be worse

Security Analysis uModel system uModel adversary uIdentify security properties uSee if properties are preserved under attack uResult No “absolute security” Security means: under given assumptions about system, no attack of a certain form will destroy specified properties.

Important Modeling Decisions uHow powerful is the adversary? Simple replay of previous messages Block messages; Decompose, reassemble and resend Statistical analysis, partial info from network traffic Timing attacks uHow much detail in underlying data types? Plaintext, ciphertext and keys –atomic data or bit sequences Encryption and hash functions –“perfect” cryptography –algebraic properties: encr(x*y) = encr(x) * encr(y) for RSA encrypt(k,msg) = msg k mod N

Protocol analysis spectrum LowHigh Low Modeling detail Protocol complexity Mur  FDR  NRL  Athena  Hand proofs  Paulson  Strand spaces  BAN logic  Spi-calculus  Poly-time calculus   Model checking Multiset rewriting with   Protocol logic  

Four “Stanford” approaches uFinite-state analysis Case studies: find errors, debug specifications uSymbolic execution model: Multiset rewriting Identify basic assumptions Study optimizations, prove correctness Complexity results uProcess calculus with probability and complexity More realistic intruder model Interaction between protocol and cryptography Equational specification and reasoning methods uProtocol logic Axiomatic system for modular proofs of protocol properties SRI, U Penn, U Texas, Kiel, INRIA, …

Some other projects and tools uExhaustive finite-state analysis FDR, based on CSP [Lowe, Roscoe, Schneider, …] uSearch using symbolic representation of states Meadows: NRL Analyzer, Millen: Interrogator uProve protocol correct Paulson’s “Inductive method”, others in HOL, PVS, … MITRE -- Strand spaces Process calculus approach: Abadi-Gordon spi- calculus, applied pi-calculus, … Type-checking method: Gordon and Jeffreys, … Many more – this is just a small sample

Example: Needham-Schroeder uFamous simple example Protocol published and known for 10 years Gavin Lowe discovered unintended property while preparing formal analysis using FDR system uBackground: Public-key cryptography Every agent A has –Public encryption key Ka –Private decryption key Ka -1 Main properties –Everyone can encrypt message to A –Only A can decrypt these messages

Needham-Schroeder Key Exchange { A, NonceA } { NonceA, NonceB } { NonceB} Ka Kb Result: A and B share two private numbers not known to any observer without Ka -1, Kb -1 AB Kb

Anomaly in Needham-Schroeder AE B { A, NA } { NA, NB } { NB } Ke Kb Ka Ke Evil agent E tricks honest A into revealing private key NB from B Evil E can then fool B [Lowe]

Explicit Intruder Method Intruder Model Analysis Tool Formal Protocol Informal Protocol Description Find error

Run of protocol A B Initiate Respond C D Correct if no security violation in any run Attacker

Automated Finite-State Analysis uDefine finite-state system Bound on number of steps Finite number of participants Nondeterministic adversary with finite options uPose correctness condition Can be simple: authentication and secrecy Can be complex: contract signing uExhaustive search using “verification” tool Error in finite approximation  Error in protocol No error in finite approximation  ???

Finite-state methods uTwo sources of infinite behavior Many instances of participants, multiple runs Message space or data space may be infinite uFinite approximation Assume finite participants –Example: 2 clients, 2 servers Assume finite message space –Represent random numbers by r1, r2, r3, … –Do not allow unbounded encrypt(encrypt(encrypt(…)))

Mur j [Dill et al.] uDescribe finite-state system State variables with initial values Transition rules Communication by shared variables uScalable: choose system size parameters uAutomatic exhaustive state enumeration Space limit: hash table to avoid repeating states uResearch and industrial protocol verification

Applying Mur j to security protocols uFormulate protocol uAdd adversary Control over “network” (shared variables) Possible actions –Intercept any message –Remember parts of messages –Generate new messages, using observed data and initial knowledge (e.g. public keys)

Needham-Schroeder in Mur j (1) const NumInitiators: 1; -- number of initiators NumResponders: 1; -- number of responders NumIntruders: 1; -- number of intruders NetworkSize: 1; -- max. outstanding msgs in network MaxKnowledge: 10; -- number msgs intruder can remember type InitiatorId: scalarset (NumInitiators); ResponderId: scalarset (NumResponders); IntruderId: scalarset (NumIntruders); AgentId: union {InitiatorId, ResponderId, IntruderId};

Needham-Schroeder in Mur j (2) MessageType : enum { -- types of messages M_NonceAddress, -- {Na, A}Kb nonce and addr M_NonceNonce, -- {Na,Nb}Ka two nonces M_Nonce -- {Nb}Kb one nonce }; Message : record source: AgentId; -- source of message dest: AgentId; -- intended destination of msg key: AgentId; -- key used for encryption mType: MessageType; -- type of message nonce1: AgentId; -- nonce1 nonce2: AgentId; -- nonce2 OR sender id OR empty end;

Needham-Schroeder in Mur j (3) -- intruder i sends recorded message ruleset i: IntruderId do -- arbitrary choice of choose j: int[i].messages do -- recorded message ruleset k: AgentId do -- destination rule "intruder sends recorded message" !ismember(k, IntruderId) & -- not to intruders multisetcount (l:net, true) < NetworkSize ==> var outM: Message; begin outM := int[i].messages[j]; outM.source := i; outM.dest := k; multisetadd (outM,net); end; end;

Adversary Model uFormalize “knowledge” initial data observed message fields results of simple computations uOptimization only generate messages that others read time-consuming to hand simplify uPossibility: automatic generation

Run of Needham-Schroeder uFind error after 1.7 seconds exploration uOutput: trace leading to error state  Mur j times after correcting error:

Limitations uSystem size with current methods 2-6 participants Kerberos: 2 clients, 2 servers, 1 KDC, 1 TGS 3-6 steps in protocol May need to optimize adversary uAdversary model Cannot model randomized attack Do not model adversary running time

Security Protocols in Mur  uStandard “benchmark” protocols Needham-Schroeder, TMN, … Kerberos uStudy of Secure Sockets Layer (SSL) Versions 2.0 and 3.0 of handshake protocol Include protocol resumption uTool optimization uAdditional protocols Contract-signing Wireless networking … ADD YOUR PROJECT HERE …

State Reduction on N-S Protocol

Plan for this course uProtocols Authentication, key establishment, assembling protocols together (TLS ?), fairness exchange, … uTools Finite-state and probabilistic model checking, constraint-solving, process calculus, temporal logic, proof systems, game theory, polynomial time … uProjects (You do this later on your own!) Choose a protocol or other security mechanism Choose a tool or method and carry out analysis Hard part: formulating security requirements

Reference Material (CS259 web site) uProtocols Clarke-Jacob survey Use Google; learn to read an RFC uTools Murphi –Finite-state tool developed by David Dill’s group at Stanford PRISM –Probabilistic model checker, University of Birmingham MOCHA –Alur and Henzinger; now consortium Constraint solver using prolog –Shmatikov and Millen Isabelle –Theorem prover developed by Larry Paulson in Cambridge, UK –A number of case studies available on line