Probabilistic Model Checking CS 395T. Overview uCrowds redux uProbabilistic model checking PRISM model checker PCTL logic Analyzing Crowds with PRISM.

Slides:



Advertisements
Similar presentations
Automatic Verification Book: Chapter 6. How can we check the model? The model is a graph. The specification should refer the the graph representation.
Advertisements

CS 267: Automated Verification Lecture 2: Linear vs. Branching time. Temporal Logics: CTL, CTL*. CTL model checking algorithm. Counter-example generation.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Distributed Markov Chains P S Thiagarajan School of Computing, National University of Singapore Joint work with Madhavan Mukund, Sumit K Jha and Ratul.
PROTOCOL VERIFICATION & PROTOCOL VALIDATION. Protocol Verification Communication Protocols should be checked for correctness, robustness and performance,
1 MODULE name (parameters) “Ontology” “Program” “Properties” The NuSMV language A module can contain modules Top level: parameters less module Lower level.
CS6133 Software Specification and Verification
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 11.
UPPAAL Introduction Chien-Liang Chen.
Hybrid Systems Presented by: Arnab De Anand S. An Intuitive Introduction to Hybrid Systems Discrete program with an analog environment. What does it mean?
CmpE 104 SOFTWARE STATISTICAL TOOLS & METHODS MEASURING & ESTIMATING SOFTWARE SIZE AND RESOURCE & SCHEDULE ESTIMATING.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 13.
1 Temporal Claims A temporal claim is defined in Promela by the syntax: never { … body … } never is a keyword, like proctype. The body is the same as for.
Probabilistic Contract Signing CS 259 Vitaly Shmatikov.
Statistical Probabilistic Model Checking Håkan L. S. Younes Carnegie Mellon University.
Model Checking for Probabilistic Timed Systems Jeremy Sproston Università di Torino VOSS Dagstuhl seminar 9th December 2002.
Entropy Rates of a Stochastic Process
GS 540 week 6. HMM basics Given a sequence, and state parameters: – Each possible path through the states has a certain probability of emitting the sequence.
Probabilistic CEGAR* Björn Wachter Joint work with Holger Hermanns, Lijun Zhang TexPoint fonts used in EMF. Read the TexPoint manual before you delete.
Complexity 26-1 Complexity Andrei Bulatov Interactive Proofs.
Lecture 4&5: Model Checking: A quick introduction Professor Aditya Ghose Director, Decision Systems Lab School of IT and Computer Science University of.
Review of the automata-theoretic approach to model-checking.
Probabilistic Verification of Discrete Event Systems Håkan L. S. Younes.
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.
 Structured peer to peer overlay networks are resilient – but not secure.  Even a small fraction of malicious nodes may result in failure of correct.
A Tale of Research: From Crowds to Deeper Understandings Matthew Wright Jan. 25, : Adv. Network Security.
By: Pashootan Vaezipoor Path Invariant Simon Fraser University – Spring 09.
Model Checking Lecture 3 Tom Henzinger. Model-Checking Problem I |= S System modelSystem property.
Game-Based Verification of Fair Exchange Protocols CS 259 Vitaly Shmatikov.
Anonymity – Crowds R. Newman. Topics Defining anonymity Need for anonymity Defining privacy Threats to anonymity and privacy Mechanisms to provide anonymity.
1 Probabilistic Model Checking of Systems with a Large State Space: A Stratified Approach Shou-pon Lin Advisor: Nicholas F. Maxemchuk Department of Electrical.
Probabilistic Model Checking for Security Protocols CS 259 Vitaly Shmatikov.
Lecture 81 Optimizing CTL Model checking + Model checking TCTL CS 5270 Lecture 9.
PRISM n A Probabilistic Model Checker, Birmingham n Supports 3 models: n 1.Discrete-time Markov chain(DTMC) n 2.Markov decision processes(MDP) n 3.Continuous-time.
CS 395T Game-Based Verification of Contract Signing Protocols.
Monte Carlo Model Checking Radu Grosu SUNY at Stony Brook Joint work with Scott A. Smolka.
Quantitative Model Checking Radu Grosu SUNY at Stony Brook Joint work with Scott A. Smolka.
Anonymity and Probabilistic Model Checking CS 259 John Mitchell 2008.
PROBABILITY, PROBABILITY RULES, AND CONDITIONAL PROBABILITY
1 Parrondo's Paradox. 2 Two losing games can be combined to make a winning game. Game A: repeatedly flip a biased coin (coin a) that comes up head with.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
May University of Glasgow Generalising Feature Interactions in Muffy Calder, Alice Miller Dept. of Computing Science University of Glasgow.
Hwajung Lee. The State-transition model The set of global states = s 0 x s 1 x … x s m {s k is the set of local states of process k} S0  S1  S2  Each.
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
Repetition Statements (Loops). 2 Introduction to Loops We all know that much of the work a computer does is repeated many times. When a program repeats.
CS357 Lecture 13: Symbolic model checking without BDDs Alex Aiken David Dill 1.
Complexity 24-1 Complexity Andrei Bulatov Interactive Proofs.
1 Test Coverage Coverage can be based on: –source code –object code –model –control flow graph –(extended) finite state machines –data flow graph –requirements.
Probabilistic Contract Signing CS 395T. Probabilistic Fair Exchange uTwo parties exchange items of value Signed commitments (contract signing) Signed.
Model Checking Lecture 2. Model-Checking Problem I |= S System modelSystem property.
CS5270 Lecture 41 Timed Automata I CS 5270 Lecture 4.
Model Checking Lecture 2 Tom Henzinger. Model-Checking Problem I |= S System modelSystem property.
Krishnendu ChatterjeeFormal Methods Class1 MARKOV CHAINS.
Complexity of Compositional Model Checking of Computation Tree Logic on Simple Structures Krishnendu Chatterjee Pallab Dasgupta P.P. Chakrabarti IWDC 2004,
Probabilistic Timed Automata
SS 2017 Software Verification Bounded Model Checking, Outlook
Prof. Dr. Holger Schlingloff 1,2 Dr. Esteban Pavese 1
Decision Trees (suggested time: 30 min)
Automatic Verification
Distributed Snapshot.
How Hard Can It Be?.
ITEC452 Distributed Computing Lecture 5 Program Correctness
On Statistical Model Checking of Stochastic Systems
Logic Coverage for Source Code CS 4501 / 6501 Software Testing
Formal Methods in software development
‘Crowds’ through a PRISM
Distributed Snapshot.
Probabilistic Contract Signing
Presentation transcript:

Probabilistic Model Checking CS 395T

Overview uCrowds redux uProbabilistic model checking PRISM model checker PCTL logic Analyzing Crowds with PRISM uProbabilistic contract signing Rabin’s beacon protocol Ben-Or, Goldreich, Rivest, Micali protocol Analyzing probabilistic contract signing protocols with PRISM

Crowds System C C4C4 C1C1 C2C2 C C C C3C3 C0C0 sender recipient C C C C pfpf 1-p f uRouters form a random path when establishing connection In onion routing, random path is chosen in advance by sender uAfter receiving a message, honest router flips a biased coin With probability P f randomly selects next router and forwards msg With probability 1-P f sends directly to the recipient [Reiter,Rubin ‘98]

Probabilistic Model Checking uParticipants are finite-state machines Same as Mur  uState transitions are probabilistic Transitions in Mur  are nondeterministic uStandard intruder model Same as Mur  : model cryptography with abstract data types uMur  question: Is bad state reachable? uProbabilistic model checking question: What’s the probability of reaching bad state? “bad state”

Discrete-Time Markov Chains uS is a finite set of states us 0  S is an initial state  T :S S  [0,1] is the transition relation s,s’  S  s’ T(s,s’)=1 uL is a labeling function (S, s 0, T, L)

Markov Chain: Simple Example B A C D 0.2 E s0s0 Probabilities of outgoing transitions sum up to 1.0 for every state Probability of reaching E from s 0 is 0.2   0.1  0.5=0.14 The chain has infinite paths if state graph has loops –Need to solve a system of linear equations to compute probabilities

PRISM [Kwiatkowska et al., U. of Birmingham] uProbabilistic model checker uSystem specified as a Markov chain Parties are finite-state machines w/ local variables State transitions are associated with probabilities – Can also have nondeterminism (Markov decision processes) All parameters must be finite uCorrectness condition specified as PCTL formula uComputes probabilities for each reachable state –Enumerates reachable states –Solves system of linear equations to find probabilities

PRISM Syntax B A C D 0.2 E s0s0 module Simple state: [1..5] init 1; [] state=1 -> 0.8: state’= : state’=3; [] state=2 -> 0.1: state’= : state’=4; [] state=3 -> 0.5: state’= : state’=5; endmodule IF state=3 THEN with prob. 50% assign 4 to state, with prob. 50% assign 5 to state

Modeling Crowds with PRISM uModel probabilistic path construction uEach state of the model corresponds to a particular stage of path construction 1 router chosen, 2 routers chosen, … uThree probabilistic transitions Honest router chooses next router with probability p f, terminates the path with probability 1-p f Next router is probabilistically chosen from N candidates Chosen router is hostile with certain probability uRun path construction protocol several times and look at accumulated observations of the intruder

PRISM: Path Construction in Crowds module crowds... // N = total # of routers, C = # of corrupt routers // badC = C/N, goodC = 1-badC [] (!good & !bad & run) -> goodC: (good’=true) & (revealAppSender’=true) & (run’=false) + badC: (badObserve’=true) & (run’=false); // Forward with probability PF, else deliver [] (good & !deliver) -> PF: (pIndex’=pIndex+1) & (forward’=true) & (good’=false) + notPF: (deliver’=true);... endmodule Next router is corrupt with certain probability Route with probability PF, else deliver

PRISM: Intruder Model module crowds... // Record the apparent sender and deliver [] (badObserve & appSender=0) -> (observe0’=observe0+1) & (deliver’=true);... // Record the apparent sender and deliver [] (badObserve & appSender=15) -> (observe15’=observe15+1) & (deliver’=true);... endmodule For each observed path, bad routers record apparent sender Bad routers collaborate, so treat them as a single attacker No cryptography, only probabilistic inference

uProbabilistic Computation Tree Logic uUsed for reasoning about probabilistic temporal properties of probabilistic finite state spaces uCan express properties of the form “under any scheduling of processes, the probability that event E occurs is at least p’’ By contrast, Mur  can express only properties of the form “does event E ever occur?’’ PCTL Logic [Hansson, Jonsson ‘94]

uState formulas First-order propositions over a single state  ::= True | a |    |    |  | P >p [  ] uPath formulas Properties of chains of states  ::= X  |  U  k  |  U  PCTL Syntax Predicate over state variables (just like a Mur  invariant) Path formula holds with probability > p State formula holds for next state in the chain First state formula holds for every state in the chain until second becomes true

PCTL: State Formulas uA state formula is a first-order state predicate Just like non-probabilistic logic X=3 y=0 X=1 y=1 X=1 y=2 0.2 X=2 y= s0s0 0.5  = (y>1) | (x=1) True False

PCTL: Path Formulas uA path formula is a temporal property of a chain of states  1 U  2 = “  1 is true until  2 becomes and stays true” X=3 y=0 X=1 y=1 X=1 y=2 0.2 X=2 y= s0s0 0.5  = (y>0) U (x>y) holds for this chain

PCTL: Probabilistic State Formulas uSpecify that a certain predicate or path formula holds with probability no less than some bound X=3 y=0 X=1 y=1 X=1 y=2 0.2 X=2 y= s0s0 0.5  = P >0.5 [(y>0) U (x=2)] False True False

Intruder Model Redux module crowds... // Record the apparent sender and deliver [] (badObserve & appSender=0) -> (observe0’=observe0+1) & (deliver’=true);... // Record the apparent sender and deliver [] (badObserve & appSender=15) -> (observe15’=observe15+1) & (deliver’=true);... endmodule Every time a hostile crowd member receives a message from some honest member, he records his observation (increases the count for that honest member)

Negation of Probable Innocence launch -> [true U (observe0>observe1) & done] > 0.5 “The probability of reaching a state in which hostile crowd members completed their observations and observed the true sender (crowd member #0) more often than any of the other crowd members (#1 … #9) is greater than 0.5” launch -> [true U (observe0>observe9) & done] > 0.5 …

Analyzing Multiple Paths with PRISM Use PRISM to automatically compute interesting probabilities for chosen finite configurations u“Positive”: P(K 0 > 1) Observing the true sender more than once u“False positive”: P(K i  0 > 1) Observing a wrong crowd member more than once u“Confidence”: P(K i  0  1 | K 0 > 1) Observing only the true sender more than once K i = how many times crowd member i was recorded as apparent sender

Size of State Space All hostile routers are treated as a single router, selected with probability 1/6

Sender Detection (Multiple Paths) uAll configurations satisfy probable innocence uProbability of observing the true sender increases with the number of paths observed… u… but decreases with the increase in crowd size uIs this an attack? Can’t avoid building new paths Hard to prevent attacker from correlating same-sender paths 1/6 of routers are hostile

Attacker’s Confidence u“Confidence” = probability of detecting only the true sender uConfidence grows with crowd size uMaybe this is not so strange True sender appears in every path, others only with small probability Once attacker sees somebody twice, he knows it’s the true sender uIs this an attack? Large crowds: lower probability to detect senders, but higher confidence that the detected user is the true sender 1/6 of routers are hostile