1 / 33

Minos: Control Data Attack Prevention Orthogonal to Memory Model

Minos: Control Data Attack Prevention Orthogonal to Memory Model. Jedidiah R. Crandall and Frederic T. Chong Computer Science Department University of California, Davis Presented at MICRO-37 in Portland, Oregon on 7 December 2004. Outline. What is control data? Motivation

dakota
Download Presentation

Minos: Control Data Attack Prevention Orthogonal to Memory Model

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Minos: Control Data Attack Prevention Orthogonal to Memory Model Jedidiah R. Crandall and Frederic T. Chong Computer Science Department University of California, Davis Presented at MICRO-37 in Portland, Oregon on 7 December 2004

  2. Outline • What is control data? • Motivation • Biba’s low-water-mark integrity policy • The Minos architecture • Security assessment

  3. What is control data? • Any data which is loaded into the program counter on control flow transfer, or any data used to calculate such data • Executable code is not control data

  4. Motivation • Control Data Attacks • Buffer overflows, format string attacks, double free()s, …, much more • These attacks cost users billions of dollars a year • Remote intrusions • Cleaning up worms • SPAM and DoS from botnets

  5. Minos Security Claims • Control data attacks constitute the overwhelming majority of remote intrusions • Minos protects against remote control data attacks • Minos protects against local vulnerabilities but only because the line between these and remote vulnerabilities is not clear

  6. Securing Commodity Software • Flat memory model is ubiquitous • Minos supports code as data • JITs • Dynamic library linking • No program-specific policies, recompilation, or binary rewriting

  7. Biba’s Low-water-mark Integrity Policy • Security policies • Integrity • Confidentiality • Availability • Tracks the “taintedness” of data • Access controls are based on accesses a subject has made in the past

  8. Biba’s Low-water-mark Integrity Policy (Formally) • Any subject may modify any object if… • The integrity of the object is not greater than that of the subject • Any subject may read any object • The subject’s integrity is lowered to the minimum of the object’s integrity and its own • Notorious for its monotonic behavior

  9. The Minos Architecture • Tag bits in L1 and L2 cache • DRAM • VM details are in the paper

  10. Other Tag Bits • The π bit in [C. Weaver, J. Emer, S. S. Mukherjee, S. K. Reinhardt. “Techniques to Reduce the Soft Error Rate of a High-Performance Microprocessor.” ISCA 2004.] • NaT bits in the Itanium 2.

  11. Gratuitous Dante Quote Minos the dreadful snarls at the gate, … and wraps himself in his tail with as many turns as levels down that shade will have to dwell

  12. Two Implementations • Linux • Windows Whistler and XP • Full system emulation • SPEC benchmarks are statically compiled binaries that do not use the network • A proof-of-concept was needed because of the low-water-mark policy

  13. OS Changes • Read system call forces data low integrity unless… • The ctime and mtime of the inode are before an establishment time …OR… • The inode points to a pipe between lightweight processes that share the same address space • Network sockets, readv()s, and pread()s are forced low integrity unconditionally

  14. OS Changes (Continued) • Establishment time requirement applies to mmap()ed files • A static binary may be mounted and executed if it is flushed to the disk first • More user friendly methods of defining trust could be developed

  15. One Month of a Minos Web Server

  16. SPEC2000 gcc

  17. Security Assessment • Real attacks • Many return pointer protection papers erroneously cite Code Red as motivation • Two attacks (innd and su-dtors) caused changes to our original, simple policy • Attacks specifically designed to subvert Minos

  18. Attacks We Attacked Minos With

  19. Attacks By Others

  20. A Fundamental Tradeoff • Can only do one of these • Check the integrity of addresses used for 32-bit loads or stores • Check the integrity of both operands to an operation chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | prev_size of previous chunk (if p=1) | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | size of chunk, in bytes |p| mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | User data starts here... . . . . (malloc_usable_space() bytes) . . | nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | size of chunk | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

  21. Related Works • G. E. Suh, J. W. Lee, D. Zhang, and S. Devadas. “Secure Program Execution via Dynamic Information Flow Tracking”, ASPLOS XI. • Makes an exception for addition of the base and offset of a pointer • James Newsome and Dawn Song. “Dynamic Taint Analysis…”, NDSS 2005. • Default policy does not check the addresses of any loads/stores

  22. Specific Concerns for Minos • Arbitrary copy primitives (because the integrity of addresses for 32-bit loads/stores are not checked) • Sandboxed PLT • Dangling pointers • Need arbitrary copy primitive • Information Flow Problems

  23. Information Flow Problems if (LowIntegrityData == 5) HighIntegrityData = 5; HighIntegrityData = HighIntegrityLookupTable[LowIntegrityData]; HighIntegrityData = 0; while (LowIntegrityData--) HighIntegrityData++;

  24. Policies • All 8- and 16-bit immediates are low integrity • All 8- and 16-bit loads/stores have the integrity of the addresses used checked • Misaligned 32-bit loads/stores are assumed low integrity

  25. Current Best Practices • Non-executable pages • StackGuard • Random placement of library routines

  26. Hannibal • Format string vulnerability in wu-ftpd • Our goal: • Upload a binary called jailbreak via anonymous FTP • Switch rename(char *, char *) with execv(char *, char **) • Request to rename jailbreak becomes execv(“/jailbreak”, {“/jailbreak”, NULL})

  27. JIT Compatibility • Sun Java SDK must be run in compatibility mode: • All 8-bit and 16-bit immediates are high integrity • Setuid programs run in compatibility mode will be squashed similar to a ptrace • For security reasons, the JIT should be slightly modified

  28. Conclusion • Modifications of the library code and the linking mechanisms could secure a Minos system with a high degree of assurance by • Taking away the power of arbitrary copy primitives with an SPLT • Avoiding code that gives attackers abilities like a controlled increment • The fundamental tradeoff could possibly be overcome with architectural support

  29. Questions? • http://minos.cs.ucdavis.edu • If you can break into it please leave a *.txt file in the /root directory explaining how. • Acknowledgments • This work was supported by NSF ITR grant CCR-0113418, an NSF CAREER award and UC Davis Chancellor's fellowship to Fred Chong, and a United States Department of Education Government Assistance in Areas of National Need (DOE-GAANN) grant #P200A010306 as well as a 2004 Summer Research Assistantship Award from the U.C. Davis Graduate Student Association for Jed Crandall.

  30. Virtual Memory Swapping Swap drive Memory 4kb Page w/ tags Tags (128 bytes) 4kb Page (no tags) 4kb Page w/ tags

  31. Virtual Memory Swapping Experimental Methodology • Minos-enabled Linux vs. unmodified Linux • 1.6 GHz Pentium 4 with 256 MB RAM • 512 MB Swap Space • Used mlocks() to take away memory • 4 SPEC2000 benchmarks

  32. vpr mcf gcc bzip2

  33. DMA and Port I/O • All DMA and Port I/O is assumed high integrity • Any data off the network will be read and forced low integrity • It will stay low integrity because of the establishment time requirement • Consider the alternative

More Related