browsers critical infrastructure
play

Browsers: Critical Infrastructure Ubiquitous: many platforms, - PowerPoint PPT Presentation

Browser Security Guarantees through Formal Shim Verification Zachary Tatlock Dongseok Jang Sorin Lerner UC San Diego Browsers: Critical Infrastructure Ubiquitous: many platforms, sensitive apps Vulnerable: Pwn2Own, just a click to


  1. Browser Security Guarantees through Formal Shim Verification Zachary Tatlock Dongseok Jang Sorin Lerner UC San Diego

  2. Browsers: Critical Infrastructure Ubiquitous: many platforms, sensitive apps Vulnerable: Pwn2Own, just a click to exploit Reactive Defenses: many ad hoc, bug triage, regressions

  3. Fully Formal Verification Code in language that eases reasoning Develop correctness proof in synch Fully formal, machine checkable proof

  4. Fully Formal Verification Success story: CompCert C compiler Compiler Bugs Found GCC 122 LLVM 181 0 CompCert [Yang et al. PLDI 11 ] OS (seL4), RDBMS & HTTPD (YNot) realistic implementations guaranteed bug free

  5. Fully Formal Verification Success story: CompCert C compiler The Catch Compiler Bugs Found Throw away all your code GCC 100 Rewrite in unfamiliar language LLVM 150 Formally specify correctness 0 CompCert ? [Yang et al. PLDI 11 ] Prove every detail correct OS (seL4), DB, HTTPD (YNot) Heroic effort realistic implementations guaranteed bug free

  6. Formally Verify a Browser?! Resources Complex parts Subtle interactions JPEG Loose access policy HTML Decoder Renderer Constant evolution JavaScript Interpreter

  7. Formal Shim Verification Formally Verify a Browser?! Resources Isolate sandbox untrusted code ✔ Shim Insert shim guards resource access JPEG HTML Decoder Renderer Verify shim prove security props JavaScript Interpreter

  8. Formal Shim Verification Formally Verify a Browser?! Q UARK Resources formally verified browser ✔ Shim Security Props 1. Tab isolation 2. Cookie integrity JPEG HTML Decoder Renderer 3. Addr bar correctness Prove code correct JavaScript Interpreter machine checkable proof

  9. Fully Formal Verification

  10. Fully Formal Verification Code in language supporting reasoning

  11. Fully Formal Verification Code Spec logical properties characterizing correctness

  12. Fully Formal Verification Coq Theorem Prover Code Proof Assistant Spec

  13. Fully Formal Verification Coq Theorem Prover Code Proof Assistant Spec interactively show code satisfies specification

  14. Fully Formal Verification Code Proof ML x86 Assistant compile down to Spec machine code

  15. Fully Formal Verification Code Proof ML x86 Assistant Spec Extremely strong guarantees about actual system!

  16. Fully Formal Verification Rewrite entire system! Code Proof ML x86 Assistant Spec

  17. Fully Formal Verification Rewrite entire system! Code Proof ML x86 Assistant Spec Prove every detail correct

  18. Formal Shim Verification Resources ✔ Shim JPEG HTML Decoder Renderer JavaScript Interpreter

  19. Formal Shim Verification Adapt to sandbox Resources request access via shim ✔ Write shim Shim design effective interface Sandbox.. Formally verify shim Untrusted ensure accesses secure Code

  20. Formal Shim Verification Adapt to sandbox Resources request access via shim Key Insight Guarantee sec props for entire system ✔ Write shim Shim design effective interface Only reason about small shim Sandbox.. Radically ease verification burden Formally verify shim Untrusted ensure accesses secure Prove actual code correct Code

  21. Quark: Verified Browser Resources ✔ Shim Sandbox.. Untrusted Code

  22. Quark: Verified Browser Resources ✔ Shim Sandbox.. Untrusted Code

  23. Quark: Verified Browser Resources Net network persistent storage ✔ Shim user interface Sandbox.. Untrusted Code

  24. Quark: Verified Browser Resources Net ✔ Shim Sandbox.. Untrusted Code

  25. Quark: Verified Browser Resources Shim Net Quark browser kernel Quark Kernel ✔ ✔ code, spec, proof in Coq Sandbox.. Untrusted Code

  26. Quark: Verified Browser Resources Shim Net Quark Kernel ✔ ✔ Sandbox.. Untrusted Code

  27. Quark: Verified Browser Resources Shim Net Untrusted Code Quark Kernel ✔ ✔ browser components run as separate procs Sandbox.. strictly sandboxed Untrusted Code

  28. Quark: Verified Browser Resources Shim Net Untrusted Code Quark Kernel ✔ ✔ browser components run as separate procs Sandbox.. strictly sandboxed Untrusted Code talk to kernel over pipe

  29. Quark: Verified Browser Resources Shim Net Untrusted Code Quark Kernel ✔ ✔ two component types Sandbox.. Untrusted Code

  30. Quark: Verified Browser Resources Shim Net Untrusted Code Quark Kernel ✔ ✔ two component types WebKit modified WebKit, Tab intercept accesses

  31. Quark: Verified Browser Resources Shim Net Untrusted Code Quark Kernel ✔ ✔ two component types WebKit Tab

  32. Quark: Verified Browser Resources Shim Net Untrusted Code Quark Kernel ✔ ✔ two component types written in Python, WebKit Cookie manages single domain Manager Tab

  33. Quark: Verified Browser Resources Shim Net Untrusted Code Quark Kernel ✔ ✔ two component types WebKit tabs cookie managers WebKit Cookie Tab Manager

  34. Quark: Verified Browser Resources Shim Net Untrusted Code Quark Kernel ✔ ✔ two component types WebKit tabs cookie managers WebKit Cookie WebKit Cookie WebKit Tab Manager Tab Manager Tab several instances each

  35. Quark: Verified Browser Net Quark Kernel ✔ ✔ WebKit Cookie WebKit Cookie WebKit Tab Manager Tab Manager Tab

  36. Quark Kernel: Code, Spec, Proof Quark Kernel ✔

  37. Quark Kernel: Code , Spec, Proof

  38. Quark Kernel: Code , Spec, Proof Definition kstep ...

  39. Quark Kernel: Code , Spec, Proof Definition kstep(focused_tab, tabs) := ... kernel state

  40. Quark Kernel: Code , Spec, Proof Definition kstep(focused_tab, tabs) := f <- select(stdin, tabs); ... Unix-style select to find a component pipe ready to read

  41. Quark Kernel: Code , Spec, Proof Definition kstep(focused_tab, tabs) := f <- select(stdin, tabs); match f with case: f is user input | Stdin => ... | Tab t => case: f is tab pipe ...

  42. Quark Kernel: Code , Spec, Proof Definition kstep(focused_tab, tabs) := f <- select(stdin, tabs); match f with | Stdin => cmd <- read_cmd(stdin); ... read command from user over stdin | Tab t => ...

  43. Quark Kernel: Code , Spec, Proof Definition kstep(focused_tab, tabs) := f <- select(stdin, tabs); match f with | Stdin => cmd <- read_cmd(stdin); match cmd with | AddTab => ... user wants to create and focus a new tab | ... | Tab t => ...

  44. Quark Kernel: Code , Spec, Proof Definition kstep(focused_tab, tabs) := f <- select(stdin, tabs); match f with | Stdin => cmd <- read_cmd(stdin); match cmd with | AddTab => t <- mk_tab(); ... create a new tab | ... | Tab t => ...

  45. Quark Kernel: Code , Spec, Proof Definition kstep(focused_tab, tabs) := f <- select(stdin, tabs); match f with | Stdin => cmd <- read_cmd(stdin); match cmd with | AddTab => t <- mk_tab(); write_msg(t, Render); ... | ... tell new tab to | Tab t => render itself ...

  46. Quark Kernel: Code , Spec, Proof Definition kstep(focused_tab, tabs) := f <- select(stdin, tabs); match f with | Stdin => cmd <- read_cmd(stdin); match cmd with | AddTab => t <- mk_tab(); write_msg(t, Render); return (t, t::tabs) | ... | Tab t => return updated state ...

  47. Quark Kernel: Code , Spec, Proof Definition kstep(focused_tab, tabs) := f <- select(stdin, tabs); match f with | Stdin => cmd <- read_cmd(stdin); match cmd with | AddTab => t <- mk_tab(); write_msg(t, Render); return (t, t::tabs) | ... handle other | Tab t => user commands ...

  48. Quark Kernel: Code , Spec, Proof Definition kstep(focused_tab, tabs) := f <- select(stdin, tabs); match f with | Stdin => cmd <- read_cmd(stdin); match cmd with | AddTab => t <- mk_tab(); write_msg(t, Render); return (t, t::tabs) handle requests | ... from tabs | Tab t => ...

  49. Quark Kernel: Code , Spec, Proof Definition kstep(focused_tab, tabs) := f <- select(stdin, tabs); match f with | Stdin => cmd <- read_cmd(stdin); match cmd with | AddTab => t <- mk_tab(); write_msg(t, Render); return (t, t::tabs) | ... | Tab t => ...

  50. Quark Kernel: Code, Spec , Proof

  51. Quark Kernel: Code, Spec , Proof Specify correct behavior wrt syscall seqs read(), write(), open(), write(), ...

  52. Quark Kernel: Code, Spec , Proof Specify correct behavior wrt syscall seqs trace: all syscalls made by Quark kernel during execution

  53. Quark Kernel: Code, Spec , Proof Specify correct behavior wrt syscall seqs kstep() kstep() kstep() kstep()

  54. Quark Kernel: Code, Spec , Proof Specify correct behavior wrt syscall seqs structure of produceable traces supports spec & proof

  55. Quark Kernel: Code, Spec , Proof Specify correct behavior wrt syscall seqs structure of produceable traces supports spec & proof Example: address bar correctness

  56. Quark Kernel: Code, Spec , Proof Specify correct behavior wrt syscall seqs structure of produceable traces supports spec & proof Example: address bar correctness forall trace tab domain, ... for any trace, tab, where trace is a and domain sequence of syscalls

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