dynamic vm monitoring using hypervisor probes
play

Dynamic VM Monitoring using Hypervisor Probes Z. J. Estrada , C. - PowerPoint PPT Presentation

Dynamic VM Monitoring using Hypervisor Probes Z. J. Estrada , C. Pham, F. Deng, L. Yan, Z. Kalbarczyk, R. K. Iyer European Dependable Computing Conference 2015-09-09 ECE ILLINOIS 1 Department of Electrical and Computer Engineering Dynamic VM


  1. Dynamic VM Monitoring using Hypervisor Probes Z. J. Estrada , C. Pham, F. Deng, L. Yan, Z. Kalbarczyk, R. K. Iyer European Dependable Computing Conference 2015-09-09 ECE ILLINOIS 1 Department of Electrical and Computer Engineering

  2. Dynamic VM Monitoring Goal On-demand VM Monitoring to reduce the effort required to harden computing systems against failures and attacks. � Uptime requirements � Effort required � QA concerns � Lack of knowledge ECE ILLINOIS 2 Department of Electrical and Computer Engineering

  3. VM Monitoring Reliability & Security Monitoring Recording and analyzing a computer system to detect failures and attacks. ◮ Passive - polling based ◮ Active - event based ECE ILLINOIS 3 Department of Electrical and Computer Engineering

  4. VM Monitoring Applications VM OS Hypervisor KVM ECE ILLINOIS 4 Department of Electrical and Computer Engineering

  5. VM Monitoring Applications VM OS Hypervisor KVM Monitor ECE ILLINOIS 4 Department of Electrical and Computer Engineering

  6. VM Monitoring Applications VM OS Hypervisor KVM ECE ILLINOIS 4 Department of Electrical and Computer Engineering

  7. VM Monitor Monitor is running inside the hypervisor ECE ILLINOIS 5 Department of Electrical and Computer Engineering

  8. VM Monitor VM execution reaches a hook ECE ILLINOIS 5 Department of Electrical and Computer Engineering

  9. VM Monitor Control is transferred to the monitor ECE ILLINOIS 5 Department of Electrical and Computer Engineering

  10. VM Monitor The monitor performs its monitoring function ECE ILLINOIS 5 Department of Electrical and Computer Engineering

  11. VM Monitor Control is transferred back to the VM ECE ILLINOIS 5 Department of Electrical and Computer Engineering

  12. VM Monitor The VM resumes normal execution ECE ILLINOIS 5 Department of Electrical and Computer Engineering

  13. Hook-Based VM Monitoring Previous techniques: + Active monitoring + Protected hooks − Guest OS only - no userspace − Not dynamic - boot time config − Require guest OS modifications ECE ILLINOIS 6 Department of Electrical and Computer Engineering

  14. Goals Hook-based monitoring should: + be protected from attacks in the VM + be simple to use + not require guest OS modification + be runtime adaptable + allow for arbitrary hook placement ECE ILLINOIS 7 Department of Electrical and Computer Engineering

  15. Hypervisor Probes ECE ILLINOIS 8 Department of Electrical and Computer Engineering

  16. Hardware Assisted Virt. Host Mode Guest Mode (root) (non-root) User User VMEntry Kernel VMExit Kernel ECE ILLINOIS 9 Department of Electrical and Computer Engineering

  17. Hypervisor Probes ◮ Event on guest execution ◮ Event transfers control to hypervisor (VM Exit) ◮ Perform monitoring after that event ◮ Hooks added/removed at runtime ◮ Monitors applications and the guest OS ECE ILLINOIS 10 Department of Electrical and Computer Engineering

  18. Hprobe Architecture Host System VM Probe Probe Probe Status Hprobe Checker user agent Set/Remove probes ioctl (…) Detector 1 Event Forwarder Insert/Remove probes Hprobe Detector 2 Helper APIs Set single step Kernel agent KVM Hypervisor Detector n Host Linux kernel ECE ILLINOIS 11 Department of Electrical and Computer Engineering

  19. Hprobes API int HPROBE_add_probe( ); int HPROBE_remove_probe( ); ◮ addr info : gva+cr3 ◮ vmid : unique id for VM ◮ vcpu type : vcpu state ECE ILLINOIS 12 Department of Electrical and Computer Engineering

  20. Probe ⇒ Event Forwarder Hypervisor VM ... pushl %eax incl %eax decl %ebx ... ECE ILLINOIS 13 Department of Electrical and Computer Engineering

  21. Probe ⇒ Event Forwarder Hypervisor VM ... pushl %eax int3 decl %ebx ... ECE ILLINOIS 13 Department of Electrical and Computer Engineering

  22. Probe ⇒ Event Forwarder Hypervisor VM probe hit handler() (int3) Detector ... pushl %eax int3 decl %ebx ... ECE ILLINOIS 13 Department of Electrical and Computer Engineering

  23. Probe ⇒ Event Forwarder Hypervisor VM probe hit handler() (int3) Reset inst. ... pushl %eax incl %eax decl %ebx ... ECE ILLINOIS 13 Department of Electrical and Computer Engineering

  24. Probe ⇒ Event Forwarder Hypervisor VM probe hit handler() (int3) Reset inst. ... single execute pushl %eax inst. step incl %eax decl %ebx ... ECE ILLINOIS 13 Department of Electrical and Computer Engineering

  25. Probe ⇒ Event Forwarder Hypervisor VM probe hit handler() (int3) Reset inst. ... single execute pushl %eax inst. step int3 decl %ebx rewrite trap ... int3 ECE ILLINOIS 13 Department of Electrical and Computer Engineering

  26. Probe ⇒ Event Forwarder Hypervisor VM probe hit handler() (int3) Reset inst. ... single execute pushl %eax inst. step int3 decl %ebx rewrite trap ... int3 ... resume ECE ILLINOIS 13 Department of Electrical and Computer Engineering

  27. Userspace Probe Challenge Guest Page Tables ECE ILLINOIS 14 Department of Electrical and Computer Engineering

  28. Userspace Probe Challenge Guest Page Tables ECE ILLINOIS 14 Department of Electrical and Computer Engineering

  29. Userspace Probe Challenge Guest Page Tables ECE ILLINOIS 14 Department of Electrical and Computer Engineering

  30. Extended Page Tables (EPT) [1] ◮ Guest OS has full control over PTs ◮ 2nd set of HW PTs for GPA → HPA ◮ Use EPT to write-protect Guest Page Table [1] http://www-archive.xenproject.org/files/xensummit 4/VT roadmap d Nakajima.pdf ECE ILLINOIS 15 Department of Electrical and Computer Engineering

  31. Goals Hook-based monitoring should: + be protected from attacks in the VM + be simple to use + not require guest OS modification + be runtime adaptable + allow for arbitrary hook placement ECE ILLINOIS 16 Department of Electrical and Computer Engineering

  32. Goals Hook-based monitoring should: � be protected from attacks in the VM + be simple to use + not require guest OS modification + be runtime adaptable + allow for arbitrary hook placement ECE ILLINOIS 16 Department of Electrical and Computer Engineering

  33. Goals Hook-based monitoring should: � be protected from attacks in the VM � be simple to use + not require guest OS modification + be runtime adaptable + allow for arbitrary hook placement ECE ILLINOIS 16 Department of Electrical and Computer Engineering

  34. Goals Hook-based monitoring should: � be protected from attacks in the VM � be simple to use � not require guest OS modification + be runtime adaptable + allow for arbitrary hook placement ECE ILLINOIS 16 Department of Electrical and Computer Engineering

  35. Goals Hook-based monitoring should: � be protected from attacks in the VM � be simple to use � not require guest OS modification � be runtime adaptable + allow for arbitrary hook placement ECE ILLINOIS 16 Department of Electrical and Computer Engineering

  36. Goals Hook-based monitoring should: � be protected from attacks in the VM � be simple to use � not require guest OS modification � be runtime adaptable � allow for arbitrary hook placement ECE ILLINOIS 16 Department of Electrical and Computer Engineering

  37. Hprobe Microbenchmarks ◮ probe @ noop kernel function ◮ execute 1M times VM Hypervisor insert probe kernel kernel record start/stop time hypercall user user [2] [2] Adapted from an image by Fei Deng ECE ILLINOIS 17 Department of Electrical and Computer Engineering

  38. Hprobe Single Probe Latency 4.5 4.0 3.5 Time ( µ s) 3.0 2.5 2.0 2.6GHz E5430 2.2-3.0GHz E5-2660 Harpertown (2007) Sandy Bridge (2012) ECE ILLINOIS 18 Department of Electrical and Computer Engineering

  39. Hook-based VM Monitoring Name Latency User Dynamic Modifications Lares 28 µ s No No Hypervisor/Guest SIM 0.40 µ s No No Hypervisor/Guest hprobes 2.6 µ s Yes Yes Hypervisor ECE ILLINOIS 19 Department of Electrical and Computer Engineering

  40. Hook-based VM Monitoring Name Latency User Dynamic Modifications Lares 28 µ s No No Hypervisor/Guest SIM 0.40 µ s No No Hypervisor/Guest hprobes 2.6 µ s Yes Yes Hypervisor ◮ as-a-Service is worth slight performance cost ECE ILLINOIS 19 Department of Electrical and Computer Engineering

  41. Detectors What detectors can we build with hprobes? ECE ILLINOIS 20 Department of Electrical and Computer Engineering

  42. Detectors What detectors can we build with hprobes? ◮ Arbitrarily chose events ◮ On-demand ◮ Access to VM memory & CPU state ECE ILLINOIS 20 Department of Electrical and Computer Engineering

  43. Heartbeat/watchdog App Detector ECE ILLINOIS 21 Department of Electrical and Computer Engineering

  44. Heartbeat/watchdog App e b o r P t r e s n I Detector ECE ILLINOIS 21 Department of Electrical and Computer Engineering

  45. Heartbeat/watchdog App e b P o r r o P b e t r e H s i t n I Detector ECE ILLINOIS 21 Department of Electrical and Computer Engineering

  46. Heartbeat/watchdog App e b P o r r o P b e t r e H s i t n I Detector reset timer ECE ILLINOIS 21 Department of Electrical and Computer Engineering

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