SlideShare a Scribd company logo
1 of 25
Download to read offline
Memory Deduplication
                   as a Threat to the Guest OS

                          Kuniyasu Suzaki, Kengo Iijima,
                            Toshiki Yagi, Cyrille Artho



           Research Center for Information Security



EuroSec 2011 at Salzburg, April 10
Background 1/2
• IaaS (Infrastructure as a Service) type cloud
  computing hosts many virtual machines.
   – Examples: Amazon EC2, Rackspace, ...
   – Physical resources (Memory/Storage) are very important.
• Image of guest OS are provided by IaaS venders.
   – Most contents are same.
• Deduplication technique is utilized to share same
  contents and reduces consumption of physical
  resources.
Background 2/2
• Unfortunately memory deduplication has access time
  difference between non-deduplicated pages and
  deduplicated pages, caused by Copy-On-Write.
• Attacker can use this phenomena for memory
  disclosure attack .
• Our paper presents real attack to a Guest OS
  (Windows and Linux).
Contents
1) Background
2) Memory deduplication
3) Memory disclosure attack
4) Experiments
5) Discussion and Conclusion
Memory Deduplication 1/2
• Memory deduplication is a technique to share same
  contents page.
   – Mainly used for virtual machines.
   – Very effective when same guest OS runs on several virtual
     machines.
• Many virtual machine monitors include deduplication
• Implementations may differ
                             Guest Pseudo Memory
                       VM1           VM2              VM(n)




                               Real Physical Memory
Memory Deduplication 2/2
• Content-aware deduplication
  – Transparent Page Sharing on Disco [OSDI97]
  – Satori on Xen[USENIX09]
• Periodical memory-scan dedpulication
  – Content-Based Page Sharing on VMWare ESX [SOSP02]
  – Differential Engine on Xen[OSDI08]
  – KSM (Kernel Samepage Merging) [LinuxSymp09]
     • General-purpose memory deduplication for Linux.
     • Used mainly for KVM.


• Our paper uses KSM with KVM virtual machine.
KSM: Kernel Samepage Merging
• KSM has 3 states for pages.
   – Volatile : contents change frequently (not to be candidate)
   – Unshared: candidate pages for deduplication
   – Shared: deduplicated pages
• Pages are scanned (default: 20msec)
   – All pages are not scanned at a time.
   – The maximum is 25% of the available memory.
   – The time to be deduplicated depends on the situation.
• Write accesses to deduplicated pages are managed
  by Copy-On-Write.
Copy-On-Write (COW)
• When a write access is issued to a deduplicated page, a
  fresh copy is created, which accepts write access.
• Write access time difference between deduplicateted
  and non-deduplicated pages due to copying.
• A kind of Covert Channel of COW

       Guest Pseudo Memory
            VM1              VM2          Write Access   VM1        VM2
            (victim)         (attacker)                  (victim)   (attacker)




        Real Physical Memory                                              Re-created page cases
                                                                          access time difference
Memory Disclosure Attack
• Attacker can use write access time difference to guess
  memory contents on a victim’s VM.

 Basic idea for memory disclosure attack
   • Allocate same contents pages on memory of
      attacker’s VM.
   • Wait to be deduplicaed
   • Issue write access to the pages. When the pages
      are deduplicated, the write access time is longer
      than normal.

• Used to detect a process or an open file on victim’s VM
Implementation detail 1/2
(1) Get memory image of victim VM
  – To detect a process
     • An executable binary file is used, because a loader (ex. ld-
       linux.so) loads most parts of binary file without change.
     • The last page which is less than 4KB is not target of
       matching, because the tail of 4KB may include arbitrary
       contents on the memory.
  – To detect an opened file
     • Normal file is used. It is saved in page cache without change.
Implementation detail 2/2
(2) Compare time difference
• Write one byte on each target page and measure the access
  time.
• Compare the time with the access time measured already
  – zero-cleared (dedupicated) and random data (non-deduplicated).


• Length of waiting time
   – Depends on size of memory for memory scan type.
Problems on implementation
• Memory disclosure attack for memory deduplication
  looks simple, but there are some problems.
  – 4KB Alignment problem
     • Caused by memory allocation strategy
  – Self-reflection problem
     • Caused by memory management on cache and heap
  – Run time modification problem
     • Caused by ASLR, swap-out, etc
4KB alignment problem
• On victim’s VM
  – A binary file is loaded with 4KB alignment.
  – Opened file is cached with 4KB alignment.
• On Attacker’s VM
  – Attacker loads the matching contents on his heap memory.
  – The contents MUST be loaded on 4KB alignment.
     • Attacker can use posix_memalign() to get aligned memory region.
Self-reflection problem 1/2
• Contents of opened file by attacker’s program are stored
  on page cache memory by Linux kernel.
• Attacker loads the matching contents on his heap memory.
• The heap memory contents is deduplicated to the page
  cache memory contents on a VM! [self-reflection problem]
                  attacker’s program              memory on attacker’s VM
  matching
                                                Un-control by
  target file      …                         attacker’s program     page
                   open();                                          cache
                                           Contents stored
                   …                       on page cache
                   posix_memalign();
                   read();                                          heap    Same contents
                                          Contents stored
                   …                      on heap memory
                                                                            are deduplicated
                                                                            on self memory
                   gettimeofday();
                   # write data to heap
                                          access time is delayed with
                   gettimeofday();        self memory deduplication
Self-reflection problem 2/2
• Image on heap and page cache must be different.
• We gzipped the target file and expand it at run time.
   – The contents on page cache is gzipped image.



                    attacker’s program            memory on attacker’s VM
 matching target
                                                Un-control by
 file with gziped   …                        attacker’s program   page
                    gzopen();                                     cache
                                           Contents stored
                    …                      on page cache
                    posix_memalign();
                                                                            different contents
                    gzread();                                     heap
                                           Contents stored
                    …                      on heap memory
                    gettimeofday();                                       Deduplicated with
                    # write data to heap                                  memory on other VM
                    gettimeofday();
Run time modification problem
• Some parts of code are modified at run time, and cause
   – False-negative
      • ASLR (Address Space Layout Randomization)
          – Modern kernel has this security function. (after Linux2.6.12, after
            Windows VISTA)
          – Most text parts are not changed. Even if the pages are scattered, the unit is
            4KB. The memory disclosure attack does not care ASLR.
      • Swap-out
      • Self modification code
          – Not used by normal applications.
   – False-positive
      • Pre-load mechanism
      • Common 4KB Code
Summary of memory disclosure attack
• The memory disclosure attack is 4KB aligned exact
  matching.
• Limitation
   – Attacker can know
      • existence of process.
      • opened or downloaded file.
   – Attacker doesn’t know
      • termination of process because of un-cleared page cache.
      • which virtual machine has the contents.
   – Noises cause false-negative and false-positive.
      • Include timing of deduplication
Experiments
• The memory disclosure attack runs on KSM with
  KVM(0.12.4). The host linux kernel is 2.6.33.5.
• Victim’s VM
   – Guest OS: Debian GNU Linux and WindowsXP
   – Target applications
      • apache2 and sshd on Debian GNU Linux
      • Internet Explore6 and FireFox on WindowsXP
• Attacker’s VM
   – Guest OS: Debian GNU Linux
   – Assume to know invocation of application
   – Wait 5 minutes after target application is invoked
Attack for Apache2 and sshd on Linux
                                     Average (us)          zero   Random   Apache2
Apache2 ELF file 365,308B (89*4KB)   Before invocation     6.45   0.37     0.53
                                     After invocation      6.24   0.40     7.56




          Before invocation                         After invocation
                                     Average (us)          zero   random    sshd
sshd ELF file 438,852B (107*4KB)     Before invocation     6.60   0.55      0.45
                                     After invocation      6.51   0.42      7.50


                                      Non-deduplicated
                                     Timimng? swap-out?
                                      Code modification?




          Before invocation                         After invocation
Attack for Firefox and IE6 on WindowsXP
                                                 Average (us)        zero   random   Firefox
Firefox binary file 912,334B (222*4KB)           Before invocation   6.45   0.43     1.92
                                                 After invocation    6.49   0.37     7.68


             Deduplicated
           Common 4KB Code?
              Pre-load?




            Before invocation                                 After invocation
                                                Average (us)         zero   random    IE6
                                                Before invocation    6.59   0.27      5.68
IE6 binary file 93,184B (22*4KB)                After invocation     6.32   0.68      7.00


                                   IE6 has special
                                    optimization?




            Before invocation                                 After invocation
Detect downloaded file

• The memory disclosure attack can also be applied to
  find an opened file on a victim’s VM.
• We confirm that the “Google logo” file can be
  detected if page caching is enabled on Firefox.
• This disclosure attack is dangerous, because it detects
  a view of Home Page, even if the network is
  encrypted by TLS/SSL.
Countermeasure
• Satori[USENIX ATC’09] has a mechanism to refuse
  memory deduplication for each page.
   – Applications have to control its memory.
• Overshadow [ASPLOS’08] and SP3 [Vee’08] encrypt
  memory.
   – Unfortunately it ruins effect of memory deduplication.


• We plan to develop memory deduplication for read-only
  pages.
   – It requires to monitor page table of Guest OS.
Discussion
• Security function (memory sanitization) on Guest OS
  helps the memory disclosure attack
   – Because it tells termination of process.
• The memory disclosure attack can be used for security
  education.
   – Detect hidden process.
   – Data life time is longer than we expect [USENIX Security’05
     and ATC’06].
• The memory disclosure attack does not violate any SLA
  on cloud computing. It just measure access time.
Related Work
• Cross VM Side Channel Attack, “Hey, you, get off of
  my cloud” [CCS’09]
   – Monitor the behavior of a physically shared cache of multi-
     cores (hyper threads)
• Cold-boot attack [USENIX Security’08]
   – a kind of physical side channel attack, which freezes physical
     memory and scans the data.
Conclusion
• We presented memory disclose attack on memory
  deduplication which use write access time difference on
  Copy-On-Write.
• Experiments detected
   – Existence of apache2 and sshd on Linux,
   – IE6 and Firefox on WindowsXP,
   – downloaded file in the Firefox browser.
• Countermeasures and applicable usage are mentioned.

More Related Content

What's hot

VMware Performance Troubleshooting
VMware Performance TroubleshootingVMware Performance Troubleshooting
VMware Performance Troubleshootingglbsolutions
 
Improving the Performance of the qcow2 Format (KVM Forum 2017)
Improving the Performance of the qcow2 Format (KVM Forum 2017)Improving the Performance of the qcow2 Format (KVM Forum 2017)
Improving the Performance of the qcow2 Format (KVM Forum 2017)Igalia
 
Advanced Namespaces and cgroups
Advanced Namespaces and cgroupsAdvanced Namespaces and cgroups
Advanced Namespaces and cgroupsKernel TLV
 
Linux Virtualization
Linux VirtualizationLinux Virtualization
Linux VirtualizationOpenVZ
 
Linuxcon Barcelon 2012: LXC Best Practices
Linuxcon Barcelon 2012: LXC Best PracticesLinuxcon Barcelon 2012: LXC Best Practices
Linuxcon Barcelon 2012: LXC Best Practiceschristophm
 
Containers are the future of the Cloud
Containers are the future of the CloudContainers are the future of the Cloud
Containers are the future of the CloudPavel Odintsov
 
Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack eurobsdcon
 
sVirt: Hardening Linux Virtualization with Mandatory Access Control
sVirt: Hardening Linux Virtualization with Mandatory Access ControlsVirt: Hardening Linux Virtualization with Mandatory Access Control
sVirt: Hardening Linux Virtualization with Mandatory Access ControlJames Morris
 
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. TanenbaumA Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaumeurobsdcon
 
Introduction to NetBSD kernel
Introduction to NetBSD kernelIntroduction to NetBSD kernel
Introduction to NetBSD kernelMahendra M
 
Lxc – next gen virtualization for cloud intro (cloudexpo)
Lxc – next gen virtualization for cloud   intro (cloudexpo)Lxc – next gen virtualization for cloud   intro (cloudexpo)
Lxc – next gen virtualization for cloud intro (cloudexpo)Boden Russell
 
Linux containers – next gen virtualization for cloud (atl summit) ar4 3 - copy
Linux containers – next gen virtualization for cloud (atl summit) ar4 3 - copyLinux containers – next gen virtualization for cloud (atl summit) ar4 3 - copy
Linux containers – next gen virtualization for cloud (atl summit) ar4 3 - copyBoden Russell
 
Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)Dobrica Pavlinušić
 
Prairie DevCon-What's New in Hyper-V in Windows Server "8" Beta - Part 1
Prairie DevCon-What's New in Hyper-V in Windows Server "8" Beta - Part 1Prairie DevCon-What's New in Hyper-V in Windows Server "8" Beta - Part 1
Prairie DevCon-What's New in Hyper-V in Windows Server "8" Beta - Part 1Damir Bersinic
 
Let's Containerize New York with Docker!
Let's Containerize New York with Docker!Let's Containerize New York with Docker!
Let's Containerize New York with Docker!Jérôme Petazzoni
 
Realizing Linux Containers (LXC)
Realizing Linux Containers (LXC)Realizing Linux Containers (LXC)
Realizing Linux Containers (LXC)Boden Russell
 
12 christian ferber xen_server_advanced
12 christian ferber xen_server_advanced12 christian ferber xen_server_advanced
12 christian ferber xen_server_advancedDigicomp Academy AG
 

What's hot (19)

VMware Performance Troubleshooting
VMware Performance TroubleshootingVMware Performance Troubleshooting
VMware Performance Troubleshooting
 
Improving the Performance of the qcow2 Format (KVM Forum 2017)
Improving the Performance of the qcow2 Format (KVM Forum 2017)Improving the Performance of the qcow2 Format (KVM Forum 2017)
Improving the Performance of the qcow2 Format (KVM Forum 2017)
 
Advanced Namespaces and cgroups
Advanced Namespaces and cgroupsAdvanced Namespaces and cgroups
Advanced Namespaces and cgroups
 
Linux Virtualization
Linux VirtualizationLinux Virtualization
Linux Virtualization
 
Linuxcon Barcelon 2012: LXC Best Practices
Linuxcon Barcelon 2012: LXC Best PracticesLinuxcon Barcelon 2012: LXC Best Practices
Linuxcon Barcelon 2012: LXC Best Practices
 
Containers are the future of the Cloud
Containers are the future of the CloudContainers are the future of the Cloud
Containers are the future of the Cloud
 
Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack
 
sVirt: Hardening Linux Virtualization with Mandatory Access Control
sVirt: Hardening Linux Virtualization with Mandatory Access ControlsVirt: Hardening Linux Virtualization with Mandatory Access Control
sVirt: Hardening Linux Virtualization with Mandatory Access Control
 
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. TanenbaumA Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
 
Introduction to NetBSD kernel
Introduction to NetBSD kernelIntroduction to NetBSD kernel
Introduction to NetBSD kernel
 
Lxc – next gen virtualization for cloud intro (cloudexpo)
Lxc – next gen virtualization for cloud   intro (cloudexpo)Lxc – next gen virtualization for cloud   intro (cloudexpo)
Lxc – next gen virtualization for cloud intro (cloudexpo)
 
Linux based Stubdomains
Linux based StubdomainsLinux based Stubdomains
Linux based Stubdomains
 
Linux containers – next gen virtualization for cloud (atl summit) ar4 3 - copy
Linux containers – next gen virtualization for cloud (atl summit) ar4 3 - copyLinux containers – next gen virtualization for cloud (atl summit) ar4 3 - copy
Linux containers – next gen virtualization for cloud (atl summit) ar4 3 - copy
 
OpenVZ Linux Containers
OpenVZ Linux ContainersOpenVZ Linux Containers
OpenVZ Linux Containers
 
Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)Virtualization which isn't: LXC (Linux Containers)
Virtualization which isn't: LXC (Linux Containers)
 
Prairie DevCon-What's New in Hyper-V in Windows Server "8" Beta - Part 1
Prairie DevCon-What's New in Hyper-V in Windows Server "8" Beta - Part 1Prairie DevCon-What's New in Hyper-V in Windows Server "8" Beta - Part 1
Prairie DevCon-What's New in Hyper-V in Windows Server "8" Beta - Part 1
 
Let's Containerize New York with Docker!
Let's Containerize New York with Docker!Let's Containerize New York with Docker!
Let's Containerize New York with Docker!
 
Realizing Linux Containers (LXC)
Realizing Linux Containers (LXC)Realizing Linux Containers (LXC)
Realizing Linux Containers (LXC)
 
12 christian ferber xen_server_advanced
12 christian ferber xen_server_advanced12 christian ferber xen_server_advanced
12 christian ferber xen_server_advanced
 

Similar to EuroSec2011 Slide "Memory Deduplication as a Threat to the Guest OS" by Kuniyasu Suzaki

Windows memory manager internals
Windows memory manager internalsWindows memory manager internals
Windows memory manager internalsSisimon Soman
 
Malware analysis
Malware analysisMalware analysis
Malware analysisxabean
 
31c3 Presentation - Virtual Machine Introspection
31c3 Presentation - Virtual Machine Introspection31c3 Presentation - Virtual Machine Introspection
31c3 Presentation - Virtual Machine IntrospectionTamas K Lengyel
 
EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...
EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...
EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...Kuniyasu Suzaki
 
Jug Lugano - Scale over the limits
Jug Lugano - Scale over the limitsJug Lugano - Scale over the limits
Jug Lugano - Scale over the limitsDavide Carnevali
 
ASPLOS2011 workshop RESoLVE "Effect of Disk Prefetching of Guest OS "
ASPLOS2011 workshop RESoLVE "Effect of Disk Prefetching of Guest OS "ASPLOS2011 workshop RESoLVE "Effect of Disk Prefetching of Guest OS "
ASPLOS2011 workshop RESoLVE "Effect of Disk Prefetching of Guest OS "Kuniyasu Suzaki
 
vmfs intro
vmfs introvmfs intro
vmfs introbergwolf
 
My sql with enterprise storage
My sql with enterprise storageMy sql with enterprise storage
My sql with enterprise storageCaroline_Rose
 
Rootless Containers
Rootless ContainersRootless Containers
Rootless ContainersAkihiro Suda
 
Windsor: Domain 0 Disaggregation for XenServer and XCP
	Windsor: Domain 0 Disaggregation for XenServer and XCP	Windsor: Domain 0 Disaggregation for XenServer and XCP
Windsor: Domain 0 Disaggregation for XenServer and XCPThe Linux Foundation
 
Database backed coherence cache
Database backed coherence cacheDatabase backed coherence cache
Database backed coherence cachearagozin
 
Unraveling Docker Security: Lessons From a Production Cloud
Unraveling Docker Security: Lessons From a Production CloudUnraveling Docker Security: Lessons From a Production Cloud
Unraveling Docker Security: Lessons From a Production CloudSalman Baset
 
Tokyo OpenStack Summit 2015: Unraveling Docker Security
Tokyo OpenStack Summit 2015: Unraveling Docker SecurityTokyo OpenStack Summit 2015: Unraveling Docker Security
Tokyo OpenStack Summit 2015: Unraveling Docker SecurityPhil Estes
 
Lions, Tigers and Deers: What building zoos can teach us about securing micro...
Lions, Tigers and Deers: What building zoos can teach us about securing micro...Lions, Tigers and Deers: What building zoos can teach us about securing micro...
Lions, Tigers and Deers: What building zoos can teach us about securing micro...Sysdig
 
Dynamic Languages in Production: Progress and Open Challenges
Dynamic Languages in Production: Progress and Open ChallengesDynamic Languages in Production: Progress and Open Challenges
Dynamic Languages in Production: Progress and Open Challengesbcantrill
 
Implements BIOS emulation support for BHyVe
Implements BIOS emulation support for BHyVeImplements BIOS emulation support for BHyVe
Implements BIOS emulation support for BHyVeTakuya ASADA
 
Kernel Mode Threats and Practical Defenses
Kernel Mode Threats and Practical DefensesKernel Mode Threats and Practical Defenses
Kernel Mode Threats and Practical DefensesPriyanka Aash
 
Collaborate vdb performance
Collaborate vdb performanceCollaborate vdb performance
Collaborate vdb performanceKyle Hailey
 

Similar to EuroSec2011 Slide "Memory Deduplication as a Threat to the Guest OS" by Kuniyasu Suzaki (20)

Hot sec10 slide-suzaki
Hot sec10 slide-suzakiHot sec10 slide-suzaki
Hot sec10 slide-suzaki
 
Windows memory manager internals
Windows memory manager internalsWindows memory manager internals
Windows memory manager internals
 
Malware analysis
Malware analysisMalware analysis
Malware analysis
 
31c3 Presentation - Virtual Machine Introspection
31c3 Presentation - Virtual Machine Introspection31c3 Presentation - Virtual Machine Introspection
31c3 Presentation - Virtual Machine Introspection
 
EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...
EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...
EuroSec2012 "Effects of Memory Randomization, Sanitization and Page Cache on ...
 
Jug Lugano - Scale over the limits
Jug Lugano - Scale over the limitsJug Lugano - Scale over the limits
Jug Lugano - Scale over the limits
 
Chen Haibo
Chen HaiboChen Haibo
Chen Haibo
 
ASPLOS2011 workshop RESoLVE "Effect of Disk Prefetching of Guest OS "
ASPLOS2011 workshop RESoLVE "Effect of Disk Prefetching of Guest OS "ASPLOS2011 workshop RESoLVE "Effect of Disk Prefetching of Guest OS "
ASPLOS2011 workshop RESoLVE "Effect of Disk Prefetching of Guest OS "
 
vmfs intro
vmfs introvmfs intro
vmfs intro
 
My sql with enterprise storage
My sql with enterprise storageMy sql with enterprise storage
My sql with enterprise storage
 
Rootless Containers
Rootless ContainersRootless Containers
Rootless Containers
 
Windsor: Domain 0 Disaggregation for XenServer and XCP
	Windsor: Domain 0 Disaggregation for XenServer and XCP	Windsor: Domain 0 Disaggregation for XenServer and XCP
Windsor: Domain 0 Disaggregation for XenServer and XCP
 
Database backed coherence cache
Database backed coherence cacheDatabase backed coherence cache
Database backed coherence cache
 
Unraveling Docker Security: Lessons From a Production Cloud
Unraveling Docker Security: Lessons From a Production CloudUnraveling Docker Security: Lessons From a Production Cloud
Unraveling Docker Security: Lessons From a Production Cloud
 
Tokyo OpenStack Summit 2015: Unraveling Docker Security
Tokyo OpenStack Summit 2015: Unraveling Docker SecurityTokyo OpenStack Summit 2015: Unraveling Docker Security
Tokyo OpenStack Summit 2015: Unraveling Docker Security
 
Lions, Tigers and Deers: What building zoos can teach us about securing micro...
Lions, Tigers and Deers: What building zoos can teach us about securing micro...Lions, Tigers and Deers: What building zoos can teach us about securing micro...
Lions, Tigers and Deers: What building zoos can teach us about securing micro...
 
Dynamic Languages in Production: Progress and Open Challenges
Dynamic Languages in Production: Progress and Open ChallengesDynamic Languages in Production: Progress and Open Challenges
Dynamic Languages in Production: Progress and Open Challenges
 
Implements BIOS emulation support for BHyVe
Implements BIOS emulation support for BHyVeImplements BIOS emulation support for BHyVe
Implements BIOS emulation support for BHyVe
 
Kernel Mode Threats and Practical Defenses
Kernel Mode Threats and Practical DefensesKernel Mode Threats and Practical Defenses
Kernel Mode Threats and Practical Defenses
 
Collaborate vdb performance
Collaborate vdb performanceCollaborate vdb performance
Collaborate vdb performance
 

More from Kuniyasu Suzaki

RISC-Vのセキュリティ技術(TEE, Root of Trust, Remote Attestation)
RISC-Vのセキュリティ技術(TEE, Root of Trust, Remote Attestation)RISC-Vのセキュリティ技術(TEE, Root of Trust, Remote Attestation)
RISC-Vのセキュリティ技術(TEE, Root of Trust, Remote Attestation)Kuniyasu Suzaki
 
遠隔デバイスとの信頼を築くための技術とその標準(TEEP RATS)
遠隔デバイスとの信頼を築くための技術とその標準(TEEP RATS)遠隔デバイスとの信頼を築くための技術とその標準(TEEP RATS)
遠隔デバイスとの信頼を築くための技術とその標準(TEEP RATS)Kuniyasu Suzaki
 
IETF111 RATS: Remote Attestation ProcedureS 報告
IETF111 RATS: Remote Attestation ProcedureS 報告IETF111 RATS: Remote Attestation ProcedureS 報告
IETF111 RATS: Remote Attestation ProcedureS 報告Kuniyasu Suzaki
 
Slide presented at FIT 2021 Top Conference (Reboot Oriented IoT, ACSAC2021)
Slide presented at FIT 2021 Top Conference  (Reboot Oriented IoT, ACSAC2021)Slide presented at FIT 2021 Top Conference  (Reboot Oriented IoT, ACSAC2021)
Slide presented at FIT 2021 Top Conference (Reboot Oriented IoT, ACSAC2021)Kuniyasu Suzaki
 
ACSAC2020 "Return-Oriented IoT" by Kuniyasu Suzaki
ACSAC2020 "Return-Oriented IoT" by Kuniyasu SuzakiACSAC2020 "Return-Oriented IoT" by Kuniyasu Suzaki
ACSAC2020 "Return-Oriented IoT" by Kuniyasu SuzakiKuniyasu Suzaki
 
TEE (Trusted Execution Environment)は第二の仮想化技術になるか?
TEE (Trusted Execution Environment)は第二の仮想化技術になるか?TEE (Trusted Execution Environment)は第二の仮想化技術になるか?
TEE (Trusted Execution Environment)は第二の仮想化技術になるか?Kuniyasu Suzaki
 
3種類のTEE比較(Intel SGX, ARM TrustZone, RISC-V Keystone)
3種類のTEE比較(Intel SGX, ARM TrustZone, RISC-V Keystone)3種類のTEE比較(Intel SGX, ARM TrustZone, RISC-V Keystone)
3種類のTEE比較(Intel SGX, ARM TrustZone, RISC-V Keystone)Kuniyasu Suzaki
 
Hardware-assisted Isolated Execution Environment to run trusted OS and applic...
Hardware-assisted Isolated Execution Environment to run trusted OS and applic...Hardware-assisted Isolated Execution Environment to run trusted OS and applic...
Hardware-assisted Isolated Execution Environment to run trusted OS and applic...Kuniyasu Suzaki
 
RISC-V-Day-Tokyo2018-suzaki
RISC-V-Day-Tokyo2018-suzakiRISC-V-Day-Tokyo2018-suzaki
RISC-V-Day-Tokyo2018-suzakiKuniyasu Suzaki
 
BMC: Bare Metal Container @Open Source Summit Japan 2017
BMC: Bare Metal Container @Open Source Summit Japan 2017BMC: Bare Metal Container @Open Source Summit Japan 2017
BMC: Bare Metal Container @Open Source Summit Japan 2017Kuniyasu Suzaki
 
USENIX NSDI17 Memory Disaggregation
USENIX NSDI17 Memory DisaggregationUSENIX NSDI17 Memory Disaggregation
USENIX NSDI17 Memory DisaggregationKuniyasu Suzaki
 
Io t security-suzki-20170224
Io t security-suzki-20170224Io t security-suzki-20170224
Io t security-suzki-20170224Kuniyasu Suzaki
 
”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016Kuniyasu Suzaki
 
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...Kuniyasu Suzaki
 
Report for S4x14 (SCADA Security Scientific Symposium 2014)
Report for S4x14 (SCADA Security Scientific Symposium 2014)Report for S4x14 (SCADA Security Scientific Symposium 2014)
Report for S4x14 (SCADA Security Scientific Symposium 2014)Kuniyasu Suzaki
 
Slide used at ACM-SAC 2014 by Suzaki
Slide used at ACM-SAC 2014 by SuzakiSlide used at ACM-SAC 2014 by Suzaki
Slide used at ACM-SAC 2014 by SuzakiKuniyasu Suzaki
 
OSセキュリティチュートリアル
OSセキュリティチュートリアルOSセキュリティチュートリアル
OSセキュリティチュートリアルKuniyasu Suzaki
 
Nested Virtual Machines and Proxies
Nested Virtual Machines and Proxies Nested Virtual Machines and Proxies
Nested Virtual Machines and Proxies Kuniyasu Suzaki
 
Bitvisorをベースとした既存Windowsのドライバメモリ保護
Bitvisorをベースとした既存Windowsのドライバメモリ保護Bitvisorをベースとした既存Windowsのドライバメモリ保護
Bitvisorをベースとした既存Windowsのドライバメモリ保護Kuniyasu Suzaki
 
Security on cloud storage and IaaS (NSC: Taiwan - JST: Japan workshop)
Security on cloud storage and IaaS (NSC: Taiwan - JST: Japan workshop)Security on cloud storage and IaaS (NSC: Taiwan - JST: Japan workshop)
Security on cloud storage and IaaS (NSC: Taiwan - JST: Japan workshop)Kuniyasu Suzaki
 

More from Kuniyasu Suzaki (20)

RISC-Vのセキュリティ技術(TEE, Root of Trust, Remote Attestation)
RISC-Vのセキュリティ技術(TEE, Root of Trust, Remote Attestation)RISC-Vのセキュリティ技術(TEE, Root of Trust, Remote Attestation)
RISC-Vのセキュリティ技術(TEE, Root of Trust, Remote Attestation)
 
遠隔デバイスとの信頼を築くための技術とその標準(TEEP RATS)
遠隔デバイスとの信頼を築くための技術とその標準(TEEP RATS)遠隔デバイスとの信頼を築くための技術とその標準(TEEP RATS)
遠隔デバイスとの信頼を築くための技術とその標準(TEEP RATS)
 
IETF111 RATS: Remote Attestation ProcedureS 報告
IETF111 RATS: Remote Attestation ProcedureS 報告IETF111 RATS: Remote Attestation ProcedureS 報告
IETF111 RATS: Remote Attestation ProcedureS 報告
 
Slide presented at FIT 2021 Top Conference (Reboot Oriented IoT, ACSAC2021)
Slide presented at FIT 2021 Top Conference  (Reboot Oriented IoT, ACSAC2021)Slide presented at FIT 2021 Top Conference  (Reboot Oriented IoT, ACSAC2021)
Slide presented at FIT 2021 Top Conference (Reboot Oriented IoT, ACSAC2021)
 
ACSAC2020 "Return-Oriented IoT" by Kuniyasu Suzaki
ACSAC2020 "Return-Oriented IoT" by Kuniyasu SuzakiACSAC2020 "Return-Oriented IoT" by Kuniyasu Suzaki
ACSAC2020 "Return-Oriented IoT" by Kuniyasu Suzaki
 
TEE (Trusted Execution Environment)は第二の仮想化技術になるか?
TEE (Trusted Execution Environment)は第二の仮想化技術になるか?TEE (Trusted Execution Environment)は第二の仮想化技術になるか?
TEE (Trusted Execution Environment)は第二の仮想化技術になるか?
 
3種類のTEE比較(Intel SGX, ARM TrustZone, RISC-V Keystone)
3種類のTEE比較(Intel SGX, ARM TrustZone, RISC-V Keystone)3種類のTEE比較(Intel SGX, ARM TrustZone, RISC-V Keystone)
3種類のTEE比較(Intel SGX, ARM TrustZone, RISC-V Keystone)
 
Hardware-assisted Isolated Execution Environment to run trusted OS and applic...
Hardware-assisted Isolated Execution Environment to run trusted OS and applic...Hardware-assisted Isolated Execution Environment to run trusted OS and applic...
Hardware-assisted Isolated Execution Environment to run trusted OS and applic...
 
RISC-V-Day-Tokyo2018-suzaki
RISC-V-Day-Tokyo2018-suzakiRISC-V-Day-Tokyo2018-suzaki
RISC-V-Day-Tokyo2018-suzaki
 
BMC: Bare Metal Container @Open Source Summit Japan 2017
BMC: Bare Metal Container @Open Source Summit Japan 2017BMC: Bare Metal Container @Open Source Summit Japan 2017
BMC: Bare Metal Container @Open Source Summit Japan 2017
 
USENIX NSDI17 Memory Disaggregation
USENIX NSDI17 Memory DisaggregationUSENIX NSDI17 Memory Disaggregation
USENIX NSDI17 Memory Disaggregation
 
Io t security-suzki-20170224
Io t security-suzki-20170224Io t security-suzki-20170224
Io t security-suzki-20170224
 
”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016
 
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
 
Report for S4x14 (SCADA Security Scientific Symposium 2014)
Report for S4x14 (SCADA Security Scientific Symposium 2014)Report for S4x14 (SCADA Security Scientific Symposium 2014)
Report for S4x14 (SCADA Security Scientific Symposium 2014)
 
Slide used at ACM-SAC 2014 by Suzaki
Slide used at ACM-SAC 2014 by SuzakiSlide used at ACM-SAC 2014 by Suzaki
Slide used at ACM-SAC 2014 by Suzaki
 
OSセキュリティチュートリアル
OSセキュリティチュートリアルOSセキュリティチュートリアル
OSセキュリティチュートリアル
 
Nested Virtual Machines and Proxies
Nested Virtual Machines and Proxies Nested Virtual Machines and Proxies
Nested Virtual Machines and Proxies
 
Bitvisorをベースとした既存Windowsのドライバメモリ保護
Bitvisorをベースとした既存Windowsのドライバメモリ保護Bitvisorをベースとした既存Windowsのドライバメモリ保護
Bitvisorをベースとした既存Windowsのドライバメモリ保護
 
Security on cloud storage and IaaS (NSC: Taiwan - JST: Japan workshop)
Security on cloud storage and IaaS (NSC: Taiwan - JST: Japan workshop)Security on cloud storage and IaaS (NSC: Taiwan - JST: Japan workshop)
Security on cloud storage and IaaS (NSC: Taiwan - JST: Japan workshop)
 

Recently uploaded

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 

Recently uploaded (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 

EuroSec2011 Slide "Memory Deduplication as a Threat to the Guest OS" by Kuniyasu Suzaki

  • 1. Memory Deduplication as a Threat to the Guest OS Kuniyasu Suzaki, Kengo Iijima, Toshiki Yagi, Cyrille Artho Research Center for Information Security EuroSec 2011 at Salzburg, April 10
  • 2. Background 1/2 • IaaS (Infrastructure as a Service) type cloud computing hosts many virtual machines. – Examples: Amazon EC2, Rackspace, ... – Physical resources (Memory/Storage) are very important. • Image of guest OS are provided by IaaS venders. – Most contents are same. • Deduplication technique is utilized to share same contents and reduces consumption of physical resources.
  • 3. Background 2/2 • Unfortunately memory deduplication has access time difference between non-deduplicated pages and deduplicated pages, caused by Copy-On-Write. • Attacker can use this phenomena for memory disclosure attack . • Our paper presents real attack to a Guest OS (Windows and Linux).
  • 4. Contents 1) Background 2) Memory deduplication 3) Memory disclosure attack 4) Experiments 5) Discussion and Conclusion
  • 5. Memory Deduplication 1/2 • Memory deduplication is a technique to share same contents page. – Mainly used for virtual machines. – Very effective when same guest OS runs on several virtual machines. • Many virtual machine monitors include deduplication • Implementations may differ Guest Pseudo Memory VM1 VM2 VM(n) Real Physical Memory
  • 6. Memory Deduplication 2/2 • Content-aware deduplication – Transparent Page Sharing on Disco [OSDI97] – Satori on Xen[USENIX09] • Periodical memory-scan dedpulication – Content-Based Page Sharing on VMWare ESX [SOSP02] – Differential Engine on Xen[OSDI08] – KSM (Kernel Samepage Merging) [LinuxSymp09] • General-purpose memory deduplication for Linux. • Used mainly for KVM. • Our paper uses KSM with KVM virtual machine.
  • 7. KSM: Kernel Samepage Merging • KSM has 3 states for pages. – Volatile : contents change frequently (not to be candidate) – Unshared: candidate pages for deduplication – Shared: deduplicated pages • Pages are scanned (default: 20msec) – All pages are not scanned at a time. – The maximum is 25% of the available memory. – The time to be deduplicated depends on the situation. • Write accesses to deduplicated pages are managed by Copy-On-Write.
  • 8. Copy-On-Write (COW) • When a write access is issued to a deduplicated page, a fresh copy is created, which accepts write access. • Write access time difference between deduplicateted and non-deduplicated pages due to copying. • A kind of Covert Channel of COW Guest Pseudo Memory VM1 VM2 Write Access VM1 VM2 (victim) (attacker) (victim) (attacker) Real Physical Memory Re-created page cases access time difference
  • 9. Memory Disclosure Attack • Attacker can use write access time difference to guess memory contents on a victim’s VM. Basic idea for memory disclosure attack • Allocate same contents pages on memory of attacker’s VM. • Wait to be deduplicaed • Issue write access to the pages. When the pages are deduplicated, the write access time is longer than normal. • Used to detect a process or an open file on victim’s VM
  • 10. Implementation detail 1/2 (1) Get memory image of victim VM – To detect a process • An executable binary file is used, because a loader (ex. ld- linux.so) loads most parts of binary file without change. • The last page which is less than 4KB is not target of matching, because the tail of 4KB may include arbitrary contents on the memory. – To detect an opened file • Normal file is used. It is saved in page cache without change.
  • 11. Implementation detail 2/2 (2) Compare time difference • Write one byte on each target page and measure the access time. • Compare the time with the access time measured already – zero-cleared (dedupicated) and random data (non-deduplicated). • Length of waiting time – Depends on size of memory for memory scan type.
  • 12. Problems on implementation • Memory disclosure attack for memory deduplication looks simple, but there are some problems. – 4KB Alignment problem • Caused by memory allocation strategy – Self-reflection problem • Caused by memory management on cache and heap – Run time modification problem • Caused by ASLR, swap-out, etc
  • 13. 4KB alignment problem • On victim’s VM – A binary file is loaded with 4KB alignment. – Opened file is cached with 4KB alignment. • On Attacker’s VM – Attacker loads the matching contents on his heap memory. – The contents MUST be loaded on 4KB alignment. • Attacker can use posix_memalign() to get aligned memory region.
  • 14. Self-reflection problem 1/2 • Contents of opened file by attacker’s program are stored on page cache memory by Linux kernel. • Attacker loads the matching contents on his heap memory. • The heap memory contents is deduplicated to the page cache memory contents on a VM! [self-reflection problem] attacker’s program memory on attacker’s VM matching Un-control by target file … attacker’s program page open(); cache Contents stored … on page cache posix_memalign(); read(); heap Same contents Contents stored … on heap memory are deduplicated on self memory gettimeofday(); # write data to heap access time is delayed with gettimeofday(); self memory deduplication
  • 15. Self-reflection problem 2/2 • Image on heap and page cache must be different. • We gzipped the target file and expand it at run time. – The contents on page cache is gzipped image. attacker’s program memory on attacker’s VM matching target Un-control by file with gziped … attacker’s program page gzopen(); cache Contents stored … on page cache posix_memalign(); different contents gzread(); heap Contents stored … on heap memory gettimeofday(); Deduplicated with # write data to heap memory on other VM gettimeofday();
  • 16. Run time modification problem • Some parts of code are modified at run time, and cause – False-negative • ASLR (Address Space Layout Randomization) – Modern kernel has this security function. (after Linux2.6.12, after Windows VISTA) – Most text parts are not changed. Even if the pages are scattered, the unit is 4KB. The memory disclosure attack does not care ASLR. • Swap-out • Self modification code – Not used by normal applications. – False-positive • Pre-load mechanism • Common 4KB Code
  • 17. Summary of memory disclosure attack • The memory disclosure attack is 4KB aligned exact matching. • Limitation – Attacker can know • existence of process. • opened or downloaded file. – Attacker doesn’t know • termination of process because of un-cleared page cache. • which virtual machine has the contents. – Noises cause false-negative and false-positive. • Include timing of deduplication
  • 18. Experiments • The memory disclosure attack runs on KSM with KVM(0.12.4). The host linux kernel is 2.6.33.5. • Victim’s VM – Guest OS: Debian GNU Linux and WindowsXP – Target applications • apache2 and sshd on Debian GNU Linux • Internet Explore6 and FireFox on WindowsXP • Attacker’s VM – Guest OS: Debian GNU Linux – Assume to know invocation of application – Wait 5 minutes after target application is invoked
  • 19. Attack for Apache2 and sshd on Linux Average (us) zero Random Apache2 Apache2 ELF file 365,308B (89*4KB) Before invocation 6.45 0.37 0.53 After invocation 6.24 0.40 7.56 Before invocation After invocation Average (us) zero random sshd sshd ELF file 438,852B (107*4KB) Before invocation 6.60 0.55 0.45 After invocation 6.51 0.42 7.50 Non-deduplicated Timimng? swap-out? Code modification? Before invocation After invocation
  • 20. Attack for Firefox and IE6 on WindowsXP Average (us) zero random Firefox Firefox binary file 912,334B (222*4KB) Before invocation 6.45 0.43 1.92 After invocation 6.49 0.37 7.68 Deduplicated Common 4KB Code? Pre-load? Before invocation After invocation Average (us) zero random IE6 Before invocation 6.59 0.27 5.68 IE6 binary file 93,184B (22*4KB) After invocation 6.32 0.68 7.00 IE6 has special optimization? Before invocation After invocation
  • 21. Detect downloaded file • The memory disclosure attack can also be applied to find an opened file on a victim’s VM. • We confirm that the “Google logo” file can be detected if page caching is enabled on Firefox. • This disclosure attack is dangerous, because it detects a view of Home Page, even if the network is encrypted by TLS/SSL.
  • 22. Countermeasure • Satori[USENIX ATC’09] has a mechanism to refuse memory deduplication for each page. – Applications have to control its memory. • Overshadow [ASPLOS’08] and SP3 [Vee’08] encrypt memory. – Unfortunately it ruins effect of memory deduplication. • We plan to develop memory deduplication for read-only pages. – It requires to monitor page table of Guest OS.
  • 23. Discussion • Security function (memory sanitization) on Guest OS helps the memory disclosure attack – Because it tells termination of process. • The memory disclosure attack can be used for security education. – Detect hidden process. – Data life time is longer than we expect [USENIX Security’05 and ATC’06]. • The memory disclosure attack does not violate any SLA on cloud computing. It just measure access time.
  • 24. Related Work • Cross VM Side Channel Attack, “Hey, you, get off of my cloud” [CCS’09] – Monitor the behavior of a physically shared cache of multi- cores (hyper threads) • Cold-boot attack [USENIX Security’08] – a kind of physical side channel attack, which freezes physical memory and scans the data.
  • 25. Conclusion • We presented memory disclose attack on memory deduplication which use write access time difference on Copy-On-Write. • Experiments detected – Existence of apache2 and sshd on Linux, – IE6 and Firefox on WindowsXP, – downloaded file in the Firefox browser. • Countermeasures and applicable usage are mentioned.