How Open Source Project Xen Puts Security Ahead of Emerging Threats

Slides:



Advertisements
Similar presentations
Secure In-VM Monitoring Using Hardware Virtualization Monirul Sharif, Wenke Lee, Weidong Cui, and Andrea Lanzi Presented by Tyler Bletsch.
Advertisements

Ensuring Operating System Kernel Integrity with OSck By Owen S. Hofmann Alan M. Dunn Sangman Kim Indrajit Roy Emmett Witchel Kent State University College.
By Hiranmayi Pai Neeraj Jain
Bart Miller. Outline Definition and goals Paravirtualization System Architecture The Virtual Machine Interface Memory Management CPU Device I/O Network,
Building Your Own Firewall Chapter 10. Learning Objectives List and define the two categories of firewalls Explain why desktop firewalls are used Explain.
OS Spring’03 Introduction Operating Systems Spring 2003.
Virtual Machine Monitors CSE451 Andrew Whitaker. Hardware Virtualization Running multiple operating systems on a single physical machine Examples:  VMWare,
Tanenbaum 8.3 See references
Real Security for Server Virtualization Rajiv Motwani 2 nd October 2010.
SymCall: Symbiotic Virtualization Through VMM-to-Guest Upcalls John R. Lange and Peter Dinda University of Pittsburgh (CS) Northwestern University (EECS)
Protection and the Kernel: Mode, Space, and Context.
1 UCR Firmware Attacks and Security introduction.
Module 7: Hyper-V. Module Overview List the new features of Hyper-V Configure Hyper-V virtual machines.
Code Injection From the Hypervisor: Removing the need for in-guest agents Matt Conover Principal Software Engineer Core Research Group, Symantec Research.
Virtual Machine Security Systems Presented by Long Song 08/01/2013 Xin Zhao, Kevin Borders, Atul Prakash.
Mitigation of Buffer Overflow Attacks
Week 10-11c Attacks and Malware III. Remote Control Facility distinguishes a bot from a worm distinguishes a bot from a worm worm propagates itself and.
Presented by: Reem Alshahrani. Outlines What is Virtualization Virtual environment components Advantages Security Challenges in virtualized environments.
Operating Systems Security
Wireless and Mobile Security
security breakthrough INTRODUCING hypervisor memory introspection
Full and Para Virtualization
Dilip Dwarakanath.  The topic I’m about to present was taken from a paper titled “Apple iOS 4 Security Evaluation” written by Dino A Dai Zovi.  Dino.
Enforcing Executing-Implies-Verified with the Integrity-Aware Processor Michael LeMay Carl A. Gunter University of Illinois at Urbana-Champaign Modified.
Privilege Escalation Two case studies. Privilege Escalation To better understand how privilege escalation can work, we will look at two relatively recent.
Protection of Processes Security and privacy of data is challenging currently. Protecting information – Not limited to hardware. – Depends on innovation.
CSE 451: Operating Systems Winter 2015 Module 25 Virtual Machine Monitors Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
Lecture 5 Rootkits Hoglund/Butler (Chapters 1-3).
Computer Security: Chapter 5 Operating Systems Security.
Constraint Framework, page 1 Collaborative learning for security and repair in application communities MIT site visit April 10, 2007 Constraints approach.
Common System Exploits Tom Chothia Computer Security, Lecture 17.
Microsoft OS Vulnerabilities April 1, 2010 MIS 4600 – MBA © Abdou Illia.
Introduction to Operating Systems Concepts
WannaCrypt Ransomeware Customer Guidance
WannaCry/WannaCrypt Ransomware
WannaCry/WannaCrypt Ransomware
Secure Coding Techniques
Buffer Overflows Incomplete Access Control
Mitigation against Buffer Overflow Attacks
Virtual Machine Monitors
Ilija Jovičić Sophos Consultant.
Protecting Memory What is there to protect in memory?
Chapter 2: Computer-System Structures(Hardware)
Protection Against Rootkits “Defense In Depth”
Protecting Memory What is there to protect in memory?
Protecting Memory What is there to protect in memory?
Windows API.
Exam Review.
CS490 Windows Internals Quiz 2 09/27/2013.
Modularity and Memory Clearly, programs must have access to memory
Morgan Kaufmann Publishers
Virtualization & Security real solutions
OS Virtualization.
Computer-System Architecture
Lecture Topics: 11/1 General Operating System Concepts Processes
What’s new in the Fall Creators Update for Windows Defender ATP
Architectural Support for OS
Operating System Security
Windows Virtual PC / Hyper-V
Sai Krishna Deepak Maram, CS 6410
Reverse engineering through full system simulations
Intel Active Management Technology
Shielding applications from an untrusted cloud with Haven
Outline Operating System Organization Operating System Examples
Architectural Support for OS
Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures
Preventing Privilege Escalation
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
System Virtualization
Presentation transcript:

How Open Source Project Xen Puts Security Ahead of Emerging Threats Mihai Donțu, Bitdefender Andrei Florescu, Bitdefender

In An Ideal World…

OSes would be designed differently Humans would not code

… In The Real World

OSes are flawed by design Humans (still) code

Perfect St[w]orms “Wormable” Vulnerability in widely-used services or protocols Vulnerability remotely exploitable “Wormable” Vulnerable service exposed to the outside world Both Servers and Workstations vulnerable Vulnerability affects OS Kernel

Some Examples?

MS08-067 – MS NetAPI32 Vulnerability Out-of-band patch released Infected >9mil systems including: defense, gov, commercial Vulnerability present and exploitable 09/25/2008 11/2008 1 AD… 1/2009 10/23/2008 MS caught wind of 0-day through WER* Conficker/Downadup worm released in the wild * https://blogs.technet.microsoft.com/johnla/2015/09/26/the-inside-story-behind-ms08-067/

… 9 years later

MS17-010 – MS SMB v1 Vulnerability (EternalBlue) Some bad people released a public exploit - EternalBlue NotPetya (or something) released Vulnerability present and exploitable 5/12/2017 3/14/2017 1 AD… 4/14/2017 6/27/2017 MS released patch (on a Tuesday) WannaCry Released in the wild. Over 300k systems infected in 3 days. *https://businessinsights.bitdefender.com/hypervisor-introspection-defeated-enternalblue-a-priori

So What Really Changed?

Vulns & Exploit Branding! Endpoint Detection and Response (EDR) In Reality… Next-Gen Stuff Vulns & Exploit Branding! DEP Threat-hunting OS-based Exploit Mitigation Endpoint Detection and Response (EDR) ASLR In-Guest Security Tools SafeSEH SEHOP Sandboxing ? Incident Response

? Back To The Ideal World… Vulns & Exploit Branding! Generic Exploit Prevention Isolated From Attackable Surface OS-based Exploit Mitigation No Prior Knowledge Required In-Guest Security Tools Real-Time Alerts ? Forensics Details Provided

HVI Demo: Defeating EternalBlue

Open Source Collaboration

Project History 2003 First notable academic research (by Garfinkel & Rosenblum) 2008 First proof of concept on Xen (Ether) 2010 Started working on a VMI-based security technology using a custom hypervisor 2012 First proof of concept with Xen 2014 Started working with the Xen Project community on improving and extending Xen’s VMI features 2014 Intel announced the first CPU features aimed at speeding up VMI 2016 First beta for Bitdefender’s HVI technology 2017 First commercial release with Citrix XenServer 7.0 (Xen 4.6)

How HVI Works Uses the VMI capabilities of Xen (xen-access, vm-events) Builds a "shadow" state of the OS Enforces certain access restrictions on: Code (kernel or user application) Stack Heap Data Driver Objects (Windows) IDT/GDT etc. Sensitive MSR-s (eg. MSR_LSTAR)

Architecture Overview XenServer Control Domain (dom0) Security Appliance (domU) Memory Introspection Engine Guest Critical Memory Access XenServer Hypervisor Direct Inspect APIs Networking Storage Compute

A Closer Look: EternalBlue

MS17-010: The Vulnerability Integer Overflow DWORD subtracted into a WORD Buffer Overflow memove operation in srv!SrvOs2FeaToNt Arbitrary write-what-where primitive (Classic heap spraying & grooming to gain RCE) RIP is hijacked in srvnet!SrvNetWskReceiveComplete

MS17-010 : Exploiting The Vulnerability The exploit is using MDL (Memory Descriptor Lists) to control the source & destination of arbitrary writes ASLR is bypassed by using hard-coded memory regions HalHeap is located at 0xffffffffffd00000 Fixed in Windows 10 Redstone 1 (april 2017) Page-Table addresses are also “hard-coded” Self mapped at entry 0x1ed Fixed in Windows 10 Anniversary Update (august 2016) DEP is disabled on the HalHeap region by directly editing the page-tables The payload is placed inside the HalHeap The handler for the connection-close is overwritten and offers RCE The shellcode is executed when the connection is closed

MS17-010: The Payload – Stage 1 Trick to determine if the OS is 32 or 64 bit If 32 bit then bail out else continue execution (in this example) 1 2 Read Model Specific Register (MSR) 0xC0000082 – IA32_LSTAR MSR – and save it This MSR contains the kernel address of the SYSCALL handling routine Any SYSCALL made by a user-mode app will end up running the code pointed by IA32_LSTAR Modify IA32_LSTAR MSR so that it points to the main payload inside the HalHeap 3

MS17-010: The Payload – Stage 2 As soon as an application initiates a SYSCALL, the main payload gains code execution It restores the original SYSCALL handler It does whatever the payload was programmed to do This is the main functionality of the exploit 4

MS17-010: The Payload – Stage 3 (The stage 2?3) payload: Iterates all the loaded drivers, searches for the samba drivers Overwrites a SrvTransactionNotImplemented function inside the SrvTransaction2DispatchTable => backdoor Next time someone wants to see if a system ha been compromised, it can simply “knock” and see if DoublePulsar responds

… and HVI Defeats EternalBlue

MS17-010: Preventing Exploitation Trick to determine if the OS is 32 or 64 bit If 32 bit then bail out else continue execution (in this example) 1 2 Read Model Specific Register (MSR) 0xC0000082 – IA32_LSTAR MSR – and save it This MSR contains the kernel address of the SYSCALL handling routine Any SYSCALL made by a user-mode app will end up running the code pointed by IA32_LSTAR The IA32_LSTAR MSR is protected against modifications Although the stage 1 payload may get code execution, it cannot ensure the execution of the main payload; the main payload will never run 3

MS17-010: Preventing Exploitation The samba drivers are protected against modifications and the SrvTransaction2DispatchTable is located inside such a driver (srv.sys) The backdoor cannot be installed on the system … although it never gets to this, because we already blocked it at stage 1 

Future Work Expand the protection over more OS areas (eg. HAL’s heap) Prevent credential theft from Windows LSASS Integrate more hardware features to accelerate VMI (eg. Intel’s #VE) Extract more context out of the guest to improve attack analysis (opened connections, accessed files etc.) Help create an ecosystem for VMI-based security tools to which more organizations can contribute

2 3 1 Conclusions VMI is Changing the Security Industry Commercial Implementations Are Available 1 Open-source Collaboration is Key

Time For Questions!