secure programs via game based synthesis
play

Secure Programs via Game-based Synthesis Somesh Jha, Tom Reps, and - PowerPoint PPT Presentation

Secure Programs via Game-based Synthesis Somesh Jha, Tom Reps, and Bill Harris 1 Tuesday, October 22, 13 One-slide summary Secure programming on a conventional OS is intractable Privilege-aware OSs take secure programming from


  1. Capsicum Challenges Not Appearing in This Talk • Program can construct capability from each UNIX descriptor • Capability has a vector of 63 access rights (~1 for every system call on a descriptor) • Programs can assume new capabilities via a Remote Procedure Call (RPC) 19 Tuesday, October 22, 13

  2. Instrumenting Programs with CapWeave 1. Programmer writes an explicit Amb policy 2. CapWeave instruments program to invoke primitives so that it satisfies the policy 20 Tuesday, October 22, 13

  3. with CapWeave gzip main() { file_nms = parse_cl(); for (f in file_nms): L0: (in, out) = open2(f); L1: compress(in, out); } L0: AMB L1: no AMB 21 Tuesday, October 22, 13

  4. with CapWeave gzip main() { file_nms = parse_cl(); for (f in file_nms): L0: (in, out) = open2(f); L1: compress(in, out); } Policy Cur(p) => (pc[L0](p) => AMB(p) & (pc[L1](p) => !AMB(p)) 21 Tuesday, October 22, 13

  5. main() { file_nms = parse_cl(); for (f in file_nms): L0: (in, out) = open2(f); L1: compress(in, out); } Policy Cur(p) => (pc[L0](p) => AMB(p) & (pc[L1](p) => !AMB(p)) 22 Tuesday, October 22, 13

  6. Policy main() { Cur(p) => (pc[L0](p) => AMB(p) file_nms = parse_cl(); & (pc[L1](p) => !AMB(p)) for (f in file_nms): L0: (in, out) = open2(f); L1: compress(in, out); } 22 Tuesday, October 22, 13

  7. Policy main() { Cur(p) => (pc[L0](p) => AMB(p) file_nms = parse_cl(); & (pc[L1](p) => !AMB(p)) for (f in file_nms): L0: (in, out) = open2(f); L1: compress(in, out); } CapWeave 22 Tuesday, October 22, 13

  8. Policy main() { Cur(p) => (pc[L0](p) => AMB(p) file_nms = parse_cl(); & (pc[L1](p) => !AMB(p)) for (f in file_nms): L0: (in, out) = open2(f); L1: compress(in, out); } CapWeave void main() { L0: open2(...); Instrumented sync_fork(); cap_enter(); Program L1: compress(); sync_join(); } 22 Tuesday, October 22, 13

  9. The Next 700 Policy Weavers Analogous challenges with Decentralized Information Flow Control (DIFC) • Asbestos [Efstathopoulos ‘05] • HiStar [Zeldovich ’06] • Flume [Krohn ‘07] 23 Tuesday, October 22, 13

  10. gzip() { Policy file_nms = parse_cl(); Cur(p) => ... (pc[L0](p) => AMB(p)) & (pc[L1](p) => !AMB(p)) } CapWeave gzip() { file_nms = parse_cl(); sync_fork(); cap_enter(); ... } 24 Tuesday, October 22, 13

  11. Programmer gzip() { Policy file_nms = parse_cl(); Cur(p) => ... (pc[L0](p) => AMB(p)) & (pc[L1](p) => !AMB(p)) } Weaver CapWeave Generator gzip() { file_nms = parse_cl(); sync_fork(); cap_enter(); ... } 24 Tuesday, October 22, 13

  12. Programmer Capsicum Designer gzip() { Policy cap_enter: Amb’(p) := Amb(p) & ... file_nms = parse_cl(); Cur(p) => ... (pc[L0](p) => AMB(p)) & (pc[L1](p) => !AMB(p)) } Weaver CapWeave Generator gzip() { file_nms = parse_cl(); sync_fork(); cap_enter(); ... } 24 Tuesday, October 22, 13

  13. Weaver Generator 25 Tuesday, October 22, 13

  14. HiStar Designer create_cat(&c): Flows’(p, q) := Flows(p, q) || ... Weaver Generator 25 Tuesday, October 22, 13

  15. HiStar Designer create_cat(&c): Flows’(p, q) := Flows(p, q) || ... Weaver HiWeave Generator 25 Tuesday, October 22, 13

  16. Programmer HiStar Designer wrapper() { create_cat(&c): Policy exec(...); Flows’(p, q) := Flows(p, q) || ... forall w, s. ... Flows(w, s) => ... } Weaver HiWeave Generator 25 Tuesday, October 22, 13

  17. Programmer HiStar Designer wrapper() { create_cat(&c): Policy exec(...); Flows’(p, q) := Flows(p, q) || ... forall w, s. ... Flows(w, s) => ... } Weaver HiWeave Generator scanner() { create_cat(&c); exec(...); ... } 25 Tuesday, October 22, 13

  18. Outline 1. Motivation, problem statement 2. Previous work: Capsicum 2. Previous work: Capsicum 3. Ongoing work: HiStar 4. Open challenges 26 Tuesday, October 22, 13

  19. Outline 2. Previous work: Capsicum 26 Tuesday, October 22, 13

  20. CapWeave Algorithm 27 Tuesday, October 22, 13

  21. CapWeave Algorithm Inputs: Program P , Amb Policy Q 27 Tuesday, October 22, 13

  22. CapWeave Algorithm Inputs: Program P , Amb Policy Q Output: Instrumentation of P that always satisfies Q 27 Tuesday, October 22, 13

  23. CapWeave Algorithm Inputs: Program P , Amb Policy Q Output: Instrumentation of P that always satisfies Q 1. Build finite IP# ⊇ instrumented runs that violate Q 27 Tuesday, October 22, 13

  24. 1. Building IP#: Inputs Program Amb Policy L0 : Amb main() { L1 : no Amb file_nms = parse_cl(); for (f in file_nms): L0: (in, out) = open2(f); L1: compress(in, out); } 28 Tuesday, October 22, 13

  25. 1. Building IP#: Output parse_cl cap_enter noop L0:open2() L0:open2() sync_join() noop sync_fork() noop noop noop noop cap_enter() cap_enter() L1:compress() L1:compress() L1:compress() L1:compress() noop L0:open2() 29 Tuesday, October 22, 13

  26. 1. Building IP#: Output parse_cl cap_enter noop L0:open2() L0:open2() sync_join() noop sync_fork() noop noop noop noop cap_enter() cap_enter() L1:compress() L1:compress() L1:compress() L1:compress() noop L1 : no Amb L0:open2() 29 Tuesday, October 22, 13

  27. 1. Building IP#: Output parse_cl cap_enter noop L0:open2() L0:open2() sync_join() noop sync_fork() noop noop noop noop cap_enter() cap_enter() L1:compress() L1:compress() L1:compress() L1:compress() noop L0:open2() 30 Tuesday, October 22, 13

  28. 1. Building IP#: Output parse_cl cap_enter noop L0:open2() L0:open2() sync_join() noop sync_fork() noop noop noop noop cap_enter() cap_enter() L1:compress() L1:compress() L1:compress() L1:compress() noop L0:open2() L0 : Amb 30 Tuesday, October 22, 13

  29. Building IP# Basic idea: construct IP# as a forward exploration of an abstract state space 31 Tuesday, October 22, 13

  30. 1(a). IP#: Define Abstract State-space Q 32 Tuesday, October 22, 13

  31. 1(a). IP#: Define Abstract State-space Q# Q 32 Tuesday, October 22, 13

  32. 1(a). IP#: Define Abstract State-space Q# 𝛽 Q 32 Tuesday, October 22, 13

  33. 1(a). IP#: Define Abstract State-space Q# 𝛽 Q 32 Tuesday, October 22, 13

  34. 1(b). IP#: Define Abstract Transformers Q# 𝛽 Q 33 Tuesday, October 22, 13

  35. 1(b). IP#: Define Abstract Transformers Q# 𝛽 Q 𝜐 [cap_enter] 33 Tuesday, October 22, 13

  36. 1(b). IP#: Define Abstract Transformers 𝜐 [cap_enter]# Q# 𝛽 Q 𝜐 [cap_enter] 33 Tuesday, October 22, 13

  37. 1(c). Explore Abstract State Space Q# Q 34 Tuesday, October 22, 13

  38. 1(c). Explore Abstract State Space Q# 𝛽 Q L0 init 34 Tuesday, October 22, 13

  39. 1(c). Explore Abstract State Space 𝜐 [cap_enter]# ... 𝜐 [parse_cl]# Q# .. 𝛽 𝜐 [noop]# cap_enter ... parse_cl Q L0’ L0 init noop ... 34 Tuesday, October 22, 13

  40. 𝜐 [parse_cl]# 35 Tuesday, October 22, 13

  41. 𝜐 [parse_cl]# 35 Tuesday, October 22, 13

  42. parse_cl cap_enter noop L0:open2() L0:open2() sync_join() noop sync_fork() noop noop noop noop cap_enter() cap_enter() L1:compress() L1:compress() L1:compress() L1:compress() noop L0:open2() 35 Tuesday, October 22, 13

  43. State-Structure Exploration If a concrete state is a logical structure, ... Q 36 Tuesday, October 22, 13

  44. State-Structure Exploration If a concrete state is a logical structure, ... ≡ { } A A D Q B B C 36 Tuesday, October 22, 13

  45. State-Structure Exploration properties are FOL formulas, ... ∀ p. A(p) ⇒ ((B(p) ⇒ C(p)) ⋀ (D(p) ⇒ ¬ C(p))) 37 Tuesday, October 22, 13

  46. State-Structure Exploration ...and semantics is given as predicate updates, ... A’(x) = A(x) ⋁ ∃ y. C(y) ⋀ B(q, p) 𝜐 [action] ≡ B’(x, y) = B(x, y) ⋁ (C(x) ⋀ D(y)) C’(x) = ... D’(x) = ... 38 Tuesday, October 22, 13

  47. State-Structure Exploration ...then abstract space and transformers can be generated automatically [Sagiv ’99] Q 39 Tuesday, October 22, 13

  48. State-Structure Exploration ...then abstract space and transformers can be generated automatically [Sagiv ’99] 𝜐 [action]# Q# 𝛽 𝛽 𝜐 [action] Q 39 Tuesday, October 22, 13

  49. Capsicum Semantics A A D Q ≡ 1. B B C A’(x) = A(x) ⋁ ∃ y. C(y) ⋀ B(q, p) 𝜐 [action] ≡ 2. B’(x, y) = B(x, y) ⋁ (C(x) ⋀ D(y)) C’(x) = ... D’(x) = ... 40 Tuesday, October 22, 13

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend