I/O Attacks in Intel-PC Architectures and Countermeasures



Similar documents
Recon Montreal

Frontiers in Cyber Security: Beyond the OS

Detection of virtual machine monitor corruptions

Firewire-based Physical Security Attacks on Windows 7, EFS and BitLocker

POACHER TURNED GATEKEEPER: LESSONS LEARNED FROM EIGHT YEARS OF BREAKING HYPERVISORS. Rafal Wojtczuk

1. Computer System Structure and Components

Computer Systems Structure Input/Output

USB Device Drivers: A Stepping Stone into your Kernel

Guardian: Hypervisor as Security Foothold for Personal Computers

Attacking Intel Trusted Execution Technology

Attacking Hypervisors via Firmware and Hardware

Security Overview of the Integrity Virtual Machines Architecture

Subverting the Xen hypervisor

UNCLASSIFIED Version 1.0 May 2012

Attacking Hypervisors via Firmware and Hardware

Introducing Ring -3 Rootkits

Virtual Machines. COMP 3361: Operating Systems I Winter

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

Computer Organization & Architecture Lecture #19

Secure Containers. Jan Imagination Technologies HGI Dec, 2014 p1

CSC 2405: Computer Systems II

I/O. Input/Output. Types of devices. Interface. Computer hardware

Broadcom Ethernet Network Controller Enhanced Virtualization Functionality

Chapter 1 Computer System Overview

Intel s Virtualization Extensions (VT-x) So you want to build a hypervisor?

A+ Unit Two: Hardware Basics

Implementation and Implications of a Stealth Hard-Drive Backdoor

Fastboot Techniques for x86 Architectures. Marcus Bortel Field Application Engineer QNX Software Systems

WIND RIVER SECURE ANDROID CAPABILITY

Securing Your Cloud with Xen Project s Advanced Security Features

HP BUSINESS NOTEBOOK PC F10 SETUP OVERVIEW

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

Intel Desktop Board DG965RY

Mac computer configurations & OS X optimizations (Updated: November 2012)

Lesson Objectives. To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization

Detecting the Presence of Virtual Machines Using the Local Data Table

White Paper. Intel Sandy Bridge Brings Many Benefits to the PC/104 Form Factor

Lecture Embedded System Security A. R. Darmstadt, Introduction Mobile Security

Network connectivity controllers

A Survey on Virtual Machine Security

HP Compaq dc7800p Business PC with Intel vpro Processor Technology and Virtual Appliances

Virtualization. P. A. Wilsey. The text highlighted in green in these slides contain external hyperlinks. 1 / 16

Certified Ethical Hacker Exam Version Comparison. Version Comparison

VMWARE Introduction ESX Server Architecture and the design of Virtual Machines

Hypervisors and Virtual Machines

Hardware Based Virtualization Technologies. Elsie Wahlig Platform Software Architect

Automotive Ethernet Security Testing. Alon Regev and Abhijit Lahiri

ReactOS is (not) Windows. Windows internals and why ReactOS couldn t just use a Linux kernel

Penetration Testing Windows Vista TM BitLocker TM

AwardBIOS Setup Utility

Android Security - Common attack vectors

PCI-SIG SR-IOV Primer. An Introduction to SR-IOV Technology Intel LAN Access Division

On the Feasibility of Software Attacks on Commodity Virtual Machine Monitors via Direct Device Assignment

Chapter 5 Cloud Resource Virtualization

Security+ Guide to Network Security Fundamentals, Third Edition. Chapter 2 Systems Threats and Risks

Virtualization System Security

Bluepilling the Xen Hypervisor

The Bus (PCI and PCI-Express)

Security Challenges in Virtualized Environments

SecurIMAG Live computer forensics - Virtual memory acquisition and exploitation on Windows NT6+

IOMMU: A Detailed view

Center of Academic Excellence Cyber Operations Program 2013 Application

SecureSwitch: BIOS-Assisted Isolation and Switch between Trusted and Untrusted Commodity OSes!

A Hypervisor IPS based on Hardware assisted Virtualization Technology

Virtual Switching Without a Hypervisor for a More Secure Cloud

Read this before starting!

MBP_MSTR: Modbus Plus Master 12

Knut Omang Ifi/Oracle 19 Oct, 2015

Collecting Packet Traces at High Speed

Full System Emulation:

COS 318: Operating Systems. I/O Device and Drivers. Input and Output. Definitions and General Method. Revisit Hardware

patriotscada Distributed Firewall for SCADA and Industrial Networks

Operating Systems 4 th Class

BIOS Update Release Notes

CEH Version8 Course Outline

How To Protect A Network From Attack From A Hacker (Hbss)

Compromise-as-a-Service

Computer Setup (F10) Utility Guide HP Compaq dx2200 Microtower Business PC

How To Understand And Understand The Power Of An Ipad Ios 2.5 (Ios 2) (I2) (Ipad 2) And Ipad 2.2 (Ipa) (Io) (Powergen) (Oper

How to Configure Intel Ethernet Converged Network Adapter-Enabled Virtual Functions on VMware* ESXi* 5.1

Putting it on the NIC: A Case Study on application offloading to a Network Interface Card (NIC)

Gigabit Ethernet Design

MONITORING OF TRAFFIC OVER THE VICTIM UNDER TCP SYN FLOOD IN A LAN

Broadcom Ethernet Network Controller Enhanced Virtualization Functionality

Operating Systems (Linux)

POSIX. RTOSes Part I. POSIX Versions. POSIX Versions (2)

Workstation Management

FRONT FLYLEAF PAGE. This page has been intentionally left blank

Concurrent Direct Network Access for Virtual Machine Monitors

BIOS and CMOS. Overview. The Function of BIOS. The Bus

Republic Polytechnic School of Information and Communications Technology C226 Operating System Concepts. Module Curriculum

Design Issues in a Bare PC Web Server

Module I-7410 Advanced Linux FS-11 Part1: Virtualization with KVM

Ways to Use USB in Embedded Systems

Datacenter Operating Systems

Transcription:

I/O Attacks in Intel-PC Architectures and Countermeasures Fernand Lone Sang, Vincent Nicomette and Yves Deswarte Laboratoire d Analyse et d Architecture des Systèmes LAAS-CNRS Toulouse, France July 6, 2011

Context and issues Protecting information systems is difficult: complexity of such systems keeps on increasing attack surface on such systems keeps on expanding Main attack vectors on an information system: 1 execution of some malicious code (malware) by the processor exploitation of a vulnerability buffer overflow, format strings,... system features abuse kernel modules, virtual devices,... 2 misuse of Input/Output mechanisms Direct Memory Access (DMA) interrupt mechanism other I/O mechanisms 2/27

Context and issues Protecting information systems is difficult: complexity of such systems keeps on increasing attack surface on such systems keeps on expanding Main attack vectors on an information system: 1 execution of some malicious code (malware) by the processor exploitation of a vulnerability buffer overflow, format strings,... system features abuse kernel modules, virtual devices,... 2 misuse of Input/Output mechanisms Direct Memory Access (DMA) interrupt mechanism other I/O mechanisms 2/27

I/O attack vectors To perform an I/O attack, an attacker can: use a regular I/O controller abuse the I/O controller s control interface needs to execute some malicious code on the processor needs to get I/O privileges to interact with the I/O controller exploit a vulnerability in the I/O controller s firmware does not need to execute some malicious code on the processor malicious code is executed on the I/O controller s embedded processor enables the attacker to define its own control interface develop a dedicated I/O controller (e.g., using FPGA) use an attacker-defined control interface provides more flexibility to the attacker developed generally for specific purposes 3/27

I/O-based attacks tree I/O mechanism Direct Memory Access I/O attacks Interrupts Other I/O mechanisms 4/27

Direct Memory Access mechanism What does Direct Memory Access mechanism stand for? I/O mechanism that enables an I/O controller to perform directly a data transfer to/from the main memory to offload the CPU of these transfers relies on a dedicated DMA engine 5/27

Direct Memory Access mechanism What does Direct Memory Access mechanism stand for? I/O mechanism that enables an I/O controller to perform directly a data transfer to/from the main memory to offload the CPU of these transfers relies on a dedicated DMA engine Examples of I/O controllers using DMA: network controllers (WiFi, Ethernet,... ) e.g., to transfer network frames into/from the main memory disk controllers e.g., to transfer files into/from the main memory graphic controllers e.g., to transfer textures, buffer objects from the main memory 5/27

DMA-based attacks (1/2) PCI Express bus PCI bus other bus Northbridge Processor Core Core Core Core Memory Management Unit FSB bus Memory Controller Hub Main memory Graphic card Kernel Southbridge DMI bus Hard disk drive Disk controller Speakers Audio controller RJ45 cable Ethernet controller PCI Express-PCI bridge FireWire card USB flash drive USB controller Keyboard SuperIO controller DMA attacks aiming at the main memory: attack (confidentiality & integrity) on software components 6/27

DMA-based attacks (1/2) PCI Express bus PCI bus other bus Northbridge Processor Core Core Core Core Memory Management Unit FSB bus Memory Controller Hub Main memory Graphic card Kernel Southbridge DMI bus Hard disk drive Disk controller Speakers Audio controller RJ45 cable Ethernet controller PCI Express-PCI bridge FireWire card USB flash drive USB controller Keyboard SuperIO controller DMA attacks aiming at the main memory: attack (confidentiality & integrity) on software components modifications made in the main memory can be detected Examples: [Dornseif 04, Becher 05, Carrier 04, Nick L. Petroni 04, Maynor 05, Boileau 06, Duflot 07, Duflot 10, Aumaitre 09, Piegdon 07] 6/27

DMA-based attacks (2/2) PCI Express bus PCI bus other bus Northbridge Processor Core Core Core Core Memory Management Unit FSB bus Memory Controller Hub Main memory Graphic card Southbridge DMI bus Hard disk drive Disk controller Speakers Audio controller RJ45 cable Ethernet controller PCI Express-PCI bridge FireWire card USB flash drive USB controller Keyboard SuperIO controller DMA attacks aiming at I/O controllers internal memory: exploit I/O controllers ressources (memory, features,... ) no modifications in the main memory, hard to detect Examples: [Dornseif 04, Triulzi 08, Triulzi 10, Lone Sang 11a] 7/27

I/O-based attacks I/O mechanism Direct Memory Access Attack objective Attack software components confidentiality & integrity Exploit I/O controller's resources (memory, features) I/O attacks Interrupts Other I/O mechanisms 8/27

Interrupt mechanism PCI Express bus PCI bus other bus Graphic card Northbridge Processor Core Core Core Core Memory Management Unit FSB bus Memory Controller Hub 1- Ethernet controller issues an interrupt 2- CPU saves the execution context 3- CPU executes an interrupt service routine 4- CPU restores the saved execution context Main memory Interrupt Service Routine (ISR) Southbridge DMI bus Hard disk drive Disk controller Speakers Audio controller RJ45 cable Ethernet controller PCI Express-PCI bridge FireWire card USB flash drive USB controller Keyboard SuperIO controller What does the interrupt mechanism stand for? enables a controller to signal the CPU a need for attention enables the CPU to avoid wasting cycles to perform polling loops 9/27

Interrupt-based attacks What can attacker do with an interrupt? denial of service attacker makes I/O controllers generate an interrupt storm OS kernel will waste CPU cycles to handle interrupts Example: [Liguori 09] trigger the execution of some malicious code attacker hides some malicious code at the address of an ISR with the cooperation of the processor using DMA attacks attacker makes an I/O controller generate an interrupt Example: [Wojtczuk 11] 10/27

I/O-based attacks tree I/O mechanism Direct Memory Access Attack objective Attack software components confidentiality & integrity Exploit I/O controller's resources (memory, features) I/O attacks Interrupts Operating System Denial of Service (DoS) Trigger the execution of some malicious code Other I/O mechanisms 11/27

I/O-based attacks tree I/O mechanism Direct Memory Access Attack objective Attack software components confidentiality & integrity Exploit I/O controller's resources (memory, features) I/O attacks Interrupts Operating System Denial of Service (DoS) Trigger the execution of some malicious code Other I/O mechanisms Trigger remotely system events (reboot, poweroff,...) 12/27

I/O-based attacks countermeasures I/O mechanism Attack objective Countermeasures Direct Memory Access Attack software components confidentiality & integrity Exploit I/O controller's resources (memory, features) Access Control Services (ACS) I/O attacks Interrupts Operating System Denial of Service (DoS) Trigger the execution of some malicious code Input/Output Memory Management Unit Other I/O mechanisms Trigger remotely system events (reboot, poweroff,...) 13/27

Input/Output Memory Management Unit (1/2) What is an I/O Memory Management Unit (I/O MMU)? component similar to the Memory Management Unit in the CPU virtualizes the main memory filters devices access to it configured through page tables stored in the main memory memory management unit dedicated to I/O controllers 14/27

Input/Output Memory Management Unit (1/2) What is an I/O Memory Management Unit (I/O MMU)? component similar to the Memory Management Unit in the CPU virtualizes the main memory filters devices access to it configured through page tables stored in the main memory memory management unit dedicated to I/O controllers How can an I/O MMU enhance platform security? ensures isolation between I/O controllers memory regions associates a domain and some memory regions to an I/O controller restricts I/O controllers accesses only to their respective domains remaps and filters interrupts 14/27

Input/Output Memory Management Unit (2/2) PCI Express bus PCI bus other bus Northbridge Processor Core Core Core Core Memory Management Unit FSB bus Memory Controller Hub Main memory Graphic card I/O MMU I/O MMU config. Southbridge DMI bus Hard disk drive Disk controller Speakers Audio controller RJ45 cable Ethernet controller PCI Express-PCI bridge FireWire card USB flash drive USB controller Ethernet card Keyboard SuperIO controller FireWire card I/O MMU controls efficiently access to the northbridge 15/27

Input/Output Memory Management Unit (2/2) PCI Express bus PCI bus other bus Northbridge Processor Core Core Core Core Memory Management Unit FSB bus Memory Controller Hub Main memory Graphic card I/O MMU I/O MMU config. Southbridge DMI bus Hard disk drive Disk controller Speakers Audio controller RJ45 cable Ethernet controller PCI Express-PCI bridge FireWire card USB flash drive USB controller Ethernet card Keyboard SuperIO controller FireWire card I/O MMU controls efficiently access to the northbridge I/O MMU has some limitations: I/O controller ID spoofing/sharing [Lone Sang 10] DMA peer-to-peer attacks [Lone Sang 11b] I/O MMU bypass through interrupts [Wojtczuk 11] 15/27

Access Control Services (1/2) PCI Express bus PCI bus other bus Northbridge Processor Core Core Core Core Memory Management Unit FSB bus Memory Controller Hub Main memory Graphic card I/O MMU I/O MMU config. Southbridge DMI bus Hard disk drive Disk controller Speakers Audio controller RJ45 cable Ethernet controller PCI Express-PCI bridge FireWire card USB flash drive USB controller Ethernet card Keyboard SuperIO controller FireWire card How can Access Control Services (ACS) enhance security? enable the OS to configure I/O bridges to perform access control ACS Upstream Forwarding (U) 16/27

Access Control Services (1/2) PCI Express bus PCI bus other bus Northbridge Processor Core Core Core Core Memory Management Unit FSB bus Memory Controller Hub Main memory Graphic card I/O MMU I/O MMU config. Southbridge DMI bus Hard disk drive Disk controller Speakers Audio controller RJ45 cable Ethernet controller PCI Express-PCI bridge FireWire card USB flash drive USB controller Ethernet card Keyboard SuperIO controller FireWire card How can Access Control Services (ACS) enhance security? enable the OS to configure I/O bridges to perform access control ACS Upstream Forwarding (U) ACS P2P Egress Port (E)... 16/27

Access Control Services (2/2) PCI Express bus PCI bus other bus implement ACS do not implement ACS yet Graphic card Hard disk drive Speakers RJ45 cable USB flash drive Keyboard Northbridge Southbridge Disk controller Audio controller Ethernet controller USB controller SuperIO controller Core Core Core Core ACS extensions in current chipsets: Processor Memory Management Unit Memory Controller Hub I/O MMU FSB bus DMI bus PCI Express-PCI bridge Main memory I/O MMU config. FireWire card Ethernet card FireWire card recently implemented in chipsets, precisely in the northbridge by default, not activated and has to be configured manually 17/27

Conclusion (1/2) Physical access and code execution needed Physical access without code execution needed Use a regular I/O controller Misuse of an I/O controller s programming interface [Duflot 07, Gazet 11, Wojtczuk 11] [Dornseif 04, Becher 05, Maynor 05, Boileau 06, Aumaitre 09, Piegdon 07] Exploitation of a vulnerability in an I/O controller s firmware Develop a custom I/O controller Using an attacker-defined programming interface [Boileau 06, Duflot 10] [Devine 09, Aumaitre 10] - [Carrier 04, Nick L. Petroni 04] Remote access - [Duflot 10, Delugré 10] No examples yet to our knowledge 18/27

Conclusion (2/2) I/O mechanism Attack objective Countermeasures Direct Memory Access Attack software components confidentiality & integrity Exploit I/O controller's resources (memory, features) Access Control Services (ACS) I/O attacks Interrupts Operating System Denial of Service (DoS) Trigger the execution of some malicious code Input/Output Memory Management Unit Other I/O mechanisms Trigger remotely system events (reboot, poweroff,...) 19/27

Future work I/O mechanism Attack objective Countermeasures Direct Memory Access Attack software components confidentiality & integrity Exploit I/O controller's resources (memory, features) Access Control Services (ACS) I/O attacks Interrupts Operating System Denial of Service (DoS) Trigger the execution of some malicious code Input/Output Memory Management Unit? Other I/O mechanisms Trigger remotely system events (reboot, poweroff,...)? 20/27

Thank you for your attention... Any questions? 21/27

References Bibliography 1 Damien Aumaitre. A Little Journey Inside Windows Memory. volume 5, pages 105 117. Springer, 2009. Damien Aumaitre & Christophe Devine. Subverting Windows 7 x64 Kernel with DMA attacks. In HITBSecConf 2010 Amsterdam, 29 June - 2 July 2010. Michael Becher, Maximillian Dornseif & Christian N. Klein. FireWire - all your memory are belong to us. In CanSecWest/core05, 4 5 May 2005. Adam Boileau. Hit by a Bus: Physical Access Attacks with FireWire. In RUXCON 2006, October 2006. 22/27

References Bibliography 2 Brian Carrier & Joe Grand. A Hardware-based Memory Acquisition Procedure for Digital Investigations. Digital Investigation, vol. 1, no. 1, pages 50 60, February 2004. Guillaume Delugré. Closer to metal: reverse-engineering the Broadcom NetExtreme s firmware. In Hack.lu, Luxembourg, 27-29, October 2010. Christophe Devine & Guillaume Vissian. Compromission physique par le bus PCI. In Proceedings of the 7th Symposium sur la Sécurité des Technologies de l Information et des Communications (SSTIC 2009), pages 169 193, June 2009. Maximillian Dornseif. 0wned by an ipod - Hacking by Firewire. In PacSec/core04, 11-12 November 2004. 23/27

References Bibliography 3 Loïc Duflot. Contribution à la sécurité des systèmes d exploitation et des microprocesseurs. PhD thesis, Université de Paris XI, October 2007. Loïc Duflot, Yves-Alexis Perez, Guillaume Valadon & Olivier Levillain. Can you still trust your Network Card? In CanSecWest/core10, 24-26 March 2010. Alexandre Gazet. Sticky fingers & KBC Custom Shop. In Proceedings of the 9th Symposium sur la Sécurité des Technologies de l Information et des Communications (SSTIC 2011), pages 175 189, June 2011. Anthony Liguori. Re: A few KVM security questions, 7December 2009. 24/27

References Bibliography 4 Fernand Lone Sang, Eric Lacombe, Vincent Nicomette & Yves Deswarte. Exploiting an I/OMMU Vulnerability. In Proceedings of the 5th IEEE International Conference on Malicious and Unwanted Software (MALWARE), pages 7 14, 19-20 October 2010. Fernand Lone Sang, Vincent Nicomette & Yves Deswarte. Demonstration of a peer-to-peer DMA Attack against the Framebuffer of a Graphic Controller Through FireWire, January 2011. Fernand Lone Sang, Vincent Nicomette, Yves Deswarte & Loïc Duflot. Attaques DMA peer-to-peer et contremesures. In Proceedings of the 9th Symposium sur la Sécurité des Technologies de l Information et des Communications (SSTIC 2011), June 2011. (to be published soon at: http://www.sstic.org/2011/actes/). 25/27

References Bibliography 5 David Maynor. 0wn3d by everything else - USB/PCMCIA Issues. In CanSecWest/core05, 4-5 May 2005. Jr. Nick L. Petroni, Timothy Fraser, Jesus Molina & William A. Arbaugh. Copilot - a Coprocessor-based Kernel Runtime Integrity Monitor. In 13th USENIX Security Symposium, 9-13 August 2004. David R. Piegdon. Hacking in Physically Addressable Memory. In Seminar of Advanced Exploitation Techniques, WS 2006/2007, 12 April 2007. Arrigo Triulzi. Project Maux Mk.II - I 0wn the NIC, Now I want a Shell!. In PacSec/core08, 12-13 November 2008. 26/27

References Bibliography 6 Arrigo Triulzi. The Jedi Packet Trick takes over the Deathstar (or: Taking NIC Backdoors to the Next Level ). In CanSecWest/core10, 24-26 March 2010. Rafal Wojtczuk & Joanna Rutkowska. Following the White Rabbit: Software Attacks against Intel VT-d. Rapport technique, Invisible Things Lab (ITL), May 2011. 27/27