thoughts on client systems security
play

Thoughts on Client Systems Security Joanna Rutkowska Invisible - PowerPoint PPT Presentation

Thoughts on Client Systems Security Joanna Rutkowska Invisible Things Lab SSTIC 2011, Rennes, France, June 2011 Why client systems security is important? If your client device (laptop, tablet, phone) is compromised... ... all the security is


  1. Thoughts on Client Systems Security Joanna Rutkowska Invisible Things Lab SSTIC 2011, Rennes, France, June 2011

  2. Why client systems security is important?

  3. If your client device (laptop, tablet, phone) is compromised...

  4. ... all the security is lost!

  5. Client systems are your eyes and fingertips The client OS can see The client OS what you see on the can pretend to screen (decrypted) be you

  6. Approaches to building secure (client) systems

  7. Security by Isolation: Goals

  8. Isolation between two apps... ? App1 App2

  9. Isolation between two apps... App1 App2

  10. Isolation between two apps and the OS... TCB (OS) App1 App2

  11. GUI-level isolation

  12. Lack of GUI isolation on many Windowing Systems...

  13. Inject keystrokes App2 App1 Take screenshots Sniff keystrokes

  14. Fat GUI APIs that are likely to be buggy (and exploitable)

  15. GPU GUI API (Xlib, OpenGL, ...) App1 App2

  16. Work email Tetris

  17. Bank Personal Browser Browser

  18. We don't want two apps to be able to interact with each other via X/OpenGL/GPU! (Xorg people still don't get it, after 20+ years...)

  19. Anyway...

  20. Let's imagine we implemented strong isolation...

  21. We still must allow the user to bypass it sometimes!

  22. Data flows between domains Clipboard File sharing

  23. Down-transfers vs. Up-transfers

  24. Trust level App1 "Up Transfer" App2

  25. Trust level App1 "Down Transfer" App2

  26. "Traditional" school of thought: Never allow down-transfers! Even between two cooperating domains!

  27. Rationale: never allow to move more sensitive data (e.g. Embassy cables) to less trusted domain (e.g. The Internet)

  28. App1 Data App2 Malware Malware OS should never allow for this flow!

  29. This requires elimination/drastic reduction of all potential cooperative covert channels between the apps/domains!

  30. I seriously doubt this is possible on modern x86 hardware...

  31. Covert channels via CPU cache Covert channels via GUI/GPU Covert channels via networking Covert channels via other subsystems ?

  32. "Qubes" school of thought: Avoid up-transfers!

  33. Rationale: an up-transfer can potentially compromise a buggy app in the destination domains (untrusted input processing) Work domain Buggy JPEG parser Malformed JPEG Compromised app/domain

  34. Some up-transfers are difficult to avoid...

  35. Copying a link found on the Internet, and emailing it to a colleague at work

  36. Copying a cool cartoon found on the Internet into work confidential report/presentation

  37. Solution: use trusted converters, e.g. for all JPEGs?

  38. Another types of problems related to file sharing is FS Metadata parsing

  39. Two air-gapped systems Machine 1 Machine 2

  40. Two air-gapped systems Machine 1 Machine 2 Copying data using USB stick

  41. Two air-gapped systems Machine 1 Machine 2 Exploit The sticks partition table turned out to be malformed...

  42. In Qubes we copy files between domains using shared memory and simple cpio-like tool (this cpio-like tool is the security critical code)

  43. Limitations of Security by Isolation approach

  44. Security by Isolation doesn't protect your apps from being compromised!

  45. Random Work email Web browsing

  46. Random Work email Web browsing Exploiting hypothetical bug in my email client's OpenSSL Mail server

  47. Random Work email Web browsing Exploiting hypothetical bug in my email client's OpenSSL MTIM Mail server

  48. My recent adventure in a hotel in Paris ;)

  49. Solution: decompose the app! (More security by isolation!)

  50. Email OpenSSL GPG parsing handling Capsicum is working on such app-level decompositions (will definitely use in Qubes when ready)

  51. Another approach: safe languages (so, where can I get thunderbird-like app written in C#?)

  52. Security by Isolation: Useful technologies

  53. Technologies for address space isolation Virtualization MMU (VT-x/AMD-v, EPT/NPT)

  54. Analogies MMU VT-x/EPT User mode (ring 3) Guest mode (non-root) Kernel mode (ring 0) Hypervisor (root mode) Page Tables Extended Page Tables (EPT) Exceptions (#GP, #PF, ...) VM exits

  55. Differences MMU VT-x/EPT SMEP somehow eliminates this difference User mode and kernel mode often Guest and the hypervisor never share the same address space share the same address space (e.g. 3/1GB split on 32bit Linux) SIPI interrupts kernel execution SIPI is blocked in VMX Interrupt Remapping makes this irrelevant anyway

  56. So, why bother using virtualization? Why not just use the good old MMU for address space isolation?

  57. For compatibility with OSes that are not para-virtualizable Windows Mac OSX Linux is PV aware and we can virtualize it using MMU under Xen (Run it as ring3, no need for VT-x)

  58. But why would we want to virtualize the OS in the first place? A virtualized buggy, messy OS is still... a buggy, messy OS!

  59. Because we want to use the OS as an API provider !

  60. Networking stacks GUI TCB (OS) USB stacks File systems ) ) ) X X X I I I S S S O O O P P P . . . g g g . . . e e e ( ( ( I I I P P P Everything and A A A the kitchen sink! App1 App2 App3

  61. CPU scheduling, MMU & IOMMU only TCB (microkernel/hypervisor) Backend Backends Backend Storage App1 App2 App3 Networking drivers and Drivers & backends GUI stacks (block, pvusb) But those (legacy) apps expect a POSIX API, they don't know how to talk Untrusted to the backends subsystems

  62. So we must virtualize the whole OS to provide API for legacy apps...

  63. GPU, NICs SATA, USB keyboard TCB (microkernel/hypervisor) Frontends Frontends Backend Backends Backend Storage App1 Networking drivers and Drivers & backends GUI App3 stacks (block, App2 pvusb) Domain 1 Domain 2 Untrusted Apps see subsystems POSIX APIs

  64. But it is not like virtualization (VT-x) provides stronger security than MMU!

  65. IOMMU (VT-d)

  66. IOMMU allows to sandbox drivers and devices, so plays a key role in TCB disaggregation...

  67. GPU, NICs SATA, USB keyboard IOMMU/VT-d TCB (microkernel/hypervisor) Frontends Frontends Backend Backends Backend Storage App1 Networking drivers and Drivers & backends GUI App3 stacks (block, App2 pvusb) Domain 1 Domain 2 Untrusted subsystems

  68. IOMMU: catches

  69. For safe language-based OSes (e.g. Singularity and derivatives) IOMMU is needed to restrict devices to accesses to their DMA buffers only to preserve memory safety

  70. Catches: Interrupt Remapping (see our latest paper on VT-d escapes) MSI attacks PCIe ACS BDF Spoofing Reflashing device firmware? DMA-resistant trusted boot

  71. We really need more trusted trusted boots! (subject for another presentation)

  72. No secure client systems without IOMMU and trusted boot!

  73. Security by Isolation: Challenges

  74. How to partition my digital life into security domains ?

  75. Do we actually need domains? Perhaps we can just isolate each app from each other app? Would be a waste of We need OSes to provide memory to have one legacy APIs to apps instance of an OS per each app...

  76. But even if we did isolate (virtualize?) on a per app granularity, still the problem of partitioning doesn't go away...

  77. Mail

  78. Mail Mail Personal Work

  79. Unless we get 100% safe languages we would not avoid security by isolation...

  80. Other challenges

  81. GPU multiplexing

  82. USB multiplexing

  83. I'd love to discuss that last two problems!

  84. Qubes OS implements lots of ideas mentioned here

  85. Qubes is not a microkernel.... ... It's everything else!

  86. Qubes-OS.org

  87. Thanks!

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