+ All Categories
Home > Documents > Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf ·...

Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf ·...

Date post: 09-Oct-2020
Category:
Upload: others
View: 9 times
Download: 0 times
Share this document with a friend
79
Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 1
Transcript
Page 1: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Computer Security, CSI 424/524

Lecture 3 - Decidability and Foundational Results

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 1

Page 2: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Secure Computer Systems: Some FundamentalQuestions

How can we determine if a given computer system is secure?• We need to define secure.

. Want a broad definition.

. Use ACM model without special rights copy and own.

. Enforce attenuation of privilege.

. Let R be the set of rights in the system.Definition 1. [Leaked Right] When a generic right r ∈ R is added toan element of the access control matrix not already containing r, rightr is said to be leaked.

. Note: Subjects with authorized transfers can be treated as ``trusted''and removed from the system.

. Leaking a right effectively enters the system into an unauthorizedstate.

Is there an algorithm that can check to see if a system issecure?• This is a decidability problem.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 2

Page 3: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Safety and Security

Let a computer system begin in state s0.

Definition 2. [Safe/Unsafe with respect to right r] If a systemcan never leak the right r (including the initial state s0) thesystem is called safe with respect to the right r. Otherwise,the system can leak the right r, and is said to be unsafe withrespect to the right r.

Safety refers to the model, security refers to the implementa-tion.• Safety is necessary but not sufficient for a secure system.

Definition 3. [Safety Question] The safety question asks: Isthere an algorithm for determining if a given protection systemwith initial state s0 is safe with respect to a generic right r?

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 3

Page 4: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Results for Mono-Operational Systems

Theorem 4. [Harrison, Ruzzo, Ullman] There is an algorithm that willdetermine whether a given mono-operational protection system with aninitial state s0 is safe with respect to a generic right r.

Proof:• Let there be k commands, c1, . . . , ck that represent the shortest sequence of

commands leaking right r from initial state s0. We can be sure certain classesof commands don't appear in c1, . . . , ck since:

. Commands don't test for the absence of rights, so delete and destroycommands don't affect the ability of a right to leak, and can beomitted.

. Only the first create matters, since we can rewrite constructs testingthe rights of a[s1, o1] and a[s2, o2] as testing the rights of a[s1, o1] ∪a[s2, o2]. Thus we can merge the rights and only create the firstsubject (since subject can be objects).Thus there are |S0|+ 1 subjects and |O0|+ 1 objects.

. Enter rights commands need to have their target adjusted to the singlenew subject created as described above.

• Let there be |R| = n (i.e. there are n distinct rights). Then there can be at mostn enter commands per ACM element, which means: k ≤ n(|S0|+1)(|O0|+1)+1.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 4

Page 5: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Results for Multi-Operation Systems

Unfortunately, the general case is harder.

Theorem 5. [Harrison, Ruzzo, Ullman] It is undecidable whethera given state of a state protection system is safe for a givenright.

Outline of the proof:• Enumerating all possible states is computable (but expensive), however, this will

not for all protection systems.

• We want to show that an undecidable problem (the Halting Problem) can besolved if we can solve the safety question.

• To do this, we reduce the halting problem to the safety question.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 5

Page 6: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Some Background: Automata Theory

Please recall the Halting Problem and Turing Machine definitions• The Halting Problem asks can we know if an arbitrary program on a Turing

machine will terminate?

• Definition 6. [Turing Machine] A Turing machine T is composed of:

. An infinite tape divided into an infinite number of cells, where eachcell contains a symbol. The alphabet contains a special blank symbolnot in the input for use on the tape.

. A head which can read and write symbols from/to the tape and moveone cell to the left (L) or right (R).

. A state register that records the current state of T .

. A transition function (or action table), δ which given the current stateand input tells the machine the next state, how to move the head andwhat symbol to write.

More formally T is a tuple, T = (s, Q, K, M, δ), where:

. K is a finite set of states

. s is the start state, s ∈ K.

. Q is the set of accepting (final) states, Q ⊆ K.

. M is the alphabet of symbols the machine processes, including theblank symbol which is not in the input alphabet.

. δ is the transition function, δ : K ×M → K ×M × {L, R}.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 6

Page 7: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Proof of Undecidability 1 of 5

Reductio ad Absurdum (Proof by contradiction)• Construct a method for expressing an arbitrary Turing machine as a Protection

State system, with the Turing machine, T , entering a final state (i.e. halting)corresponding to leaking of a generic right.

. Let n represent the rightmost cell scanned by T , i.e. cells 1, 2, . . . , nhave been scanned by Turing machine T .

. We can represent each cell as a Subject in the resulting protectionmodel.

. A generic right own is defined such that si owns si+1 for 1 ≤ i < k(since there are k subjects).

. If cell i has symbol A then subject si has generic right A over itself.

. Subject sk has end rights over itself.

. To indicate the heads position and state register, if the head is cell iand the current state is p then subject si has rights p over itself.

s1s2s3s4

s1 s2 s3 s4

DCBA1 2 3 4

Head

A

B

D,End

own

ownown

blank

k=4

State = p

C,p

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 7

Page 8: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Proof of Undecidability 2 of 5

• How to handle transition functions, consider δ(p, A) = (q, B, L) when the headis not in the leftmost cell.

command cp,A(si, si−1) {i f (own ∈ a[si−1, si] and A ∈ a[si, si] ) {

delete p from a[si, si] ;delete A from a[si, si] ;enter B from a[si, si] ;enter q from a[si−1, si−1] ;

}}

. A similar treatment works for the leftmost cell, but we substitutes1, s1 for the parameters (i.e. treat i− 1 = i for this special case).

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 8

Page 9: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Proof of Undecidability 3 of 5

• How to handle transition functions, consider δ(p, A) = (q, B, R) when the headis not in the rightmost cell.

command cp,A(si, si+1) {i f (own ∈ a[si, si+1] and A ∈ a[si, si] ) {

delete p from a[si, si] ;delete A from a[si, si] ;enter B from a[si, si] ;enter q from a[si+1, si+1] ;

}}

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 9

Page 10: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Proof of Undecidability 4 of 5

• How to handle transition functions, consider δ(p, A) = (q, B, R) when the headis in the rightmost cell.

command crightmostp,A(si, si+1) {i f (end ∈ a[si, si] and p ∈ a[si, si] andA ∈ a[si, si] ) {

delete end from a[si, si] ;create new subject si+1 ;enter own i n to a[si, si+1] ;enter end i n to a[si+1, si+1] ;delete p from a[si, si] ;delete A from a[si, si] ;enter B from a[si, si] ;enter q from a[si+1, si+1] ;

}}

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 10

Page 11: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Proof of Undecidability 5 of 5

It can be shown that the resulting ACM exactly simulates thecorresponding Turing machine.• Only one right in the corresponding ACM corresponds to a state.

• In each configuration of the protection system, there is only one applicablecommand (as per case analysis).

Suppose the Turing machine enters state qj

• Then, the protection system has leaked right qj

• Either the protection system is safe for the right qf ∈ Q (a halting state) or itis not.

• But whether T will enter qf corresponds to the undecidable halting problem.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 11

Page 12: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Properties of the Protection System 1 of 2

Theorem 7. [Denning] The set of unsafe systems is recursivelyenumerable.

Disallowing the create command makes the system tractable.• Definition 8. [P-Space (Computational Complexity)] P-space refers to a compu-

tational complexity class of decision problems that can be solved by a Turingmachine using polynomial storage (space).

• Theorem 9. [Harrison Ruzzo Ullman] For protection systems without the createprimitive, the question of safety is complete in P-Space.

• Definition 10. [Monotonic Protection Systems] Protection systems without thedelete and destroy commands are called monotonic (as they only grow in size).

• Theorem 11. [Harrison Ruzzo] It is undecidable if a given configuration of agiven monotonic protection system is safe for a given generic right.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 12

Page 13: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Properties of the Protection System 2 of 2

• Consider what happens if we restrict the complexity of predicates in the condi-tional statements in monotonic protection systems.

. Theorem 12. [Harrison Ruzzo] The safety question for biconditional(two conditions per command) monotonic protection systems is un-decidable.

. Simplifying helps to get a positive resultTheorem 13. [Harrison Ruzzo] The safety question for monoconditional(one condition per command) monotonic protection systems is decidable.

. A stronger result is:Theorem 14. [Harrison Ruzzo] The safety question for monoconditional(one condition per command) protection systems with create, enter,delete primitives, but without destroy primitives is decidable.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 13

Page 14: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Now What?

Using a straight ACM protection system model, can we deter-mine if a system is secure• There are several negative results

• And a few weak positive results.

• It is unlikely that a real system is sufficiently constrained to allow for directanalysis.

So what do we do?• Say I guess it's secure and go home?

. What about liability?

• Or perhaps we can try other (potentially less general) models.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 14

Page 15: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

The Take-Grant Protection Model State

The Take-Grant Protection model upports determining the safetyof a system with specific rules.

Represents a protection system's state as a labeled DirectedGraph (digraph) G = (V,E).• Vertices are either subjects, objects, or either subjects or objects.

• Edges are labeled according to the set of rights that the source vertexhas to the destination vertex. We denote an edge as an ordered pair(sourcevertex , destinationvertex).

Subject

Object

Subject or ObjectA B

A has right over B

γ

γ

• Rights are elements of a predefined set R.

. There are 2 distinguished rights, t for take and g for grant.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 15

Page 16: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

The Take-Grant Protection Model Transition Rules

Changing the protection state of the system corresponds tochanging the graph according to four graph rewriting rules(described later).

A single transition is shown by ` between the graphs (thegraphs may be drawn).

A finite sequence of transitions deriving G from G0 is denotedG0 `∗ G.

Definition 15. [Witness] A witness refers to a sequence ofrewriting rules G0 `∗ G. The rules may be listed and theirapplication may be drawn.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 16

Page 17: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Graph Rewriting Rules 1 of 4

There are 4 graph rewriting rules, called the de jure rules,in the Take-Grant Protection Model, where the inital graphG0 = (V0, E0) is transformed into the final graph G1 = (V1, E1).• Take Rule: Let x, y, z ∈ V0, and x be a subject and let edge (x, y) ∈ E0 be

labeled γ ⊆ R, t ∈ γ and edge (y, z) be labeled β and α ⊆ β. The take rulecreates a new graph G1(V1, E1) by adding an edge (x, z) labeled α to G0, soV0 = V1 and E1 = E0 ∪ {(x, z)}.

. This rule is written ``x takes α (to y) from z''.

G0 1G

x z y

βγ

x z y

βγt ∋

Take Rule

α

γ

β

U|α

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 17

Page 18: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Graph Rewriting Rules 2 of 4

• Grant Rule: Let x, y, z ∈ V0, and z be a subject and let edge (x, z) ∈ E0 belabeled γ ∈ R, g ∈ γ and edge (y, z) be labeled β and α ⊆ β. The grant rulecreates a new graph G1(V1, E1) by adding an edge (x, y) labeled α to G0, soV0 = V1 and E1 = E0 ∪ {(x, y)}.

. This rule is written ``x grants α (to y) from z''.

G0 1G⊥

x z y

βγ

x z y

βγg ∋

Grant Rule

α

γ

βU

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 18

Page 19: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Graph Rewriting Rules 3 of 4

• Create Rule: Let x ∈ V0, and x be a subject α ⊆ R. The create rule creates anew graph G1(V1, E1) by adding a vertex, y, y ∈ V1 and edge (x, y) labeled α

to G0, so V0 = V1 ∪ {y} and E1 = E0 ∪ {(x, y)}.. This rule is written ``x creates (α to) new vertex y''.

G0 1Gx

⊥ α

x y

Create Rule

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 19

Page 20: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Graph Rewriting Rules 4 of 4

• Remove Rule: Let x, y ∈ V0, and x be a subject and let edge (x, y) ∈ E0 belabeled β ∈ R and α ⊆ β. The remove rule creates a new graph G1(V1, E1) bydeleting the rights α from the edge (x, y), so that the label becomes β − α. Ifα = β then β − α = ∅ and the edge (x, y) is removed, so V0 = V1 and eitherE1 = E0 (although the edge label for (x, y) changes) or E1 = E0 − {(x, y)}.

. This rule is written ``x removes (α to) y''.

G0 1G

1G

βα Ux

β ⊥

yx

x

y

β − αif

α=βify

Remove Rule

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 20

Page 21: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Checking Security Using TG-Models

The TG-model supports analysis of a particular protection sys-tem.• E.G. suppose we want to answer a question like: ``Can a competitor access my

files?''.

• The analyst must know the rules governing the underlying protection system.

• The model must correctly capture these rules to accurately describe the underly-ing system.

A fundamental aspect of security is determining if one entityin the system can acquire rights held by another entitity.• In the TG system, the entities are either subjects or objects (or for purposes of

theoretical analysis, labeled as unknown type).

• The transfer of priveleges is called ``sharing''.

• We want to know when sharing can occur.

• Recall: Rights are drawn as labels on edges between entitites (verticees).

• Informally, sharing of right α between vertices x and y occurs when an applica-tion of the de jure rules allows us to draw an edge from x to y with label α inthe TG graph.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 21

Page 22: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

A TG system example (In class exercise)

Consider a system with 2 processes, p and q that have r, waccess to local memory locations u and v respectively.• What would G0 look like?

• Can we express this using the Take Grant model?

• What steps using the de jure rules would we take to create this system ifG0 = (V0, E0) and V0 = ∅ and E0 = ∅.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 22

Page 23: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

A TG system example 2 (Solution)

• The system would look like:

p

q

u

v

r,w

r,w

• There is no valid sequence of steps to generate this system from the emptygraph G0 = (∅, ∅) since the create rule requires a preexisting subject, and noother rule can add subjects or objects to the system.

• Suppose instead of an initial system, there was a trusted object s (e.g. anoperating system) and no other objects in the initial system, so G0 = (V0, E0)

where, V0 = {s} and E0 = ∅. Suppose that we wanted to create a system wheres had g (grant) rights over subjects (processes) p and q which has r, w rightsover local memory objects u and v respectively.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 23

Page 24: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

A TG system example 2 (Solution)

• The system would look like:

p

q

u

v

r,w

r,w

g

gs

G n

s

G 0

⊥ ∗

• A valid sequence of steps to create the final system from G0 would be:

. s creates g to new subject vertex p

. s creates g to new subject vertex q

. p creates r, w to new object vertex u

. q creates r, w to new object vertex v

• Suppose we want to create a shared memory object b through which both p andq communicate (i.e. have r, w rights). What would the resulting system look likeand can we generate it from Gn using the de jure rules?

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 24

Page 25: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

A TG system example 3 (Solution)

• The system would look like:

p

q

u

v

r,w

r,w

g

gs

G n

r,w

r,wb

• A valid sequence of steps to create this system from Gn would be:

. s creates r, w to new object vertex b

. s grants r, w to b to vertex p

. s grants r, w to b to vertex q

. s removes (r, w to) b

• Suppose we want to limit communication through b so that p sends to q, whatwould the system look like and what de jure rules would need to be applied (trythis at home).

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 25

Page 26: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Symmetry Rules in TG Models

Bishop's Lemmas 3.1 and 3.2 show symmetry for take/grantusing repeated application of the de jure rules.

x z yx z y

α

*α αt t

⊥ *

z yxyzx

g g

α

αα

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 26

Page 27: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Proof of Bishop's Symmetry Lemma 3.1

xz y

αt

v

tgx z y

αt

xz y

αt

v

tgg

y

αt

v

tg g z

α

x z y

α

* αt

Lemma 3.1 (What we want to prove)

x z y

αt

⊥ x creates tg to new vetex v

z takes g to v from x

⊥⊥

z grants to y to vα

x

x takes to y from v

y

t

v

tg g z

α

α

α

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 27

Page 28: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Sharing of Rights in Take-Grant Protection Models

Some definitions• Definition 16. [CanShare Predicate] The predicate CanShare(α, x, y, G0) is true

for a set of rights α and vertices, x and y if1. there is a sequence of protection graphs G1, . . . , Gn, such that G0 `∗ Gn

using only the de jure rules and2. in G1 there is an edge (x, y) labeled α.

• Definition 17. [tg-path] A tg-path is a nonempty sequence v0, . . . , vn of distinctvertices such that for all i, 0 ≤ i < n, there is an edge (vi, vi+1) with a labelcontaining either t or g.

• Definition 18. [tg-connected] Vertices are tg-connected if there is a tg-pathbetween them.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 28

Page 29: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Sharing of Rights in Take-Grant Protection Models

Some definitions• Definition 19. [CanShare Predicate] The predicate CanShare(α, x, y, G0) is true

for a set of rights α and vertices, x and y if1. there is a sequence of protection graphs G1, . . . , Gn, such that G0 `∗ Gn

using only the de jure rules and2. in G1 there is an edge (x, y) labeled α.

• Definition 20. [tg-path] A tg-path is a nonempty sequence v0, . . . , vn of distinctvertices such that for all i, 0 ≤ i < n, there is an edge (vi, vi+1) with a labelcontaining either t or g.

• Definition 21. [tg-connected] Vertices are tg-connected if there is a tg-pathbetween them.

• Definition 22. [Island] An island is a maximal tg-connected subject only sub-graph.

. It can be shown that any right posessed by any vertex in an island canbe shared with any other vertex in the island.

. Can we transfer rights between islands? If so, how?

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 29

Page 30: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Sharing of Rights in Take-Grant Protection Models

Some Notation and definitions• Notation:

←g ,→g ,←t ,→t use arrows to indicate directions of connection between

vertices of edges with t or g in the labels.

. We can construct words composed of symbols from {←g ,→g ,←t ,→t } to

describe the sequence of labels and edge directions on a tg-path.. If a tg-path has length 0 it is called a null path and is considered

having the reserved label ν.

.←g∗

(Kleene Star) means zero or more repetitions of←g , i.e. ν,

←g ,←g←g

, . . . , and likewise with all symbols except ν.

• Definition 23. [bridge] A bridge is a tg-path with subject endpoints v0, vn and

has the associated word in {→t∗,←t∗,→t∗→g←t∗,→t∗←g←t∗}.

. Note that since both endpoints are subjects the bridge can be used totransfer rights between them.

. Rights can be shared between subjects in the same island, can weshare rights between islands?

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 30

Page 31: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Sharing of Rights in Take-Grant Protection Models

• Definition 24. [SubjectCanShare (Lipton and Snyder)] The predicateSubjectCanShare(α, x, y, G0) is true iff ∃(x, y) ∈ G0 labeled α or if both thefollowing hold true at the same time:

1. ∃s ∈ G0 where s is a subject with edge (s, y) having label α and2. There are islands I1, . . . , In, such that x ∈ I1, s ∈ In and ∀j, 1 ≤ j < n

there is a bridge from Ij to Ij+1.

• Subjects can act, but objects cannot, so we need rules and notation for handlingsharing of rights in cases may involve objects.

. Definition 25. [Initally Spans] A vertex x initially spans to y if x isa subject and there is a tg-path between x and y with an associatedword in {

→t∗→g} ∪ {ν}.

. I.e. x initially spans to y if x can grant some of its rights to y.

. Definition 26. [Terminally Spans] A vertex x terminally spans to y ifx is a subject and there is a tg-path between x and y with anassociated word in {

→t } ∪ {ν}.

. I.e. x terminally spans to y if x can take any right y possesses.

These rights imply take and grant are not symmetric if an object is an end point.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 31

Page 32: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

The CanShare Theorem

• Sharing can now be generalized to handle objects as endpoints, with the followingnecessary and sufficient condition for rights to be transferred from vertex y toanother vertex x.

. Theorem 27. [CanShare (Jones, Lipton and Snyder)] The predicateCanShare(α, x, y, G0) is true iff ∃(x, y) ∈ G0 labeled α or if thefollowing all hold true at the same time:1. ∃s ∈ G0 with edge (s, y) having label α,2. There is a subject vertex x′ such that either x = x′ or x′ initially

spans to x.3. There is a subject vertex s′ such that either s = s′ or s′ terminally

spans to s.4. There are islands I1, . . . , In, such that x′ ∈ I1, s′ ∈ In and ∀j, 1 ≤

j < n there is a bridge from Ij to Ij+1.. Proof Outline:

. Because, as per property 2, s′ terminally spans to s, s′ canacquire α rights to y.

. All subjects in In can acquire α rights to y (follows fromdefinition of Island).

. The presence of bridges between the islands permits island Ij−1

to get these rights from island Ij for 1 < j ≤ n (allowing forinduction and trasitivity).

. Since, as per property 4, x′ initially spans to x and can passthose rights to x.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 32

Page 33: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

The CanShare Theorem's Corollary

• Corollary 28. [To Theorem 27 (Jones, Lipton and Snyder)] There is an algorithmof complexity O(|V0|+ |E0|) that tests the CanShare predicate, where V0 is theset of vertices and E0 is the set of edges in G0.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 33

Page 34: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Some Properties of TG Models

Recall that in many real systems, the system initially has asingle trusted entity (the operating system) that is modeledas a single subject that creates all other subjects. In thesesystems the resulting TG graph has the following properties.• Theorem 29. [(Snyder)] Let G0 be a protection graph containing exactly one

subject vertex, no edges and R be a set of rights. Then G0 `∗ G iff G isa finite directed acyclic graph containing subjects and objects only, with edgeslabeled with nonempty subsets of R and one subject with no incoming edges.

This allows us to bound the amount of work required to con-struct G from G0.• Corollary 30. [To Theorem 29 (Snyder)] A k-componenent graph with n-edge can

be constructed in t rule applications, where 2(k − 1) + n ≤ t ≤ 2(k − 1) + 3n.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 34

Page 35: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Defining Theft in the Take Grant Model

The proof of Theorem 27 about CanShare shows that coopera-tion is needed by all subjects in the witness.

Stealing in the Take Grant model refers to when some node xacquires a right, say α to y without any node granting alpha toy. We can define a predicate describing vulnerability to theft:• Definition 31. [CanSteal] Let G0 be a protection graph containing distinct ver-

tices x and y and let R is a set of rights with α ⊆ R. The predicateCanSteal(α, x, y, G0) holds true ifthere is no edge (x, y) labeled α in G0 andthe following hold true simultaneously:1. defn:CanSteal:cond1 ∃(x, y) ∈ Gn with (x, y) labeled α.2. There is a sequence of rule applications ρ1, . . . , ρn such that Gi−1 ` Gi using

ρi.3. For all vertices v, w ∈ Gi−1, if there is an edge (v, y) ∈ G0 labeled α, then

ρi is not of the form ``v grants α to y to w''.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 35

Page 36: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

An example of theft

αgs

tt

u

w

v

t

G0

αgs

tt

u

w

v

t

t

s takes (t to u) from v

Show s can steal from wα

v

αs

tt

u

wg ⊥

u grants (t to v) to s

⊥αgs

tt

u

w

v

t

t

s takes ( to w) from u

α

α

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 36

Page 37: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Conditions Allowing Theft in the Take Grant Model

• Theorem 32. [CanSteal, Necessary and Sufficient Conditions (Snyder)] The predi-cate CanSteal(α, x, y, G0) holds true iff the following hold true simultaneously:

1. @(x, y) ∈ G0 with (x, y) labeled α.2. There is a subject vertex x′ ∈ G0 such that either x′ = x or x′ initially spans

to x.3. There is a vertex s ∈ G0, with an edge labeled α to y in G0 and for which

CanShare(α, x, y, G0) holds.

• Proof:

. ⇒ --- Assume the conditions hold, proof is done via construction ofthe path.

. ⇐ --- Assume CanSteal(α, x, y, G0) holds. There is no α labeled edge (as per condition ?? in Definition 31

of CanSteal).. In the final graph, Gn there will be an edge (x, y) ∈ Gn labeled

α as per condition ?? of Theorem 27 since CanShare(α, x, y, G0)holds.

. As per the CanShare theorem ?? condition 2, s must exist.

. CanShare(α, x′, s, G0) - s cannot grant α to y (by definitionof CanSteal). It can be shown that applying the take ruleaccomplishes the sharing.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 37

Page 38: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Conspiracy in the Take Grant Model

Conspiracy --- A conspiracy relies on the set of cooperatingsubjects in the theft witness.• Want to find the minimal set of subjects needed to allow CanShare(a, x, y, G0).

Definition 33. [Access set] Access set A(y) with focus y isA(y) = {y}∪ set of vertices which y initially spans to ∪ the setof vertices to which y terminally spans. Note that y must be asubject

Definition 34. [Deletion set] The deletion set δ(y, y′) is all z ∈A(y) ∩A(y′) such that• y initially spans to z and y′ terminally spans to z and

• y terminally spans to z and y′ initially spans to z and

• z = y and

• z = y′.

Create a conspiracy graph that shows how rights can flow.• if δ(y, y′) 6= ∅ add an edge from y to y′.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 38

Page 39: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Quick Recap

The HRU (Harrison Ruzzo Ullman) Model is general, but isundecidable.

The Take Grant Model can be applied to specific systems, andthose applications can be analyzed.

So why is the HRU model undecidable but the TG model decid-able?

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 39

Page 40: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Schematic Protection Model (SPM)

The Schematic Protection Model (SPM) is type based.• Rights in SPM are partitioned into the set of control rights (RC) that allow

updates to the rights in the protection system or inert rights (RI).

. E.g. create, take, grant and remove are control rights, while readrights is inert.

. SPM ignores the effect of applying inert rights, but not control rights.

. Rights are manipulated in SPM via two relationships, the Link Predicateand the Filter Function.

• The copy flag, denoted c, is an attribute that can be applied to a right, say r

with copy flag is denoted r : c, and allows the owner to transfer the associatedticket to another domain.

• Protection Types are labels describing how control rights affect that entity.

. The set of protection types is denoted T , which is partitioned into theset of subject types TS and the set of object types TO.

• Tickets are descriptions of rights. An entity has a set of tickets describing itsrights, called a domain.

. Notation: Ticket X/r allows the holder r rights to entity X, anddom(X) denotes the domain of X.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 40

Page 41: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Link Predicates in SPM

Links describe relationships between two subjects depending ononly the tickets possessed by the subjects.• Definition 35. [Link Predicate linki(X, y)] Let X, Y be subjects and z ∈ RC

be an arbitrary control right. Recall that dom(X) denotes the tickets held byX. Then the Link Predicate linki(X, Y ) is a conjunction or disjunction (but nota negation) of the following terms:1. X/z ∈ dom(X)

2. X/z ∈ dom(Y )

3. Y/z ∈ dom(X)

4. Y/z ∈ dom(Y )

5. true

• Definition 36. [Scheme] A scheme is a finite set of link predicates {linki|1 ≤i ≤ n}. If n = 1 we omit the subscript i.

• Some Examples

. link(X, Y ) = X/b ∈ dom(X) connects X to every other entity Yprovided X has b rights over itself.

. link(X, Y ) = true -- the universal predicate does not depend on ticketsheld by X or Y .

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 41

Page 42: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Filter Functions in SPM

A filter function, fi imposes conditions on when a transfer oftickets can occur, with fi associated with linki.• fi : TS × TS → tT×R has

. Domain is pairs of subjects appearing in a link predicate

. Range is the set of copyable tickets

• Thus a ticket X/r : c can be copied from dom(Y ) to dom(Z) iff there is a i

for which the following hold:1. X/r : c ∈ dom(Y )

2. linki(Y, Z)

3. τ(X)/r : c ∈ fi(τ(Y ), τ(Z))

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 42

Page 43: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

An SPM Example

Consider an Owner-Based policy, i.e. a subject U can authorizeanother subject V to access F iff U owns F .• Suppose users are the subjects and files are the objects, then TS = {users} and

TO = {files}.• Typical types of access might be Read, Write, Append and eXecute.

• Ownership can be modeled using the copy attribute.

. The set of inert rights are RI = ∅.

. The set of control rights are RC = {r : c, w : c, a : c, x : c}.

• Since the owner can authorize any subject to access an object, link(U, V ) = true

• The filter function supports authorization for all rights, so

f(user , user) = {file/w, file/r, file/afile/x}

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 43

Page 44: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Another SPM Example

Consider the take grant model, suppose that subjects may haveread or write access to objects• The set of subject types is TS = {subject}.• The set of object types is TO = {object}.• The set of inert rights is RI = {r, w}.• The set of control rights is RC = {t, g}.• Transferring rights requires t or g access, so

link(p, q) = p/t ∈ dom(q) ∨ q/g ∈ dom(p)

.

• Since any right can be transferred between linked subjects, the filter function is:

f(subject, subject) = {subject, subject} × {tc, gc, rc, wc}

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 44

Page 45: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

The SPM Demand Operation

The demand function, d : TS×TS → 2T×R, authorizes a subjectto demand a right from another entity.• Let a, b ∈ TS be subject types and r ∈ R be a right.

• Then a/r : c ∈ d(b) means that every subject of type b can demand a ticketX/r : c for all X such that τ(X) = a.

• Sandhu demonstrated that a careful construction (omitted here) can avoid theneed for demand functions in SPM.

. So more recently developed models don't employ demand functions.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 45

Page 46: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

The SPM Create Operation

The create operation adds types and their rights to SPM sys-tems, consider two issues• When are creates permitted (can-create)

• The create-rule describing adding types or entities and their rights.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 46

Page 47: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

The SPM Can-Create

The Can-Create (cc) relation cc ⊆ TS × T indicates that anobject of type a can create an entity of type b iff cc(a, b)holds.• Sometimes for notational convenience (as per Sandhu) cc : TS → 2T

. so if we write cc(a) = S, a ∈ TS , S ⊆ T , subjects of type a arepermitted to create entities whose types are in S.

• We can construct a can create relation graph GC = (VC, EC) with types asvertices (so T = VC) and edge (a, b), a, b ∈ VC iff cc(a, b).

• The rule of acyclic create states that the can create relation graph should nothave cycles.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 47

Page 48: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

The SPM Create-Rule

Let a ∈ TS be a subject type and b ∈ T be an entity type.

The create-rule, cr(a, b), specifies the set of tickets generatedwhen subject A of subject type a = τ(A) creates entity B oftype b = τ(B).• if b ∈ TO (i.e. B is an object of type b), the rule specifies that

cr(a, b) ⊆ {b/r : c ∈ RI} (i.e. only inert tickets can be generated).

• otherwise b ∈ TS (i.e. B is a subject of type b), has two sets of rights when

. if a 6= b, i.e. a and b are different types then. crp(a, b) --- ``parent rights'' inserted into a,

dom(A) gets B/r : c iff b/r : c ∈ crp(a, b).. crc(a, b) --- ``child rights'' inserted into b.

dom(B) gets A/r : c iff a/r : c ∈ crc(a, b).. Otherwise a = b so parent and child are the same type (i.e. cr(a, a))

. Tickets belonging to the creator (parent) are labeled self /r : c

. Tickets belonging to the created (child) are labeled a/r : c.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 48

Page 49: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Attenuating Creates and Safety Result

Definition 37. [attenuating create rule] A create rule, cr(a, b)is attenuating if:• crc(a, b) ⊆ crp(a, b) and

• a/r : c ∈ crp(a, b)⇒ self /r : c ∈ crp(a, b)

A scheme is attenuating if for all types a such that cc(a, a)then cr(a, a) is attenuating.

A Safety Result• If the scheme is acyclic and attenuating, security is decidable.

Safety results analyzed using an approach like Max Flow prob-lem.• Each system has a maximal state (from theorems in book)

• The attenuating property of a creat rule implies that the parent cannot give thechild any rights it does not already posess

. This is analagous to conservation of flow.

. This permits derivation of the maximal state.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 49

Page 50: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Expressive Power of SPM relative to HRU 1 of 2

Both HRU and SPM capable of expressing any take/grant model• HRU/Access Control matrix approach can express take/grant model

• SPM can express take/grant models since

. Subject/Object protection types are in SPM

. SPM's tickets are rights labels on edges

. take/grant are control rights

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 50

Page 51: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Expressive Power of SPM relative to HRU 2 of 2

What about relative the expressiveness of SPM and HRU?• HRU - Can Support ``Multi-parent'' create, e.g.

// creates object o and g ives subjects s1 and s2

// g ives r r i g h t s over o

// precondit ion so and s1 must have the ` ` parent r i g h t ' ' , p

command Mult iCreate(s0, s1, o) {i f (p ∈ a[s0, o] and p ∈ a[s1, o] ) {

create object o ;enter r i n to a[s0, o] ;enter r i n to a[s1, o] ;

}}

• SPM - Lacks Multi-parent create and has no revocation of rights/removal ofentities

Multi-Parent create solves problems of mutual suspiscion.• Parents jointly create a proxy and each gives proxy the rights needed to do the

job.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 51

Page 52: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Extended SPM

Extended SPM (ESPM) adds multiparent create to SPM

Consider how SPM create works works• CanCreate relation

. Recall, in traditional SPM cc ⊆ TS × T

. ESPM generalizes this so cc ⊆ TS × TS · · · × TS × T .. For notational convenience we may write

cc : TS × TS × · · · × TS → T

• Create Rules:

. Each parent Xi, 1 ≤ i ≤ n of child Y in an n-parent create has a rule:

crPi(τ(X1), . . . , τ(Xn), τ(Y ) = Y/R1,i ∪X/R2,i

. The child Y has a rule of the form:

crC(τ(X1), . . . , τ(Xn), τ(Y ) = Y/R3 ∪X/R4,1 ∪ · · · ∪X/R4,n

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 52

Page 53: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

An ESPM Example

Suppose Anne and Bill want to cooperate to do something, butthey don't trust each other.• e.g. Gamblers want to ensure the bet will be paid.

• e.g. Stock market trading transactions need to be enforced.

Jointly create a proxy endowed with only the needed rights.• e.g. Designate a bookkeeper/casino/gambling house to escrow wagers.

• e.g. Establish stock exchanges like NASDAQ, NYSE, etc.

Extended SPM (ESPM) is SPM with multi-parent create extensions• Let a be the type of Anne and Bill i.e. τ(Anne) = τ(Bill) = a.

• Let p be the type of the proxy

• cc(a, a) = {p}.• crAnne(a, a, p) = crBill(a, a, p) = ∅

. i.e. don't give Anne or Bill rights over the proxy

• crproxy(a, a, p) = {Anne/x, Bill/x}. Where x is the set of rights needed for the proxy to do its job.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 53

Page 54: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

ESPM Multi-Parent Creates

So we considered 2-parent creates• What if we have more than 2-parents

• Can we emulate a n-parent create with a 2-parent create?

. It seems we can (if we can do n+1-parent create) induction will allowus to handle arbitrary n

Consider a 3-parent create, what operations must be supported?• Let parents be subjects P1, P2, P3, child be C

• CanCreate cc(τ(P1), τ(P2), τ(P3)) = Z ∈ T .

• Create Rule has both parent and child side semantics

. crP1(tau(P1), τ(P2), τ(P3)) = C/R1,1 ∪ P1/R2,1

. crP2(tau(P1), τ(P2), τ(P3)) = C/R1, 2 ∪ P2/R2,2

. crP3(tau(P1), τ(P2), τ(P3)) = C/R1, 3 ∪ P3/R2,3

. crC(tau(P1), τ(P2), τ(P3)) = C/R3 ∪ P1/R4,1 ∪ P2/R4,2 ∪ P3/R4,3

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 54

Page 55: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

ESPM Emulating 3-parent creates

Suppose we only have 2-parent creates but want to emulate a3 parent-create• Introduce new entitites:

. Agents of Parents: A1, A2, A3 where ai = τ(Ai)

. Agent of Child: S, s = τ(S)

• Introduce new right t indicating parentage.

. So X/t ∈ dom(Y ) means Y has X as a parent.

• Introduce new rules:

. CanCreate:. cc(τ(P1)) = a1

. cc(τ(P2, a1) = a2

. cc(τ(P2, a2) = a3

. cc(τ(a3) = S (agent of all parents creates child's agent)

. cc(τ(s) = C (Child's agent creates child/proxy). CreateRule: Need a distinct rule for each parent

. crPfirst(τ(P1), τ(P2), τ(C)) refers to rights given to P1.

. crPSecond(τ(P1), τ(P2), τ(C)) refers to rights given to P2.

. crC(τ(P1), τ(P2), τ(C)) refers to rights given to C

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 55

Page 56: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

ESPM Emulating 3-parent creates, Some Notes

In ESPM the copy right notation omits semicolon• so X/rc in ESPM corresponds to X/r : c in SPM

A correct emulation only gives rights to parents after success-fully creating the child (aborted creates should not escalateprivilege).• Handled in the link predicates

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 56

Page 57: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

ESPM Emulating 3-parent creates, Create Rule

Create rules for emulating a 3-parent create using 2-parentcreates:• crPfirst(p3, a2, a3) = ∅• crPsecond(p3, a2, a3) = ∅• crC(p3, a2, a3) = p3/Rtc ∪ a2/tc

. Child agent a3's parents set to p3 and a2, child given rights R over p3

• crP (a3, s) = ∅• crC(a3, s) = a3/tc

. s has a3 as parent.

• crP (s, c) = C/Rtc

• crC(s, c) = c/R3t

. Child agent gets full rights over child, child gets R3 over agent.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 57

Page 58: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

ESPM Emulating 3-parent creates, Link Predicates

Recall Link predicate indicates links over which rights can flow

Idea: No tickets to parents until child is created.• Enforced by requiring each agent to have its own parent rights.

• link1(A1, A2) = A1/t ∈ dom(A2) ∧ A2/t ∈ dom(A2)

• link1(A2, A3) = A2/t ∈ dom(A3) ∧ A3/t ∈ dom(A3)

• link2(S, A3) = A3/t ∈ dom(S) ∧ C/t ∈ dom(C)

• link3(A1, C) = C/t ∈ dom(A1)

• link3(A2, C) = C/t ∈ dom(A2)

• link3(A3, C) = C/t ∈ dom(A3)

• link4(A1, P1) = P1/t ∈ dom(A1) ∧ A1/t ∈ dom(A1)

• link4(A2, P2) = P2/t ∈ dom(A2) ∧ A1/t ∈ dom(A2)

• link4(A3, P3) = P3/t ∈ dom(A3) ∧ A1/t ∈ dom(A3)

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 58

Page 59: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

ESPM Emulating 3-parent creates, Filter Functions

Recall Filter functions specify which rights are copied from oneentity to another.• f1(a2, a1) = a1/t ∪ c/Rtc

• f1(a3, a2) = a2/t ∪ c/Rtc

• f2(s, a3) = a3/t ∪ c/Rtc

• f3(a1, c) = p1/R4,1

• f3(a2, c) = p2/R4,2

• f3(a3, c) = p3/R4,3

• f4(a1, p1) = c/R1,1 ∪ p1/R2, 1

• f4(a2, p2) = c/R1,2 ∪ p1/R2, 2

• f4(a3, p3) = c/R1,3 ∪ p1/R2, 3

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 59

Page 60: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

ESPM Emulating 3-parent creates, Order of Creates

Initially, create agents A1, A2, A3, S and child C, what ticketsare granted by the create rule?• Parents P1, P2, P3 have no relevant tickets

• A1 has P1/Rtc (rights R over P1 and P1 is the parent)

• A2 has P2/Rtc ∪ A1/tc

• A3 has P3/Rtc ∪ A2/tc

• S has S/Rtc ∪ C/tc

• c has c/R3t

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 60

Page 61: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

ESPM Emulating 3-parent creates, Post Create Rights

Now apply link rules and filter functions• Propagate Rights to the child via the agents

• Only link2(S, A3) holds so apply f2(s, a3)

. A3 has P3/Rtc ∪ A2/t ∪ A3/t ∪ C/Rtc

• This makes link1(A3, A2) true so apply f1(a3, a2)

. A2 has P2/Rtc ∪ A1/t ∪ A2/t ∪ C/Rtc

• Now link1(A2, A1) is true so apply f1(a2, a1)

. A2 has P2/Rtc ∪ A1/t ∪ A2/t ∪ C/Rtc

• Now all link3 rules true so apply f3

. C has C/R3 ∪ P1/R4,1 ∪ P2/R4,2 ∪ P3/R4,3

• Propagate rights to the the Parents• Now all link4 rules true, so apply f4

. P1 has C/R1,1 ∪ P1/R2,1

. P2 has C/R1,2 ∪ P1/R2,2

. P3 has C/R1,3 ∪ P1/R2,3

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 61

Page 62: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

ESPM Multi-Parent Create - Correctness andGeneralization

Some correctness properties:• The emulation gives the appropriate rights to P1, P2, P3 and C

• If create of C fails, then link2 will be false, preventing inappropriate rightstransfers to P1, P2 or P3.

Given a 2-parent create, an n-parent create can be emulatedwith a fixed (finite) number of extra types, rights, link rulesand filter functions.• Proof follows from the previous construction.

• Construction can be generalized to emulate a n-parent create from an (n − 1)-parent create.

• Apply induction to get down to base case 2-parent create.

• Note: The two systems may have different initial states.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 62

Page 63: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

ESPM Simulation Using Graphs

Amman, Sandhu and Lipton reprecent an ACM using a digraph• A vertex is an entity with a static type assigned at creation.

• Each edge corresponds to a right, edges have a static type assigned at creation.

• Allowed operations are:

. Initial State Operations - Create the graph in a particular state

. Node Creation Operations - Add new vertices and edges with thosevertices as targets.

. Edge adding Operations - Add new edges between existing vertices.

• A scheme is a finite state machine that defines a set of node types, edge types,initial state operations, node creation operations and edge adding operations.

• A model is a set of schemes

• Scheme A and scheme B correspond iff the graph containing the state in schemeA is identical to the subgraph in B obtained by removing all nodes and edges inB that don't have types found in A.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 63

Page 64: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

ESPM Simulation Using Graphs - An Example

Consider simulating 2-parent emulation of 3-parent create• First, recall 3-parent create (without 2-parent emulation)

. Initial state P1, P2, P3, no edges

. Create vertex C of type c with edges of type e (drawn as solid lines).

P1 P P2 3

P1 P P2 3

C

Initial state (before 3−parent create)

Add vertex C and edges of type efrom Parents to child

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 64

Page 65: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

ESPM Simulation Using Graphs - Child Creation. Create Agent of child S

. Create Agent Child C

P1 P P2 3 Initial state (before 3−parent create)

P1 P P2 3

A1 A A2 3

P and A create A of type a with edge of type e’

P and A create A of type a with edge of type e’2

3

1 2

2 3

P1 P P2 3

A1

P creates A of type a with edge of type e’1 1

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 65

Page 66: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

ESPM Simulation Using Graphs - Add Edges. Use transitive closure of paths to create edges from P1, P2, P3 to child.

. P1 → A1 → A2 → A3 → S → C to add edge of type e from P1 to C

. P2 → A2 → A3 → S → C to add edge of type e from P1 to C

. P3 → A3 → S → C to add edge of type e from P1 to C

P1 P P2 3

A1 A2A3

SC

P1 P P2 3

A1 A2A3

SC

A creates S with edge of type e’3

S creates C with edge of type e’

P adds edge of type e to CP adds edge of type e to CP adds edge of type e to C

1

23

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 66

Page 67: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Simulation Fidelity (Equivalence under Simulation)

Consider our example - 2-parent create simulation of 3-parentcreate• P1, P2, P3, C vertices simliar (with same type) and edges of type e similar.

• In 3-parent case doesn't have the new vertex type a for A1, A2, A3, S and newedges of new type e′ found in the 2-parent emulation.

. By definition, 2-parent emulation corresponds to 3-parent create.

Scheme A simulates schem B iff both• For every reachable state b in scheme B there is a corresponding state a in A,

and

• For every state a reachable by A, either the corresponding state b is reachableby B or there is a successor a′ reachable by A that corresponds to a statereachable by B.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 67

Page 68: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Model Expressiveness

Given two models, MA and MB which is more expressive?• If MB cannot simulate every scheme in MA, then MB is at less expressive than

MA.

• If MB can simulate every scheme in MA, them MB is as expressive as MA.

. Note: It is possible that MB may be more expressive than MA.

• If MA is as expressive as MB and MB is as expressive as MA then MA and MBare equivalent.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 68

Page 69: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Model Expressiveness an example

Consider scheme A in model M

• Nodes X1, X2, X3

• 2-parent create supported

• No edge adding operations for this particular model.

• Initial condition: X1, X2, X3, no edges.

Consider Scheme B in model N

• Same as M but has only 1-parent create.

So which model is more expressive?

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 69

Page 70: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Model Expressiveness, Solution

Consider model M , can it express all schemes in model N ?• Consider single parent create in N where X1 creates Y .

• Can M emulate N's 1-parent create using 2-parent create?

. Yes, let X1 = X2 (make them the same node)

Now consider 1-parent create of model N , can N emulate M ?• Consider 2-parent create where parents X1 and X2 create Y .

. Here we show a specific example, but generally 2-parent creates sup-port nodes having an even in-degree.

• After 2-parent create in M, in-degree of child, Y , is 2 (an even number).

. Try X1 creates Y in N.

. However, N lacks edge create operations (as per the given).

. So edge from X2 to Y cannot be constructed.

. Using X2 as parent gives similar symmetric result.

• So M (with 2-parent create)is more expressive than N (with 1-parent create).

So which model is more expressive?• M (with 2-parent create) is more expressive than N with 1-parent create.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 70

Page 71: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Some Theorems

Monotonic single-parent create models are less expressive thanmonotonic multi-parent create models.

ESPM is more expressive than SPM• ESPM monotonic with multi-parent creates.

• SPM monotonic but has only single-parent creates.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 71

Page 72: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Typed Access Matrix Model (TAM)

TAM extends ACM by introducing a set of types, T .• TS is the set of subject types.

• Objects have a set of types (the book gives no notation) T − TS .

The protection state in TAM is (S, O, τ,A)• S is the set of subjects.

• O is the set of objects.

• τ : O → T is the type function, specifying the type of each object.

• A is the access control matrix.

Operations in TAM like in ACM except create operations areaugmented with types.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 72

Page 73: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Create operations in TAM

CreateSubject(s, ts).• Create Subject s of type ts.

• Precondition: s 6∈ S

• PostConditions: S′ = S ∪ {s}, O′ = O ∪ {s},(∀y ∈ O′)[τ ′(y) = τ(y)], τ ′(s) = ts,(∀y ∈ O′)[a′[s, y] = ∅], (∀x ∈ S′)[a′[x, s] = ∅](∀x ∈ S)(∀y ∈ O)[a′[x, y] = a[x, y]]

CreateObject(o, to).• Create Object o of type to.

• Precondition: o 6∈ O

• PostConditions: S′ = S, O′ = O ∪ {o},(∀y ∈ O)[τ ′(y) = τ(y)], τ ′(o) = to,

(∀x ∈ S′)[a′[x, o] = ∅], (∀x ∈ S′)(∀y ∈ O)[a′[x, y] = a[x, y]]

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 73

Page 74: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Definitions

Monotonic Typed Access Matrix Model (MTAM) is TAM withoutdelete, DestroySubject and DestroyObject primitive operations.

Consider create command α(x1 : t1, . . . , xk, tk) where x1, . . . , xk ∈O and τ(xi) = ti for 1 ≤ i ≤ k.• ti is a child type in α(x1 : t1, . . . , xk, tk) if any create subject xi of type ti or

create object xi of type ti occurrs in α

• ti is a parent type otherwise.

. In spite of this wording, it is possible for a type to be both a parenttype and child type for the same operation.

. An example:command foo (s1 :u , s2 :u , s3 :v , s4 :w , o :O ) {

create subject s2 of type u ;create subject s3 of type v ;

}}

. s2 create means u is a child type and s3 create means v is achild type.

. s1 not created, so u is also a parent type.

. w and O are also parent types.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 74

Page 75: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Cyclic Creates in MTAM, An Example

Consider the command havoc(s1:u, s2:u, o1:v, o2:v,o3:w, o4:w)command havoc (s1 :u , s2 :u , o1 :v , o2 :v ,o3 :w , o4 :w ) {

create subject s1 of type u ;create object o1 of type v ;create object o3 of type wenter r i n to a[s2, s1] ;enter r i n to a[s2, o2] ;enter r i n to a[s2, o4] ;}

}

• u, v, w are child types (from s1, o1, o3).

• u, v, w are also parent types (from s2, o2, o4).

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 75

Page 76: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Creation Graphs in MTAM

Creation Graph has edges from each parent type to each childtype• An MTAM is cyclic if its creation graph contains a cycle, otherwise it is acyclic-.

• Consider the creation graph from our example

u

v w

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 76

Page 77: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

MTAM Theorems (By Sandhu)

Safety is decidable for systems with acyclic MTAM schemes(creation graphs).

Safety is NP -hard for systems with acyclic MTAM schemes(creation graphs)

Safety is decidable in ternary MTAM in time polynomial to thesize of the initial ACM.• Ternary means all commands have no more than 3 parameters.

• Is equivalent in expressive power to MTAM.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 77

Page 78: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Conclusions

In general Safety problem is undecidable.

Some limited scope variants of safety problem are decidable.

Types are useful for safety problem analysis.

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 78

Page 79: Computer Security, CSI 424/524 - cs.albany.edumaniatty/teaching/security/class03/lectnotes.pdf · Computer Security, CSI 424/524 Lecture 3 - Decidability and Foundational Results

Bibliography

CSI 424/524, William A. Maniatty, Dept. of Computer Science, University at Albany 79


Recommended