a file system for safely interacting with untrusted usb
play

A file system for safely interacting with untrusted USB flash drives - PowerPoint PPT Presentation

A file system for safely interacting with untrusted USB flash drives Ke Zhong , Zhihao Jiang , Ke Ma , and Sebastian Angel University of Pennsylvania Shanghai Jiao Tong University Most Storage has moved to cloud! USB flash drives


  1. A file system for safely interacting with untrusted USB flash drives Ke Zhong , Zhihao Jiang ⋆ , Ke Ma ⋆ , and Sebastian Angel University of Pennsylvania ⋆ Shanghai Jiao Tong University

  2. Most Storage has moved to cloud!

  3. USB flash drives remain popular u Legacy data u No network connections u Store confidential data − Bitcoin keys − Medical records − ID photos

  4. USB stack has several issues u Trust-by-default design principle u Devices can bypass kernel and access memory (DMA) u Driver code tends to be buggy − There are many drivers by third party producers u Masquerade as other devices − A device could declare to be a keyboard

  5. USB stack has several issues u Trust-by-default design principle u Devices can bypass kernel and access memory (DMA) Could be exploited by u Driver code tends to be buggy a malicious flash drive − There are many drivers by third party producers u Masquerade as other devices − A device could declare to be a keyboard

  6. USB stack has several issues u Trust-by-default design principle u Devices can bypass kernel and access memory (DMA) u Driver code tends to be buggy − There are many drivers by third party producers u Masquerade as other devices − A device could declare to be a keyboard

  7. Previous work u Packet filtering − Cinch: Security’16 − USBFilter: Security’16 u Device authentication − ProvUSB: CCS’16 u Sandbox the device − GoodUSB: ACSAS’15

  8. Limitation u Packet filtering − Malicious payload that changes dynamically avoids rule-based detection u Device authentication − Require new hardware/kernel modifications u Sandbox the device − False negative (i.e., a device is malicious but sandbox says it's ok)

  9. We propose RBFuse , which is a file system that accesses flash drives without interacting with the USB stack on the host machine

  10. Key idea RBFuse remaps memory space of host controller to a virtual machine, and exports file system of flash drives as a mountable virtual file system

  11. System overview IOMMU

  12. System overview Virtual machine VFS Server IOMMU

  13. System overview Virtual machine USB Directory VFS Server VFS Client IOMMU

  14. System overview Virtual machine USB Directory User space VFS daemon Server VFS Client IOMMU

  15. System overview Virtual machine USB Directory User space VFS daemon Server VFS Client Fuse kernel IOMMU driver

  16. How RBFuse runs Create a file Virtual machine “foo”! USB Directory VFS Server VFS Client IOMMU

  17. How RBFuse runs Create a file Virtual machine “foo”! USB Directory ① getattr VFS Server VFS Client IOMMU

  18. How RBFuse runs Create a file Virtual machine “foo”! USB Directory ① getattr VFS Server Execute VFS Client ① getattr IOMMU

  19. How RBFuse runs Create a file Virtual machine “foo”! USB Directory VFS “No such file” Server VFS Client “No such file” IOMMU

  20. How RBFuse runs Create a file Virtual machine “foo”! USB Directory ① getattr VFS ② mknod Server Execute VFS Client ① getattr IOMMU

  21. How RBFuse runs Create a file Virtual machine “foo”! USB Directory ① getattr VFS ② mknod Server Execute VFS Client ① getattr ② mknod IOMMU

  22. How RBFuse runs Create a file Virtual machine “foo”! USB Directory VFS “Succeed!” Server VFS Client “Succeed!” IOMMU

  23. How RBFuse runs Create a file Virtual machine “foo”! USB Directory ① getattr VFS ② mknod Server Execute ③ getattr VFS Client ① getattr ② mknod IOMMU

  24. How RBFuse runs Create a file Virtual machine “foo”! USB Directory ① getattr VFS ② mknod Server Execute ③ getattr VFS Client ① getattr ② mknod ③ getattr IOMMU

  25. How RBFuse runs Create a file Virtual machine “foo”! USB Directory VFS “foo exists!” Server VFS Client “foo exists!” IOMMU

  26. How RBFuse runs Create a file Virtual machine “foo”! USB Directory ① getattr Done! VFS ② mknod Server Execute ③ getattr VFS Client ① getattr ② mknod ③ getattr IOMMU

  27. Performance issues Create a file Virtual machine “foo”! USB Directory ① getattr VFS ② mknod Server Execute ③ getattr VFS Client ① getattr ② mknod ③ getattr IOMMU

  28. Performance issues Create a file Virtual machine “foo”! USB Directory ① getattr VFS ② mknod Server Execute ③ getattr VFS Client ① getattr ② mknod ③ getattr IOMMU Too many requests for accessing metadata 3,000 getattr calls are issued when reading 1,000 files

  29. Performance issues Write 1024KB Virtual machine to “foo”! USB Directory ①write 128KB ②write 128KB VFS …… Server Execute ⑧write 128KB VFS Client ①write 128KB ②write 128KB …… IOMMU ⑧write 128KB Write requests are split into smaller chunks

  30. Performance issues Read 1024KB Virtual machine from “foo”! USB Directory ①read 128KB ②read 128KB VFS …… Server Execute ⑧read 128KB VFS Client ①read 128KB ②read 128KB …… IOMMU ⑧read 128KB Read requests are split into smaller chunks

  31. Compromised virtual machine Virtual machine USB Directory VFS Server VFS Client IOMMU Malicious

  32. Compromised virtual machine Virtual machine USB Directory VFS Compromised Server VFS Client IOMMU Malicious

  33. Compromised virtual machine Virtual machine USB Directory VFS Compromised Server VFS Client IOMMU ①Confidential data might be stolen ②Files transferred might be tampered ③Issue malformed file system responses Malicious

  34. Parsing errors Virtual machine USB Requests Directory Serialize VFS requests Server VFS Client Parse responses IOMMU

  35. Parsing errors Virtual machine USB Requests Directory Serialize VFS requests Server VFS Client Parse responses IOMMU Parsers, if not designed correctly, can be easily compromised to exploit memory errors and integer overflow.

  36. Agenda u How to address those challenges − Optimizations − Encrypted communication − Formally verified serializer and parser u Preliminary evaluation u Discussion & Conclusion

  37. Agenda u How to address those challenges − Optimizations − Encrypted communication − Formally verified serializer and parser u Preliminary evaluation u Discussion & Conclusion

  38. Caching metadata Create a file Virtual machine “foo”! USB Directory ① getattr VFS ② mknod Server Execute ③ getattr VFS Client ① getattr ② mknod ③ getattr IOMMU

  39. Caching metadata Create a file Virtual machine “foo”! USB Directory ① getattr VFS ② mknod Server Execute ③ getattr getattr could be done locally VFS Client ① getattr at the VFS Client ② mknod ③ getattr IOMMU u Cache during initialization − RBFuse fetches and caches the metadata of all files and directories during initialization

  40. Caching metadata Create a file Virtual machine “foo”! USB Directory ① getattr VFS ② mknod Server Execute ③ getattr VFS Client ① getattr ② mknod ③ getattr IOMMU u Cache during initialization − RBFuse fetches and caches the metadata of all files and directories during initialization u Update metadata accordingly − Mknod, write, etc.

  41. Prefetching Read 1024KB Virtual machine from “foo”! USB Directory ①read 128KB ②read 128KB VFS …… Server Execute ⑧read 128KB VFS Client ①read 128KB ②read 128KB …… IOMMU ⑧read 128KB

  42. Prefetching Read 1024KB Virtual machine from “foo”! USB Directory ①read 128KB ②read 128KB VFS …… Server Execute ⑧read 128KB VFS Client read 128KB + 896KB IOMMU Read subsequent chunks for large file

  43. Prefetching Read all files Virtual machine in “dir” USB Directory ①read f1 ②read f2 VFS …… Server Execute ⑧read f8 VFS Client ①read f1 ②read f2 …… IOMMU ⑧read f8

  44. Prefetching Read all files Virtual machine in “dir” USB Directory ①read f1 ②read f2 VFS …… Server Execute ⑧read f8 VFS Client read f1 + f2 ~ f8 IOMMU Read other small files in the same directory

  45. Batching operations Write 1024KB Virtual machine to “foo”! USB Directory ①write 128KB ②write 128KB VFS …… Server Execute ⑧write 128KB VFS Client ①write 128KB ②write 128KB …… IOMMU ⑧write 128KB

  46. Batching operations Write 1024KB Virtual machine to “foo”! USB Directory write 128KB + write 128KB VFS + …… Server Execute + write 128KB VFS Client write 128KB + write 128KB + …… IOMMU u Multiple write are combined into one + write 128KB

  47. Batching operations Write 1024KB Virtual machine to “foo”! USB Directory write 128KB + write 128KB VFS + …… Server Execute + write 128KB VFS Client write 128KB + write 128KB + …… IOMMU u Multiple write are combined into one + write 128KB u Other requests related to write can also be merged − getattr, mknod, getattr, open, write, close u Speculatively respond to requests first − By monitoring remaining size of flash drives, if size permitted, then responds “succeed”

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