Formal Methods
Chapter 21
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-1
Formal Methods Chapter 21 Computer Security: Art and Science , 2 nd - - PowerPoint PPT Presentation
Formal Methods Chapter 21 Computer Security: Art and Science , 2 nd Edition Version 1.0 Slide 21-1 Outline Formal verification techniques Design verification languages Bell-LaPadula and SPECIAL Current verification systems
Chapter 21
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-1
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-2
systems
properties of specifications and programs
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-3
Classification criteria:
conclusion
values
everything in between
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-4
Classification criteria:
verification after system design is complete
concurrent, non-terminating (like an operating system) or terminating, and so forth
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-5
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-6
correctly implements SRI model
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-7
well-defined semantics, based on well-established mathematical concepts
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-8
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-9
MODULE Bell_LaPadula_Model give-access TYPES Subject_ID: DESIGNATOR; Object_ID: DESIGNATOR; Access_Mode: {OBSERVE_ONLY, ALTER_ONLY, OBSERVE_AND_ALTER}; Access: STRUCT_OF( Subject_ID subject; Object_ID object; Access_Mode mode);
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-10
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-11
FUNCTIONS VFUN active (Object_ID object) -> BOOLEAN active: HIDDEN; INITIALLY TRUE; VFUN access_matrix () -> Access accesses: HIDDEN; INITIALLY FORALL Access a: a INSET accesses => active(a.object);
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-12
and sets it to TRUE initially
set of triples (subject, object, right)
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-13
OFUN give-access(Subject_ID giver; Access access); ASSERTIONS active(access.object) = TRUE; EFFECTS access_matrix() = access_matrix() UNION (access); END_MODULE
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-14
added to matrix
transition and additional access rights for the new object
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-15
for design, implementation
formalize development process
hierarchy of a series of abstract machines at increasing level of detail
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-16
Requirements Model External Interfaces AM 1 Abstract Machine AM 1 Primitive Machine AM n Analyze, accept requirements Model proven internally consistent, used as basis for verifying lower AMs First AM is usually external interface, called Formal Top Level Specification Some combination of hardware and software that runs verified system Each AM mapped to next lower AM, which represents lower levels
up hierarchy
higher AM
specs, associated module specs for AMs, mapping specs between AMs
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-17
implemented in terms of lower-level AM
generated verification conditions
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-18
properties within a model
implementing a version of Bell-LaPadula model (called SRI model)
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-19
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-20
depend only on information with security levels no greater than subject
state variable
security level no greater than level of state variable can do the modification
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-21
SPECIAL model
and then the set verified using hierarchy consistency tool
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-22
functions and VFUN, OVFUN return values
assignment to state variables
failed, could not be proven
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-23
proof
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-24
techniques
substitutions to eliminate equality expressions
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-25
If formula reduced to TRUE or FALSE, done; otherwise formula could not be proven
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-26
EHDM addressed difficulties with HDM
use readily
such as concepts of AXIONM, THEOREM, LEMMA
interactive
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-27
proofs
their implementation
generator, theorem prover
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-28
language (Pascal base)
between routines
addition, deletion, moving component
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-29
access to shared memory
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-30
validated at runtime, or both
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-31
at end of path
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-32
(as of the publication date of this book)
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-33
cycle of software development
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-34
formulae
calculus, temporal logics
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-35
rats: THEORY BEGIN rat: TYPE zero: rat nonzero : TYPE {x | x ≠ zero} / : [rat, nonzero -> rat] * : [rat, rat -> rat] x, y : VAR left_cancellation : AXIOM zero ≠ x IMPLIES x * (y/x) = y zero_times : AXIOM zero * x = zero END rats
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-36
not vice versa)
type rat
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-37
cancellation’
left_cancellation _TCC1: OBLIGATION (FORALL (x: rat): zero ≠ x IMPLIES x ≠ zero)
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-38
1. Exploratory phase: developer tests specification proofs, revises high-level proof ideas as needed 2. Development phase: developer constructs proof in larger steps, works on making it efficient 3. Presentation phase: proof is sharpened, polished, checked 4. Generalization phase: developer analyzes proof, lessons learned, for future proofs
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-39
conditionals to top level of formula, another for deleting formulae from goal
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-40
avionics control
hardware devices
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-41
(next state)
least 1 path to the next states)
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-42
states s0, s1, s2 and propositional atoms p1, p2, p3
s0 ➝ s1, s0 ➝ s2, s1 ➝ s0, s1 ➝ s2, s2 ➝ s2
true in s2, p3 true in s0, s2
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-43
p1, p3 s0 p1 s1 p2, p3 s2
tree of all computational paths beginning at s0
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-44
s0 s2 s2 s1 s2 s2 s0 s2 s2
actions showing how it fails
hierarchy
needed
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-45
constants, logical and arithmetic operators, case and set operators
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-46
time
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-47
with the next state (t1, c2)
when p2 gets into the critical section
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-48
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-49
(n1,n2) s0 (t1,n2) s1 (n1,t2) s5 (t1,t2) s3 (c1,t2) s4 (c1,n2) s2 (t1,t2) s8 (t1,c2) s7 (n1,c2) s6
do so
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-50
simultaneously; in CTL, AG¬(c1 ∧ c2).
future state on the same path in which ci is true; in CTL, AG(ti➝AFci)
successor state ti; that is, in CTL, AG(ni -> EXti)
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-51
concurrent systems
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-52
and can do any operation (encryption, decryption) that a legitimate user can do
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-53
requirements of key distribution, agreement protocols
protocols
languages for various protocol verification systems
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-54
in which the protocol is to be used to help in finding a proof
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-55
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-56
dependent on global variables, local state
analyses than programs unimplemented using nonfunctional programming languages
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-57
programming language characteristics
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-58
become more scalable, formally verifying products becomes more feasible
security properties
program
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-59
violations
performance requirements
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-60
__soaap_var_read("decipher") int retval; __soaap_sandbox_persistent("decipher") void decipher(fdes in, fdes out) { char key[128] __soaap_private; if (getkey("Key:", key) < 0) retval = -1; while ((n = read(buf, 1023, in)) > 0) decrypt(buf, key); if (write(buf, n, out) != n) retval = -1; retval = 0; }
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-61
__soaap_sandbox_persistent(“decipher”)
__soaap_private
must be able to modify its value even though it is outside scope of sandbox
__soaap_var_read(“decipher”)
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-62
between each layer
interactive theorem prover
Version 1.0 Computer Security: Art and Science, 2nd Edition Slide 21-63