towards application security on untrusted operating
play

Towards Application Security on Untrusted Operating Systems Dan R. - PowerPoint PPT Presentation

Towards Application Security on Untrusted Operating Systems Dan R. K. Ports Tal Garfinkel MIT CSAIL & VMware VMware Motivation Many applications handle sensitive data financial, medical, insurance, military... credit cards, medical


  1. Towards Application Security on Untrusted Operating Systems Dan R. K. Ports Tal Garfinkel MIT CSAIL & VMware VMware

  2. Motivation Many applications handle sensitive data financial, medical, insurance, military... credit cards, medical records, corporate IP... ...but run on commodity operating systems Complexity leads to poor assurance!

  3. Large TCB Sizes Theory: Other App App few small trusted parts; App Apps can be assumed correct OS Hardware

  4. Large TCB Sizes Theory: Other App App few small trusted parts; App Apps can be assumed correct Reality: OS has many trusted parts: OS - kernel - device drivers - system daemons - anything running as root Hardware

  5. This is a problem.

  6. This is a problem. (and it’s not likely to solve itself)

  7. Defense in Depth Approach

  8. Defense in Depth Approach Continue to use existing OS components, without fully trusting them Add security layer to protect sensitive data even if OS is compromised

  9. Defense in Depth Approach Continue to use existing OS components, without fully trusting them Add security layer to protect sensitive data even if OS is compromised Desired security property: apps always behave normally even if the OS behaves maliciously

  10. Defense in Depth Approach Continue to use existing OS components, without fully trusting them Add security layer to protect sensitive data even if OS is compromised Desired security property: apps always behave normally (or fail-stop) even if the OS behaves maliciously

  11. Problem: OS solely responsible for CPU / memory resource management ➡ can access application memory & control application execution Solution: isolated execution environment ➡ give app memory that OS can’t access

  12. Is CPU & memory isolation enough to run apps securely on an untrusted OS?

  13. Is CPU & memory an untrusted OS? No! isolation enough to run apps securely on Apps still explicitly rely on OS services, so semantic-level attacks are possible.

  14. Background: Isolation Architectures Other App App App Apps Legacy OS

  15. Background: Isolation Architectures Isolation can be enforced via: Other App App Apps • microkernel processes ( e.g. Nizza / L4) Legacy OS Legacy OS App Trusted Services Microkernel

  16. Background: Isolation Architectures Isolation can be enforced via: Other App App App Apps • microkernel processes ( e.g. Nizza / L4) • separate VMs Private Legacy OS Legacy OS ( e.g. Proxos, OS NGSCB) VMM

  17. Background: Isolation Architectures Isolation can be enforced via: Other App App App Apps • microkernel processes ( e.g. Nizza / L4) • separate VMs Legacy OS Legacy OS ( e.g. Proxos, NGSCB) • encrypted application state Crypto ( e.g. XOM, processor / VMM Overshadow)

  18. Isolation Properties • secrecy: resources can’t be read by the OS • integrity: resources can’t be modified (without being detected) • secure control transfer: OS can’t affect control flow, except via syscalls/signals No defense against semantic attacks!

  19. Malicious OS Example Thread 1 Thread 2 acquire_lock(l); acquire_lock(l); isEncrypted = true; if (isEncrypted) { encrypt(data); sendToNet(data); release_lock(l); } release_lock(l); OS grants lock to both threads, introducing a new race condition!

  20. More OS Misbehavior A malicious OS could: • read or modify file contents • even if encrypted, swap two files • snoop on keyboard/display I/O • change system clock (break time-based auth) • control /dev/random (break crypto) (more examples & solutions in paper)

  21. Towards Application Security Ensure that system call results are valid (safety properties only; no availability) Three approaches: • verify correctness of system call results • emulate system call in trusted layer • disallow system call / “use at own risk”

  22. Verifying Mutexes Create “lock-held?” flag in shared memory • update after lock acquired & before released • when acquiring lock, check if already held by another thread Isn’t this just re-implementing locking? No — OS still handles scheduling, fairness, etc.

  23. Verifying the File System Similar to other FSes with untrusted storage ( e.g. VPFS, TDB, Sirius) Approach: • encrypt and hash file contents • store file hashes, metadata in a hash tree • need to protect directory structure too!

  24. Emulating System Calls • Clock/randomness : implement in VMM; transform system calls to hypercalls • IPC : use trusted layer to send message content; use OS signals for message notification

  25. Conclusion Isolation is only the first step to protecting applications from a malicious OS Need to carefully consider implications of malicious behavior by “untrusted” components Verifying correct behavior often simpler than implementing it, so allows smaller TCB

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