SlideShare une entreprise Scribd logo
1  sur  11
Télécharger pour lire hors ligne
HYPERVISOR-BASED SECURITY:
VICARIOUS LEARNING VIA
INTROSPEKTIONEERING, OR HOW I
LEARNED TO LOVE THE BOMB
Mihai DONȚU
Technical Project Manager, Bitdefender Linux Development Team
Xen Project Developer Summit, August 25-26, 2016
08/26/2016
Outline
• Quick recap of VMI history
• Current status
• Bitdefender’s approach to a VMI-based commercial product
• Current effort
• the x86 emulator
• the Xen VMI API performance
08/26/2016
Quick recap of VMI history
• 2003 – Garfinkel & Rosenblum: “A Virtual Machine Introspection Based Architecture for
Intrusion Detection”
• 2008 – Dinaburg et al.: “Ether: Malware Analysis via Hardware Virtualization Extensions”
(Xen 3.1)
• 2012 – A number of companies start working on improving Xen’s VMI capabilities
(Bitdefender is among them)
• 2016 – Bitdefender releases a commercial product using VMI, in technical preview (based
on Citrix XenServer 7.0)
08/26/2016
Current status
The core API is complete for x86 (ARM?) and allows:
• receiving MSR modification events
• … CR modification events
• … user VMCALL-s
• … breakpoint events
• EPT violation events
• ability to veto events (eg. prevent setting and MSR)
• query guest vCPU-s (GPRs, TSC etc.)
08/26/2016
Bitdefender’s approach to a VMI-based commercial product
Xen Hypervisor
dom0
SVA
(domU0)
domU1Memory
Introspection
Engine
domU2 domUN
SVA (Security Virtual Appliance) – privileged VM capable of introspecting all others
Memory Introspection Engine – user space application that processes all VMI events
08/26/2016
Current effort
• Focused on VDI
• Few but serious bumps on the road, largely performance related
• Testing rig:
• 2 x Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz (16 cores, 32 threads)
• 384GiB RAM
• 1TB SSD
• XenServer 7.0
• Standard VDI benchmarking software
08/26/2016
x86 emulator
• Used to execute an instruction that would normally generate a #PF without changing the
page protection in EPT
• Very complex code
• Forked ~ 2006 in KVM and largely rewritten
• Incomplete SSE support causes problems in non-VMI projects as well (eg. QXL)
• SSE-related patches are incoming
• Two alternatives available:
• pause all vCPU-s, remove the page protection, single step, restore the page
protection, unpause all vCPU-s
• switch EPT view (altp2m), single step, switch back EPT view (this is the future)
• In Xen 4.6 (XenServer 7.0) altp2m is not yet ready
08/26/2016
The Xen VMI API performance
• Benchmark shows how many VM-s the host can run until the ‘user experience’ degrades
too much
• Target: 20% penalty
• Each VM: 2 vCPU, 3 GiB RAM
• First benchmark test (w/o VMI): 96
• Second benchmark test (w/ VMI, OS kernel only): 9
• Optimizations: w/ VMI, OS kernel only:
• … + cache xc_domain_hvm_getcontext_partial(): 50
• … + filter MSR-events: 55
• … + no domain_pause() in xc_domain_hvm_getcontext_partial(): 90
• w/ VMI, OS kernel, userspace (winword.exe): 30
• … + no xc_get_vcpucontext(): 50
• … + no xc_set_vcpucontext(): 86
• … + upgrade SVA kernel from 3.8 to 4.4: 90
• w/ VMI, OS kernel, userspace (more processes): 35
• … + more xc_domain_hvm_getcontext_partial() work: 40
• … + cache xc_get_mem_access(): 43
• optimization opportunities are still being researched
08/26/2016
The Xen VMI API performance (2)
• A number of API calls were not meant to be abused by VMI
(xc_domain_hvm_getcontext_partial(), xc_{set,get}_vcpucontext())
• Needlessly pause the entire domain in order to get the registers of a paused vCPU
• xen_hypercall_xen_version() shows up at the top when the event channel is stressed
# perf top -C 1
25.58% [kernel] [k] xen_hypercall_xen_version
10.25% [kernel] [k] xen_hypercall_sched_op
9.48% [kernel] [k] xen_hypercall_event_channel_op
5.80% libintrocore.so [.] IntHandleEptViolation
1.83% bdmid [.] IntrocoreManager::IntQueryGuestInfo
1.71% libpthread-2.23.so [.] pthread_mutex_lock
1.28% libpthread-2.23.so [.] pthread_mutex_unlock
1.27% libbdvmi.so [.] bdvmi::XenEventManager::waitForEvents
1.14% libbdvmi.so [.] bdvmi::StatsCollector::incStat
1.12% libintrocore.so [.] IntIcLookupInstruction
# perf top -C 0
26.34% [kernel] [k] xen_hypercall_xen_version
8.07% [kernel] [k] xen_hypercall_event_channel_op
6.52% libintrocore.so [.] IntHandleEptViolation
2.43% libintrocore.so [.] NdDecodeEx2
2.28% [kernel] [k] xen_hypercall_sched_op
2.20% bdmid [.] IntrocoreManager::IntQueryGuestInfo
2.13% libpthread-2.23.so [.] pthread_mutex_lock
1.47% libpthread-2.23.so [.] 0x000000000001055d
1.42% libpthread-2.23.so [.] pthread_mutex_unlock
1.40% libc-2.23.so [.] ioctl
• evtchn IRQ balancing has negative effects, even though CPU0 cannot take all IRQ-s
Q & A
XPDS16:  Hypervisor-based Security: Vicarious Learning via Introspektioneering, or How I Learned to Love the Bomb - Mihai Dontu, Bitdefender

Contenu connexe

Tendances

XPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, Intel
XPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, IntelXPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, Intel
XPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, Intel
The Linux Foundation
 

Tendances (20)

UEFI HTTP/HTTPS Boot
UEFI HTTP/HTTPS BootUEFI HTTP/HTTPS Boot
UEFI HTTP/HTTPS Boot
 
LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...
LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...
LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...
 
LFNW2014 Advanced Security Features of Xen Project Hypervisor
LFNW2014 Advanced Security Features of Xen Project HypervisorLFNW2014 Advanced Security Features of Xen Project Hypervisor
LFNW2014 Advanced Security Features of Xen Project Hypervisor
 
PVH : PV Guest in HVM container
PVH : PV Guest in HVM containerPVH : PV Guest in HVM container
PVH : PV Guest in HVM container
 
XPDS16: Hypervisor Enforced Data Loss Prevention - Neil Sikka, A1LOGIC
XPDS16: Hypervisor Enforced Data Loss Prevention - Neil Sikka, A1LOGICXPDS16: Hypervisor Enforced Data Loss Prevention - Neil Sikka, A1LOGIC
XPDS16: Hypervisor Enforced Data Loss Prevention - Neil Sikka, A1LOGIC
 
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...
 
Rootlinux17: An introduction to Xen Project Virtualisation
Rootlinux17:  An introduction to Xen Project VirtualisationRootlinux17:  An introduction to Xen Project Virtualisation
Rootlinux17: An introduction to Xen Project Virtualisation
 
kdump: usage and_internals
kdump: usage and_internalskdump: usage and_internals
kdump: usage and_internals
 
XPDS14: Removing the Xen Linux Upstream Delta of Various Linux Distros - Luis...
XPDS14: Removing the Xen Linux Upstream Delta of Various Linux Distros - Luis...XPDS14: Removing the Xen Linux Upstream Delta of Various Linux Distros - Luis...
XPDS14: Removing the Xen Linux Upstream Delta of Various Linux Distros - Luis...
 
XPDS14 - Intel(r) Virtualization Technology for Directed I/O (VT-d) Posted In...
XPDS14 - Intel(r) Virtualization Technology for Directed I/O (VT-d) Posted In...XPDS14 - Intel(r) Virtualization Technology for Directed I/O (VT-d) Posted In...
XPDS14 - Intel(r) Virtualization Technology for Directed I/O (VT-d) Posted In...
 
XPDS14: Xen 4.5 Roadmap - Konrad Wilk, Oracle
XPDS14: Xen 4.5 Roadmap - Konrad Wilk, OracleXPDS14: Xen 4.5 Roadmap - Konrad Wilk, Oracle
XPDS14: Xen 4.5 Roadmap - Konrad Wilk, Oracle
 
XPDS14 - Towards Massive Server Consolidation - Filipe Manco, NEC
XPDS14 - Towards Massive Server Consolidation - Filipe Manco, NECXPDS14 - Towards Massive Server Consolidation - Filipe Manco, NEC
XPDS14 - Towards Massive Server Consolidation - Filipe Manco, NEC
 
Xen Project CI for OpenStack Overview
Xen Project CI for OpenStack OverviewXen Project CI for OpenStack Overview
Xen Project CI for OpenStack Overview
 
Open Source Citrix Windows PV Drivers - Paul Durrant, Citrix
Open Source Citrix Windows PV Drivers - Paul Durrant, CitrixOpen Source Citrix Windows PV Drivers - Paul Durrant, Citrix
Open Source Citrix Windows PV Drivers - Paul Durrant, Citrix
 
Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)
 
QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?
 
Xen Project: Windows PV Drivers
Xen Project: Windows PV DriversXen Project: Windows PV Drivers
Xen Project: Windows PV Drivers
 
ELC21: VM-to-VM Communication Mechanisms for Embedded
ELC21: VM-to-VM Communication Mechanisms for EmbeddedELC21: VM-to-VM Communication Mechanisms for Embedded
ELC21: VM-to-VM Communication Mechanisms for Embedded
 
VMware Advance Troubleshooting Workshop - Day 4
VMware Advance Troubleshooting Workshop - Day 4VMware Advance Troubleshooting Workshop - Day 4
VMware Advance Troubleshooting Workshop - Day 4
 
XPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, Intel
XPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, IntelXPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, Intel
XPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, Intel
 

En vedette

LinuxCon Japan 13 : 10 years of Xen and Beyond
LinuxCon Japan 13 : 10 years of Xen and BeyondLinuxCon Japan 13 : 10 years of Xen and Beyond
LinuxCon Japan 13 : 10 years of Xen and Beyond
The Linux Foundation
 

En vedette (20)

XPDS16: Patch review for non-maintainers - George Dunlap, Citrix Systems R&D...
 XPDS16: Patch review for non-maintainers - George Dunlap, Citrix Systems R&D... XPDS16: Patch review for non-maintainers - George Dunlap, Citrix Systems R&D...
XPDS16: Patch review for non-maintainers - George Dunlap, Citrix Systems R&D...
 
Fosdem 17 - Towards a HVM-like Dom0 for Xen
Fosdem 17 - Towards a HVM-like Dom0 for XenFosdem 17 - Towards a HVM-like Dom0 for Xen
Fosdem 17 - Towards a HVM-like Dom0 for Xen
 
XPDS16: Scope and Performance of Credit-2 Scheduler. - Anshul Makkar, Ctirix...
XPDS16:  Scope and Performance of Credit-2 Scheduler. - Anshul Makkar, Ctirix...XPDS16:  Scope and Performance of Credit-2 Scheduler. - Anshul Makkar, Ctirix...
XPDS16: Scope and Performance of Credit-2 Scheduler. - Anshul Makkar, Ctirix...
 
XPDS16: Keeping coherency on ARM - Julien Grall, ARM
XPDS16: Keeping coherency on ARM - Julien Grall, ARMXPDS16: Keeping coherency on ARM - Julien Grall, ARM
XPDS16: Keeping coherency on ARM - Julien Grall, ARM
 
XPDS16: High-Performance Virtualization for HPC Cloud on Xen - Jun Nakajima &...
XPDS16: High-Performance Virtualization for HPC Cloud on Xen - Jun Nakajima &...XPDS16: High-Performance Virtualization for HPC Cloud on Xen - Jun Nakajima &...
XPDS16: High-Performance Virtualization for HPC Cloud on Xen - Jun Nakajima &...
 
XPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARM
XPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARMXPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARM
XPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARM
 
XPDS16: Making Migration More Secure - John Shackleton, Adventium Labs
XPDS16: Making Migration More Secure - John Shackleton, Adventium LabsXPDS16: Making Migration More Secure - John Shackleton, Adventium Labs
XPDS16: Making Migration More Secure - John Shackleton, Adventium Labs
 
XPDS16: Live Migration of vGPU - Xiao Zheng, Intel Asia-Pacific Research & De...
XPDS16: Live Migration of vGPU - Xiao Zheng, Intel Asia-Pacific Research & De...XPDS16: Live Migration of vGPU - Xiao Zheng, Intel Asia-Pacific Research & De...
XPDS16: Live Migration of vGPU - Xiao Zheng, Intel Asia-Pacific Research & De...
 
Fosdem17 - Mixed License FOSS Projects
Fosdem17 - Mixed License FOSS ProjectsFosdem17 - Mixed License FOSS Projects
Fosdem17 - Mixed License FOSS Projects
 
XPDS16: Live scalability for vGPU using gScale - Xiao Zheng, Intel
XPDS16: Live scalability for vGPU using gScale - Xiao Zheng, IntelXPDS16: Live scalability for vGPU using gScale - Xiao Zheng, Intel
XPDS16: Live scalability for vGPU using gScale - Xiao Zheng, Intel
 
LinuxCon Japan 13 : 10 years of Xen and Beyond
LinuxCon Japan 13 : 10 years of Xen and BeyondLinuxCon Japan 13 : 10 years of Xen and Beyond
LinuxCon Japan 13 : 10 years of Xen and Beyond
 
LCEU13: Securing your cloud with Xen's advanced security features - George Du...
LCEU13: Securing your cloud with Xen's advanced security features - George Du...LCEU13: Securing your cloud with Xen's advanced security features - George Du...
LCEU13: Securing your cloud with Xen's advanced security features - George Du...
 
ALSS14: Xen Project Automotive Hypervisor (Demo)
ALSS14: Xen Project Automotive Hypervisor (Demo)ALSS14: Xen Project Automotive Hypervisor (Demo)
ALSS14: Xen Project Automotive Hypervisor (Demo)
 
Xen summit amd_2010v3
Xen summit amd_2010v3Xen summit amd_2010v3
Xen summit amd_2010v3
 
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
XPDS13: On Paravirualizing TCP - Congestion Control on Xen VMs - Luwei Cheng,...
 
XPDS16: AMD's virtualization memory encryption technology - Brijesh Singh, A...
XPDS16:  AMD's virtualization memory encryption technology - Brijesh Singh, A...XPDS16:  AMD's virtualization memory encryption technology - Brijesh Singh, A...
XPDS16: AMD's virtualization memory encryption technology - Brijesh Singh, A...
 
Cobbler Summit - Automated Xen VM Deployment
Cobbler Summit - Automated Xen VM DeploymentCobbler Summit - Automated Xen VM Deployment
Cobbler Summit - Automated Xen VM Deployment
 
XPDS16: Consideration of Real Time GPU Scheduling of XenGT in Automotive Embe...
XPDS16: Consideration of Real Time GPU Scheduling of XenGT in Automotive Embe...XPDS16: Consideration of Real Time GPU Scheduling of XenGT in Automotive Embe...
XPDS16: Consideration of Real Time GPU Scheduling of XenGT in Automotive Embe...
 
LF Collaboration Summit: Xen Project 4 4 Features and Futures
LF Collaboration Summit: Xen Project 4 4 Features and FuturesLF Collaboration Summit: Xen Project 4 4 Features and Futures
LF Collaboration Summit: Xen Project 4 4 Features and Futures
 
Performance Tuning Xen
Performance Tuning XenPerformance Tuning Xen
Performance Tuning Xen
 

Similaire à XPDS16: Hypervisor-based Security: Vicarious Learning via Introspektioneering, or How I Learned to Love the Bomb - Mihai Dontu, Bitdefender

Virtualization
VirtualizationVirtualization
Virtualization
ganeshhcl
 

Similaire à XPDS16: Hypervisor-based Security: Vicarious Learning via Introspektioneering, or How I Learned to Love the Bomb - Mihai Dontu, Bitdefender (20)

17-virtualization.pptx
17-virtualization.pptx17-virtualization.pptx
17-virtualization.pptx
 
Multicore 101: Migrating Embedded Apps to Multicore with Linux
Multicore 101: Migrating Embedded Apps to Multicore with LinuxMulticore 101: Migrating Embedded Apps to Multicore with Linux
Multicore 101: Migrating Embedded Apps to Multicore with Linux
 
Platform Security Summit 18: Xen Security Weather Report 2018
Platform Security Summit 18: Xen Security Weather Report 2018Platform Security Summit 18: Xen Security Weather Report 2018
Platform Security Summit 18: Xen Security Weather Report 2018
 
Private cloud server virtualization
Private cloud server virtualization Private cloud server virtualization
Private cloud server virtualization
 
Apache Cloudstack QA Strategy
Apache Cloudstack QA StrategyApache Cloudstack QA Strategy
Apache Cloudstack QA Strategy
 
IITCC15: Xen Project 4.6 Update
IITCC15: Xen Project 4.6 UpdateIITCC15: Xen Project 4.6 Update
IITCC15: Xen Project 4.6 Update
 
VMworld 2013: How to Exchange Status Message Between Guest and Host Using RPC
VMworld 2013: How to Exchange Status Message Between Guest and Host Using RPC VMworld 2013: How to Exchange Status Message Between Guest and Host Using RPC
VMworld 2013: How to Exchange Status Message Between Guest and Host Using RPC
 
XPDS14 - Zero-Footprint Guest Memory Introspection from Xen - Mihai Dontu, Bi...
XPDS14 - Zero-Footprint Guest Memory Introspection from Xen - Mihai Dontu, Bi...XPDS14 - Zero-Footprint Guest Memory Introspection from Xen - Mihai Dontu, Bi...
XPDS14 - Zero-Footprint Guest Memory Introspection from Xen - Mihai Dontu, Bi...
 
Virtualizacao de Servidores - Windows
Virtualizacao de Servidores - WindowsVirtualizacao de Servidores - Windows
Virtualizacao de Servidores - Windows
 
2015 02-10 xen server master class
2015 02-10 xen server master class2015 02-10 xen server master class
2015 02-10 xen server master class
 
Openstack Architecture
Openstack ArchitectureOpenstack Architecture
Openstack Architecture
 
Virtualization
VirtualizationVirtualization
Virtualization
 
Virtualization
VirtualizationVirtualization
Virtualization
 
Virtualization
VirtualizationVirtualization
Virtualization
 
Eranea's solution and technology for mainframe migration / transformation : d...
Eranea's solution and technology for mainframe migration / transformation : d...Eranea's solution and technology for mainframe migration / transformation : d...
Eranea's solution and technology for mainframe migration / transformation : d...
 
Advanced performance troubleshooting using esxtop
Advanced performance troubleshooting using esxtopAdvanced performance troubleshooting using esxtop
Advanced performance troubleshooting using esxtop
 
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
 
Server 2016 sneak peek
Server 2016 sneak peekServer 2016 sneak peek
Server 2016 sneak peek
 
Lets vRealize level -100 Presentation
Lets vRealize level -100 PresentationLets vRealize level -100 Presentation
Lets vRealize level -100 Presentation
 
Virtualization and how it leads to cloud
Virtualization and how it leads to cloudVirtualization and how it leads to cloud
Virtualization and how it leads to cloud
 

Plus de The Linux Foundation

Plus de The Linux Foundation (20)

ELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made SimpleELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made Simple
 
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
 
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
 
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
 
XPDDS19 Keynote: Unikraft Weather Report
XPDDS19 Keynote:  Unikraft Weather ReportXPDDS19 Keynote:  Unikraft Weather Report
XPDDS19 Keynote: Unikraft Weather Report
 
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
 
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxXPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
 
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
 
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
XPDDS19: Memories of a VM Funk - Mihai Donțu, BitdefenderXPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
 
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
 
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
 OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making... OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
 
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, CitrixXPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
 
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltdXPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
 
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
 
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&DXPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
 
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM SystemsXPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
 
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
 
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
 
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
 
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSEXPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 

XPDS16: Hypervisor-based Security: Vicarious Learning via Introspektioneering, or How I Learned to Love the Bomb - Mihai Dontu, Bitdefender

  • 1. HYPERVISOR-BASED SECURITY: VICARIOUS LEARNING VIA INTROSPEKTIONEERING, OR HOW I LEARNED TO LOVE THE BOMB Mihai DONȚU Technical Project Manager, Bitdefender Linux Development Team Xen Project Developer Summit, August 25-26, 2016
  • 2. 08/26/2016 Outline • Quick recap of VMI history • Current status • Bitdefender’s approach to a VMI-based commercial product • Current effort • the x86 emulator • the Xen VMI API performance
  • 3. 08/26/2016 Quick recap of VMI history • 2003 – Garfinkel & Rosenblum: “A Virtual Machine Introspection Based Architecture for Intrusion Detection” • 2008 – Dinaburg et al.: “Ether: Malware Analysis via Hardware Virtualization Extensions” (Xen 3.1) • 2012 – A number of companies start working on improving Xen’s VMI capabilities (Bitdefender is among them) • 2016 – Bitdefender releases a commercial product using VMI, in technical preview (based on Citrix XenServer 7.0)
  • 4. 08/26/2016 Current status The core API is complete for x86 (ARM?) and allows: • receiving MSR modification events • … CR modification events • … user VMCALL-s • … breakpoint events • EPT violation events • ability to veto events (eg. prevent setting and MSR) • query guest vCPU-s (GPRs, TSC etc.)
  • 5. 08/26/2016 Bitdefender’s approach to a VMI-based commercial product Xen Hypervisor dom0 SVA (domU0) domU1Memory Introspection Engine domU2 domUN SVA (Security Virtual Appliance) – privileged VM capable of introspecting all others Memory Introspection Engine – user space application that processes all VMI events
  • 6. 08/26/2016 Current effort • Focused on VDI • Few but serious bumps on the road, largely performance related • Testing rig: • 2 x Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz (16 cores, 32 threads) • 384GiB RAM • 1TB SSD • XenServer 7.0 • Standard VDI benchmarking software
  • 7. 08/26/2016 x86 emulator • Used to execute an instruction that would normally generate a #PF without changing the page protection in EPT • Very complex code • Forked ~ 2006 in KVM and largely rewritten • Incomplete SSE support causes problems in non-VMI projects as well (eg. QXL) • SSE-related patches are incoming • Two alternatives available: • pause all vCPU-s, remove the page protection, single step, restore the page protection, unpause all vCPU-s • switch EPT view (altp2m), single step, switch back EPT view (this is the future) • In Xen 4.6 (XenServer 7.0) altp2m is not yet ready
  • 8. 08/26/2016 The Xen VMI API performance • Benchmark shows how many VM-s the host can run until the ‘user experience’ degrades too much • Target: 20% penalty • Each VM: 2 vCPU, 3 GiB RAM • First benchmark test (w/o VMI): 96 • Second benchmark test (w/ VMI, OS kernel only): 9 • Optimizations: w/ VMI, OS kernel only: • … + cache xc_domain_hvm_getcontext_partial(): 50 • … + filter MSR-events: 55 • … + no domain_pause() in xc_domain_hvm_getcontext_partial(): 90 • w/ VMI, OS kernel, userspace (winword.exe): 30 • … + no xc_get_vcpucontext(): 50 • … + no xc_set_vcpucontext(): 86 • … + upgrade SVA kernel from 3.8 to 4.4: 90 • w/ VMI, OS kernel, userspace (more processes): 35 • … + more xc_domain_hvm_getcontext_partial() work: 40 • … + cache xc_get_mem_access(): 43 • optimization opportunities are still being researched
  • 9. 08/26/2016 The Xen VMI API performance (2) • A number of API calls were not meant to be abused by VMI (xc_domain_hvm_getcontext_partial(), xc_{set,get}_vcpucontext()) • Needlessly pause the entire domain in order to get the registers of a paused vCPU • xen_hypercall_xen_version() shows up at the top when the event channel is stressed # perf top -C 1 25.58% [kernel] [k] xen_hypercall_xen_version 10.25% [kernel] [k] xen_hypercall_sched_op 9.48% [kernel] [k] xen_hypercall_event_channel_op 5.80% libintrocore.so [.] IntHandleEptViolation 1.83% bdmid [.] IntrocoreManager::IntQueryGuestInfo 1.71% libpthread-2.23.so [.] pthread_mutex_lock 1.28% libpthread-2.23.so [.] pthread_mutex_unlock 1.27% libbdvmi.so [.] bdvmi::XenEventManager::waitForEvents 1.14% libbdvmi.so [.] bdvmi::StatsCollector::incStat 1.12% libintrocore.so [.] IntIcLookupInstruction # perf top -C 0 26.34% [kernel] [k] xen_hypercall_xen_version 8.07% [kernel] [k] xen_hypercall_event_channel_op 6.52% libintrocore.so [.] IntHandleEptViolation 2.43% libintrocore.so [.] NdDecodeEx2 2.28% [kernel] [k] xen_hypercall_sched_op 2.20% bdmid [.] IntrocoreManager::IntQueryGuestInfo 2.13% libpthread-2.23.so [.] pthread_mutex_lock 1.47% libpthread-2.23.so [.] 0x000000000001055d 1.42% libpthread-2.23.so [.] pthread_mutex_unlock 1.40% libc-2.23.so [.] ioctl • evtchn IRQ balancing has negative effects, even though CPU0 cannot take all IRQ-s
  • 10. Q & A