8
CTrust: A framework for Secure and Trustworthy application execution in Cloud computing Satyajeet Nimgaonkar Trusted Secure Systems Lab Computer Science and Engineering University of North Texas [email protected] Srujan Kotikela Trusted Secure Systems Lab Computer Science and Engineering University of North Texas [email protected] Mahadevan Gomathisankaran Trusted Secure Systems Lab Computer Science and Engineering University of North Texas [email protected] Abstract—Cloud computing is a model that envisions ubiq- uitous access to a shared pool of configurable resources such as compute, storage, network, and software. Currently e- commerce, on-line auctioning companies, travel agencies and other such services use clouds, primarily because of the elasticity of cloud resources. While cloud computing allows consolidation of resources, thus enabling new applications, it has several security and privacy concerns. This paper presents the CTrust framework that addresses the security gap in cloud computing by combining the power of virtualization technology with the design of secure processor architectures. The fundamental building block of the CTrust framework is the Secure Hypervisor Framework - SecHYPE. It is a modified hypervisor that incorporates secure processor architectures and provides root of trust to user applications running in the cloud. The paper presents a detailed attack model and prototype implementation of the CTrust framework. Index Terms—cloud computing, virtualization technology, hypervisor & secure processor architectures. I. I NTRODUCTION Cloud computing [22], envisions ubiquitous access to a shared pool of configurable resources such as com- pute, storage, network, and software. In the recent years, cloud computing platforms have procured great success due to its cost effectiveness, flexibility, increased storage, and elasticity. Currently e-commerce, on-line auctioning companies, travel agencies and other such services use clouds to provide services to their users. In-spite of several advantages, the adoption of cloud computing is impeded by critical security issues. The National Institute of Standards and Technology (NIST), has identified security as a primary concern in cloud computing. Security issues in cloud arise at different levels — cloud infrastructure, software service level and user level. Prior research [6], [25] etc. exempli- fies how security vulnerabilities in cloud are exploited by motivated attackers. The security issues in cloud computing can be mitigated by deploying traditional software and hardware security solutions. Software-only solutions like obfuscation, en- cryption and privilege separation etc., incorporate security mechanisms at the application and operating system (OS) level. Thus the root of trust for the entire system is entrusted in the security of the OS. However commodity OS are significantly large with huge code base and are often prone to security vulnerabilities. Thus the security they provide is inadequate. The most common software vulnerability in application code and OS is a Buffer Overflow Vulnerabil- ity [7]. Hardware security mechanisms, on the contrary, include secure processor architectures such as ABYSS [32], AEGIS [27], Arc3D [10], Hide [37], XOM [33] and [23] that deploy hardware mechanisms like memory encryption to provide confidentiality and integrity verification to pre- serve the code and data integrity of the applications. This facilitates the construction of performance efficient and trustworthy secure systems. But they require changes to the micro-architecture of the processor and such changes are extremely time consuming and expensive to test and implement. Cloud computing currently relies heavily on Virtualiza- tion Technology (VT) [29] to virtualize the CPU and stor- age resources so as to meet its elastic demands. VT provides an efficient and cost-effective usage of expensive hardware. It introduces a software abstraction layer or virtualization layer (virtualization software) between the hardware and the OS, thus decoupling them from each other. This software abstraction layer is known as a Virtual Machine Monitor (VMM) [26] or the hypervisor. A VMM/hypervisor allows the user to create multiple virtual machines on a single physical hardware platform, each capable of running an operating system (OS) and its applications. A virtualization software emulates the underlying hardware platform to provide a known interface for the OS and applications to run on. VT provides security by isolating the execution of each OS and its applications in a virtual machine (VM). Thus a security breach in one VM does not affect the working of other VMs. However, isolation security is inadequate to protect an application from a malicious OS or another application running in the same VM. Thus additional security measures have to be incorporated in the virtualization softwares to provide security in cloud computing platforms. The security challenges in cloud computing can be reduced to, how to provide root of trust to the applications in the cloud. VMM can be used as the root of trust. Given the small footprint of the VMM it would be reasonable to verify its correctness, and thus the security of a VMM. The 2012 ASE International Conference on Social Informatics (SocialInformatics 2012) / 2012 ASE International Conference on Cyber Security (CyberSecurity 2012) / 2012 ASE International Conference on BioMedical Computing 978-0-7695-4938-5/12 $26.00 © 2012 IEEE DOI 10.1109/SocialInformatics.2012.91 367 2012 International Conference on Cyber Security 978-0-7695-5014-5/12 $26.00 © 2012 IEEE DOI 10.1109/CyberSecurity.2012.10 24

[IEEE 2012 International Conference on Cyber Security (CyberSecurity) - Alexandria, VA, USA (2012.12.14-2012.12.16)] 2012 International Conference on Cyber Security - CTrust: A Framework

Embed Size (px)

Citation preview

Page 1: [IEEE 2012 International Conference on Cyber Security (CyberSecurity) - Alexandria, VA, USA (2012.12.14-2012.12.16)] 2012 International Conference on Cyber Security - CTrust: A Framework

CTrust: A framework for Secure and Trustworthyapplication execution in Cloud computing

Satyajeet NimgaonkarTrusted Secure Systems Lab

Computer Science and Engineering

University of North Texas

[email protected]

Srujan KotikelaTrusted Secure Systems Lab

Computer Science and Engineering

University of North Texas

[email protected]

Mahadevan GomathisankaranTrusted Secure Systems Lab

Computer Science and Engineering

University of North Texas

[email protected]

Abstract—Cloud computing is a model that envisions ubiq-uitous access to a shared pool of configurable resources suchas compute, storage, network, and software. Currently e-commerce, on-line auctioning companies, travel agencies andother such services use clouds, primarily because of theelasticity of cloud resources. While cloud computing allowsconsolidation of resources, thus enabling new applications, ithas several security and privacy concerns. This paper presentsthe CTrust framework that addresses the security gap incloud computing by combining the power of virtualizationtechnology with the design of secure processor architectures.The fundamental building block of the CTrust framework isthe Secure Hypervisor Framework - SecHYPE. It is a modifiedhypervisor that incorporates secure processor architecturesand provides root of trust to user applications running inthe cloud. The paper presents a detailed attack model andprototype implementation of the CTrust framework.

Index Terms—cloud computing, virtualization technology,hypervisor & secure processor architectures.

I. INTRODUCTION

Cloud computing [22], envisions ubiquitous access to

a shared pool of configurable resources such as com-

pute, storage, network, and software. In the recent years,

cloud computing platforms have procured great success

due to its cost effectiveness, flexibility, increased storage,

and elasticity. Currently e-commerce, on-line auctioning

companies, travel agencies and other such services use

clouds to provide services to their users. In-spite of several

advantages, the adoption of cloud computing is impeded by

critical security issues. The National Institute of Standards

and Technology (NIST), has identified security as a primary

concern in cloud computing. Security issues in cloud arise

at different levels — cloud infrastructure, software service

level and user level. Prior research [6], [25] etc. exempli-

fies how security vulnerabilities in cloud are exploited by

motivated attackers.

The security issues in cloud computing can be mitigated

by deploying traditional software and hardware security

solutions. Software-only solutions like obfuscation, en-

cryption and privilege separation etc., incorporate security

mechanisms at the application and operating system (OS)

level. Thus the root of trust for the entire system is entrusted

in the security of the OS. However commodity OS are

significantly large with huge code base and are often prone

to security vulnerabilities. Thus the security they provide

is inadequate. The most common software vulnerability in

application code and OS is a Buffer Overflow Vulnerabil-

ity [7]. Hardware security mechanisms, on the contrary,

include secure processor architectures such as ABYSS [32],

AEGIS [27], Arc3D [10], Hide [37], XOM [33] and [23]

that deploy hardware mechanisms like memory encryption

to provide confidentiality and integrity verification to pre-

serve the code and data integrity of the applications. This

facilitates the construction of performance efficient and

trustworthy secure systems. But they require changes to

the micro-architecture of the processor and such changes

are extremely time consuming and expensive to test and

implement.

Cloud computing currently relies heavily on Virtualiza-

tion Technology (VT) [29] to virtualize the CPU and stor-

age resources so as to meet its elastic demands. VT provides

an efficient and cost-effective usage of expensive hardware.

It introduces a software abstraction layer or virtualization

layer (virtualization software) between the hardware and the

OS, thus decoupling them from each other. This software

abstraction layer is known as a Virtual Machine Monitor

(VMM) [26] or the hypervisor. A VMM/hypervisor allows

the user to create multiple virtual machines on a single

physical hardware platform, each capable of running an

operating system (OS) and its applications. A virtualization

software emulates the underlying hardware platform to

provide a known interface for the OS and applications to

run on. VT provides security by isolating the execution

of each OS and its applications in a virtual machine

(VM). Thus a security breach in one VM does not affect

the working of other VMs. However, isolation security

is inadequate to protect an application from a malicious

OS or another application running in the same VM. Thus

additional security measures have to be incorporated in

the virtualization softwares to provide security in cloud

computing platforms.

The security challenges in cloud computing can be

reduced to, how to provide root of trust to the applications

in the cloud. VMM can be used as the root of trust. Given

the small footprint of the VMM it would be reasonable to

verify its correctness, and thus the security of a VMM. The

2012 ASE International Conference on Social Informatics (SocialInformatics 2012) / 2012 ASE International Conference on Cyber

Security (CyberSecurity 2012) / 2012 ASE International Conference on BioMedical Computing

978-0-7695-4938-5/12 $26.00 © 2012 IEEE

DOI 10.1109/SocialInformatics.2012.91

367

2012 International Conference on Cyber Security

978-0-7695-5014-5/12 $26.00 © 2012 IEEE

DOI 10.1109/CyberSecurity.2012.10

24

Page 2: [IEEE 2012 International Conference on Cyber Security (CyberSecurity) - Alexandria, VA, USA (2012.12.14-2012.12.16)] 2012 International Conference on Cyber Security - CTrust: A Framework

virtual CPU, memory and storage in a VMM/hypervisor

can be modified to emulate the hardware security archi-

tectures. This is successfully demonstrated in our previous

work [15]. The motivation of this paper, is to extend the

previous work to provide secure execution environments in

cloud computing platforms.

The rest of the paper is organized as follow. Section II

describes the proposed SecHYPE framework followed by

the CTrust architecture. Section III presents the prototype

implementation and the algorithm. Section IV discusses

prior research related to this paper. Finally Section V

presents the conclusion of the paper along with the future

direction of this research.

II. CTRUST AND SECHYPE ARCHITECTURE

The motivation for the proposed CTrust Architecture is

to provide security to the applications running in a cloud

by rooting there trust in the underlying VMM/hypervi-

sor. But the default security mechanisms in a VMM are

insufficient and thus the need arises to incorporate new

and reliable security mechanisms in them. This is achieved

by embedding hardware security architectures, mentioned

in Section I, inside a VMM. There are two primary ad-

vantages in this approach: 1). The virtualization software

(VMM/hypervisor) emulates the underlying hardware and

thus hardware security architectures can be realized in a

VMM by modifying its essential data structures and 2).

No modifications are required to the hardware processor

micro-architecture. This section first describes the SECureHYPErvisor (SecHYPE) framework, followed by a detailed

Attack model and finally the CTrust architecture.

A. Secure Hypervisor (SecHYPE) Framework

The core components and functioning of the SecHYPE

framework is shown in Figure 1. This framework is de-

veloped on top of Xen Hypervisor [4], an open-source

virtualization software. Thus it complies with the structure

of Xen VMM. However it is important to emphasize that the

mechanisms used to embed hardware security architectures

are generic to any virtualization software and hence can be

extended to other VMMs/hypervisors.

The Xen VMM/Hypervisor is the basic abstraction layer

(virtualization software) that resides directly on the hard-

ware below the operating system. It emulates the underlying

hardware and is responsible for CPU scheduling and mem-

ory partitioning in order to allow multiple VMs to run on

single hardware platform. Xen controls the execution of all

the VMs running on it, however it has no knowledge of

networking, external storage devices, video, or any other

common I/O functions found in a computing system. The

Xen structure defines two types of VMs — Domain 0

(DOM 0) and Domain U (DOM U). Domain 0 is a

privileged VM that has the capability to access physical

I/O resources and communicate with other VMs running on

the system. In its simplest form, a Domain 0 is a modified

Linux kernel, that must be running on all Xen platforms

Secure Architecture Plugin Interface - SAPI

Secure Architectures – AEGIS, Arc3D, XOM etc…

Modified VCPU API

Modified MMU API

Modified Memory Introspection API

odifie ed Mdified

Event Trigger Mechanism using VIRQ

Modified XEN Hypervisor

Privileged VM Kernel Unprivileged VM

Kernel

Secure Application Monitor Script

Monitor

Privileged VM (DOM 0) Unprivileged VM (DOM U)

Secure Hypercall

SIGNAL

Attacks

A hit t

Secur

Fig. 1: Secure Hypervisor (SecHYPE) Framework

before any other VM could be started. The Domain 0 is not

exposed to the outside world and hence is used to host the

supervisory Monitor program in the SecHYPE framework.

The Domain U is an unprivileged VM that is provided to

the users to host their applications. Thus the application to

be secured in a cloud known as Secure Application resides

in the Domain U. The other components of the SecHYPE

framework are: Secure Architecture Plugin Interface —

SAPI, Secure application, Event Trigger mechanism, and

the Monitor.

1) Secure Architecture Plug-in Interface (SAPI): The

SAPI is a generic interface exposed by SecHYPE frame-

work to embed a secure architecture within the Xen VMM.

SAPI is a collection of APIs which are used to modify

the virtual CPU (VCPU), virtual memory management unit

(VMMU) and provide memory introspection functions into

the modified components of the Xen. Secure architectures

are typically changes in CPU and memory of the hardware

which facilitates secure execution and isolation of a process.

These components are available as software modules in

Xen. These modules are modified to resemble a particular

secure architecture. As shown in Figure 1, the SAPI primar-

ily has three components: modified VCPU API, modified

VMMU API and modified memory introspection API. The

modified VCPU API has all the set of functions which mod-

ifies the Virtual CPU provided by Xen. These modifications

include providing encryption and decryption capabilities to

the processor, add additional secure registers, modify or

implement new cache memories etc. The modified VMMU

has set of functions which enhance the existing virtual

memory management unit provided by Xen. These changes

include switching on/off the conventional virtual memory

layout of the operating system, encryption and decryption

functions for main memory and adding additional access

restrictions to the memory access of secure process memory

pages.

36825

Page 3: [IEEE 2012 International Conference on Cyber Security (CyberSecurity) - Alexandria, VA, USA (2012.12.14-2012.12.16)] 2012 International Conference on Cyber Security - CTrust: A Framework

2) Secure Application: Secure Application is a special

process whose memory is required to be protected from

attacks on the system. This process is aware of the security

mechanisms provided by the secure architecture plugged

in to our framework. Secure Applications or processes

protect their confidential data by storing them in specialized

protected memory regions.

3) Event Trigger Mechanism: Event trigger provides a

mechanism to initiate inter virtual machine communication.

Traditionally Xen provides some mechanisms and tools like

split device driver, xenstore, grant table and ring buffers to

carry out inter VM communication. However the primary

drawback of these mechanisms and tools is that they need

the support from DOM U kernel to initiate communication.

The SecHYPE framework assumes all DOM U kernels

to be untrustworthy and vulnerable to attacks. Hence in-

stead of using the traditional mechanisms, a new hypercall

mechanism independent of the DOM U kernel, has been

developed. A hypercall works similar to a system call in an

OS. It is an interrupt, INT 82h in Xen that is used to switch

the control between the kernel and the Xen hypervisor. The

hypercall interrupts the processor and is trapped in Xen

using the hypercall handler functions. A new mechanism

was developed to interrupt the processor from ring-3 of

a DOM U VM. This is developed by using the CPUIDinstruction. The CPUID is meant to report processor fea-

tures to user-level applications. A custom code — 0x92hwas developed as an argument for the CPUID instruction

that can trap into the VMM from DOM U user-space. At

that point, the control is transferred to the hypercall handler

which will issue a virtual interrupt (VIRQ) to the DOM 0.

VIRQ is a software interrupt, notified by setting up a bit

in the Virtual CPU data structure present in Xen. It is used

for communication from Xen to the VM kernel.

4) Monitor: Monitor is a program running in the DOM 0

that receives notifications about the secure application,

through VIRQs. It is responsible for monitoring critical

events pertaining to the secure application and detect any

possible attacks on it. It contains a monitoring script which

is a collection of watch events and actions to be performed

when a particular event has occurred.

5) Framework Functioning: The first step of the func-

tioning is to plug-in a secure architecture by using the

generic interface provided by the SAPI. Once this is done,

the VCPU, VMMU and virtual memory introspection data

structures are appropriately modified to align with the

plugged-in secure architecture. All the information pertain-

ing to the security mechanisms provided by the secure ar-

chitecture is then reported to the Monitor through the Event

Trigger mechanism. The Monitor thus now has complete

visibility and understanding of the secure regions within

the secure architecture. The secure application can then

start executing in the DOM U. Typically, the entire memory

allocated to the secure application need not be confidential

and hence has no need to be protected. A secure application

identifies its critical confidential data and then transitions to

secure execution state. In the proposed framework, this is

achieved by invoking a secure hypercall enter vbase. Once

the secure application invokes this hypercall, the secure

architecture and the Monitor are informed about the secure

execution of the application. Its now the responsibility

of the secure architecture to protect the confidential data

of the application, while the Monitor is responsible for

tracking all the necessary events related to the application.

During the secure execution of the application, all its code

and data is encrypted and hashed before storing it to the

memory. This prevents an adversary from either reading the

data or writing to the memory locations pertaining to the

secure application. The secure application can exit secure

execution by invoking the exit vbase hypercall. At this

instant, the Monitor stops tracking the events and all the

recorded events are available for review in a log file.

B. Attack Model

The software components in a cloud environment are

susceptible to memory based attacks like splicing, spoofing

and replay. In splicing attack the adversary modifies the

associations between the memory addresses and its values.

For example, if value VA is associated with address Aand value VA′ is associated with address A′, a splicing

attack would return the value VA′ for a memory read

corresponding to address A. In a spoofing attack the

adversary modifies the value VA to a random value V ′A.

In a replay attack the adversary modifies the association

between the value and the time. For example, if value VA

is associated with address A at time T and the value V ∗A

is associated with address A at time T ∗, and T < T ∗, a

replay attack would return the value VA when a memory

read is performed at time t > T ∗.

The code and data belonging to a secure application

is also prone to network based attacks, or attacks from

other malicious VMs and applications. It is important to

emphasize that this framework assumes that the Xen VMM

is completely trustworthy and that any vulnerability or

security breach in Xen would also lead to the failure of

SecHYPE and CTrust. It is also assumed that DOM 0,

which is a supervisory VM is not exposed to the external

world and is only used for the purpose of monitoring other

VMs.

C. CTrust Framework

The intuition behind the Ctrust architecture is to de-

ploy the SecHYPE framework in a cloud environment

to provide security and root of trust to the applications

running in the cloud. The Figure 2 shows the proposed

CTrust Architecture. This represents the private cloud built

on top of the SecHYPE framework. In this architecture,

the cloud is composed of a cluster of real computing

machines known as the physical nodes. The nodes could

be easily added to the cloud based on its load. Each node

is connected to each other via a physical network. The

CTrust architecture is implemented on XCP 1.0 [1] that

36926

Page 4: [IEEE 2012 International Conference on Cyber Security (CyberSecurity) - Alexandria, VA, USA (2012.12.14-2012.12.16)] 2012 International Conference on Cyber Security - CTrust: A Framework

SecHYPE (Modified Xen)

SecHYPE (Modified Xen) SecHYPE (Modified Xen)

SecHYPE (Modified Xen)

Privileged VM-DOM 0

Privileged VM-DOM 0

Privileged VM-DOM 0

Privileged VM-DOM 0

Unprivileged VM-DOM U Malicious

Unprivileged VM-DOM U

Secure Application

Unprivileged VM-DOM U

Malicious Application

Unprivileged VM-DOM U

….N Physical Nodes

Physical Node 1

Physical Node 3

Physical Node 4

Physical Node 2

Privileged VM-DOM 0

vileged DOM Ui i

A

UV

1

Physical No

PrivilegVM-DO

-

Legend Trusted/Secure Component Attacks Network

Fig. 2: Secure Execution Cloud Framework

contains XEN Hypervisor version 3.4.x and CentOS with

2.6.32.x Linux kernel. Since the SecHYPE framework is

developed by modifying the XEN hypervisor, it is possible

to replace the original XEN hypervisor in XCP 1.0 with

the SecHYPE (modified hypervisor) framework. However

it is important to emphasize that the mechanisms used

to develop both SecHYPE and CTrust are generic to any

virtualization software.

The CTrust architecture is implemented with one HVM

unprivileged virtual machine. A HVM domain is a type of

XEN VM which is capable of running unmodified operating

systems (e.g. Windows). XEN originally did not support

unmodified operating systems. However Intel added support

for this in it’s Intel VT technology [30]. Now it is possible

to run unmodified operating systems in HVM domain. The

HVM domain has been chosen to implement CTrust for two

reasons. The first reason was to present a solution which

doesn’t require changes to operating systems. The second

reason is that the HVM guests have great paging support

available in XEN API. The same solution would be easier

to port to PV domain which runs modified (virtualization

aware) operating systems.

III. CTRUST PROTOTYPE IMPLEMENTATION

This section presents a prototype implementation of

CTrust architecture. This process is described in Algo-

rithm 1. It is important to emphasize that the prototype

implemented in this paper is just a small instance of the

framework. This prototype serves as a proof of concept

to prove the effectiveness of the framework. This imple-

mentation includes a very simple hardware secure archi-

tecture functionality and not a fully functional architecture.

The implementation is not as powerful as the framework

itself as its primary goal is to show the readers how an

application can be secured in a cloud environment. The

secure application runs in a HVM DOM U. Once the secure

process starts execution, it allocates a chunk of memory for

Algorithm 1 Secure Process Execution

1: Secure Process Begins

2: Allocate Secure Memory

3: The virtual address of secure memory is passed through

ring3 hypercall

4: Virtual address of secure memory is received in hyper-

visor

5: Guest Frame Number (GFN) is computed for the

received Guest Virtual Address (GVA)

6: Machine Frame Number (MFN) is computed for the

GFN

7: MFN is made read-only

8: Virtual Interrupt (VIRQ) is sent to DOM 0

9: VIRQ is received in the DOM 0 kernel

10: DOM 0 kernel sends signal to the Monitor

11: Monitor prints messages to user

secure data/variables. Later the secure process will allocate

memory out of this secure chunk of memory to the secure

data/variables. The implemented security architecture uses

SecHYPE to secure this chunk of memory. To achieve this,

the secure process copies the virtual address of the secure

chunk of memory and passes it to the hypervisor. The size

of the secure chunk of memory is aligned with that of the

memory pages. It is relatively easier to mark the pages read-

only than making individual memory locations read-only.

The primary advantage of CTrust implementation is that,

it eliminates the Operating System in making the secure

process’s memory read-only. To achieve this, it uses the

CPUID instruction. Because all other instructions except

CPUID are short circuited to the operating system’s inter-

rupt table and do not trap in to the VMM. CPUID, on the

other hand, will trap directly into the VMM. CPUID is

originally intended to report processor’s features to ring-

3 software applications. It takes various parameters and

reports different features of the processor depending on

those parameters. A custom parameter — 0x92 has been

added to the CPUID instruction. This parameter is passed

in the eax register and takes the virtual address of the

secure memory in the ebx register. The secure application

code containing the CPUID instruction is trapped in the

VMM. The VMM recognizes the operand 0x92 and passes

the virtual address to the SAPI component described in

SecHYPE framework. In the SAPI component, the virtual

address is translated into Guest Frame Number (GFN) and

eventually into Machine Frame Number (MFN). This MFN

is then made read-only and a Virtual Interrupt (VIRQ) is

sent to the DOM 0. The VIRQ is handled by the kernel

module in the DOM 0 and it notifies the Monitor through a

signal. The monitor prints the confirmation message to the

user and the secure process resumes its execution. Since

the secure memory pages are protected by the VMM, even

overwriting requests from OS will be ignored. The xmdaemon will report if any such attempts to overwrite the

37027

Page 5: [IEEE 2012 International Conference on Cyber Security (CyberSecurity) - Alexandria, VA, USA (2012.12.14-2012.12.16)] 2012 International Conference on Cyber Security - CTrust: A Framework

read-only (secure) pages is done.

A. Source Code Implementation

In the listing 1, a chunk of memory (secure mem) of

PAGE SIZE is allocated and the beginning of the chunk of

the memory is aligned to beginning of a page.

char secure_mem[PAGE_SIZE] secure_memory__attribute__((__aligned__(PAGE_SIZE)));

Listing 1: Secure Memory Allocation

In listing 2 we declared a long pointer (secret key) and

type casted the char buffer pointer to an long pointer

(secret mem). The secret key is assigned the address of the

secure memory. Now the contents of the address contained

in secret key will be stored in the chunk of memory

allocated in listing 1.

long * secret_key=(long *) secret_mem;*secret_key = 654321;

Listing 2: Secret Key Linked to Secure Memory

The address of the secret key is to be protected. To protect

it we will make it read only. In listing 3, we pass the

secret key to the hypervisor using ring3 hypercall. This

is an assembly macro which takes the virtual address of

the secure memory and a command integer as parameters.

In the macro these parameters are passed as operands for

the CPUID instruction. The CPUID instruction will then

trap into VMM. Along with the virtual address we send

a command to the SAPI module in the hypervisor which

decides the action to be performed on the virtual address.

Initially we will send a PROTECT command. This will

protect the virtual address by making the corresponding

Machine Frame Number read-only. Originally Xen allows

hypercalls to be done only through privileged interface in

the operating system. But we have solved this problem

by using CPUID instruction. We call this mechanism as

ring3 hypercall, which stands for hypercalls made from

ring3 of DOM U.

int ring3_hypercall(unsigned long gva, int cmd){

int ret;__asm__ __volatile__(

"cpuid": "=a"(ret): "a"(0x92), "b"(gva), "c"(cmd):"cc", "edx");return ret;

}unsigned long gva=(unsigned long) secret_key;ret = ring3_hypercall(gva, PROTECT);

Listing 3: Pass the virtual address to the VMM

Hypercalls are trapped into the VMM, thus giving VMM

the control over process execution. The function of the

VMM, where hypercall is handled is called as the hypercall

handler. The Guest Virtual Address (GVA) is received in

the hypercall handler and Machine Frame Number (MFN)

is computed which is the hardware machine’s RAM frame

number. The function that computes MFN needs Guest

Frame Number (GFN) as the argument. So first we com-

puted GFN using paging gva to gfn() function. This GFN

is then passed on to the gmfn to mfn where MFN is

calculated. This MFN is marked read-only by the xen’s in

built function. This function requires previous type (read-

only, write-able) of the MFN. Hence we first invoke a

function which returns the old type of the MFN. The

MFN is passed along with the old type and new type

(p2m ram ro). This will update the MFN type in xen’s

tables. Any further requests to overwrite the pages identified

by the MFN are dropped by xen. Attempts for trying to

write to the read-only MFN are reported to DOM 0 through

Xend. This process is shown in listing 4.

struct vcpu *v=current;struct domain *d=v->domain;

p2m_type_t old_type;mfn_t mfn;

gfn=paging_gva_to_gfn(current, gva, &pfec)

mfn=gfn_to_mfn(d, gfn, &old_type);p2m_change_type(d, gfn, ot,p2m_ram_ro);

Listing 4: Translate GVA to MFN and mark MFN

read-only

In listing 5 the code sends a global VIRQ to the DOM 0.

In Xen, VIRQ’s are handled by the guests as interrupts. So

we need to bind the VIRQ to an IRQ Handler. After the

VIRQ is populated from the hypercall handler, the DOM 0

is resumed and an interrupt (dynamically bound by the

kernel) is issued. This will trap the control into the IRQ

handler bound earlier.

send_guest_global_virq(dom0, VIRQ_VBASE);

bind_virq_to_irqhandler(VIRQ_VBASE,0,vbase_handler,NULL,NULL, 0);

Listing 5: Dispatch VIRQ from Xen

In listing 6 the task structure of the Monitor process is

found using find task by pid function provided by the

kernel (note that pid of the monitor can be sent through

a system call or by writing to kernel filesystems). After

finding the task struct a signal is issued to the Monitor

process. This will notify that the virtual address of the

secure process has been made read-only.

find_task_by_pid_type(PIDTYPE_PID, monitor_pid);send_sig_info(SIG_VBASE, &info, task_structure);

Listing 6: Dispatch a SIGNAL to the Monitor

Therefore it is evident from the prototype implemen-

tation, that the CTrust architecture detects any unwanted

modification to the secure application memory. These mod-

ifications can result from malicious applications, VMs, vul-

nerable OS and network channels. The secure architecture

embedded in the SecHYPE framework, for implementation

37128

Page 6: [IEEE 2012 International Conference on Cyber Security (CyberSecurity) - Alexandria, VA, USA (2012.12.14-2012.12.16)] 2012 International Conference on Cyber Security - CTrust: A Framework

purposes, employs an encryption and integrity verification

mechanism. This allows CTrust to detect malicious modi-

fications and eventually discard them.

Similarly, different hardware secure architectures could

be embedded with SecHYPE to bolster the security features

in cloud computing.

IV. RELATED WORK

Security in cloud systems has become a priority because

of its large scale applicability in various industrial sectors.

Extensive research is now directed towards building cloud-

based security frameworks, virtualization-based security

mechanisms and software security mechanisms.

Keller et al. [14] present the NoHype architecture that

removes the virtualization layer, while retaining the key

features enabled by virtualization. The advantage of this

approach is that it removes the existing security vulner-

abilities in the virtualization layer. But this approach re-

quires few changes to the processor core architecture along

with modifications to system peripherals and software.

Such changes are typically expensive and time consuming

to test and implement. In another work [2], the author

propose a framework to improve collaboration between

cloud providers, service providers and service consumers

to manage the security of the cloud platform and the

hosted services. Similarly, Sun et al. [28] present TMFC,

a trust management model based on fuzzy set theory. This

model is purely theoretical and further research is needed to

present a prototype framework for TMFC. In the paper [35],

Zheng et al. propose an artificial immune system (AIS)based cloud security model for malware detection as in-

cloud service instead of local-based anti-virus software. The

research paper [8], presents an architectural framework for

on-demand infrastructure services provisioning to provide

a basis for defining their Cloud Security Infrastructure. The

work in [17] presents SSC4Cloud Tooling, an environment

to collaboratively model business processes based on their

security requirements and to automatically deploy them

in the Cloud with security requirements enforcement. In

the paper [31], Wei et al. propose an image management

system that controls access to virtual machine images,

tracks the provenance of images, and provides users and

administrators with efficient image filters and scanners that

detect and repair security violations. Whereas Zhang et

al. propose CloudVisor [34], that protects the privacy and

integrity of customer’s virtual machines on commodity

virtualized infrastructures. In another research [18], the

authors have proposed a framework to measure the security

of virtual machines in a cloud system. Ibrahim et al.

present CloudSec [12], a virtualization-aware monitoring

appliance that provides active, transparent and real-time

security monitoring for hosted VMs in the IaaS model.

Overshadow [5] presents a VM based system that pro-

tects the privacy and integrity of application data even in

an event of total OS compromise. Overshadow is built on a

technique of multi-shadowing that provides multiple views

of the physical memory depending on the context of the

access. Similarly, McCune et al. [21] present a special-

purpose hypervisor called TrustVisor that provides code and

data integrity and secrecy for parts of an application. The

researchers at IBM have proposed sHype [24], a secure

hypervisor architecture that implements security reference

monitor to enforce information flow constraints between

VMs. The authors Luo et al. [20] present a Virtualiza-tion Security framework consisting of two parts: virtual

system security and virtualization security management.

While Li et al. present VMInsight [16] which is hardware-

virtualization-based security monitor system to provide

load-time and run-time monitoring for processes. The per-

formance overhead of VMInsight is less than 10%, and it

can be easily applied to the third-party security monitoring

system. Similarly in another research, the authors propose

VASP [36], a hypervisor based monitor which allows a

trusted execution environment to monitor various malicious

behaviors in the operating system. Whereas Lu et al.

advocate a microkernel-based virtual machine (KVM) [19]

that contains a new code-based security framework with

a simple and declarative security architecture. And finally

Dwoskin et al. propose a framework for design validation

of security architectures [9] to demonstrate how hardware

secure architectures mentioned in Section I can be imple-

mented in virtualized environments.

Ashish Thakwani has proposed dfork [3] to provide

process-level isolation using virtualization. dfork is a clone

of posix fork where a separate kernel and file-system is

allocated to every new process to isolate its operations

and interactions from other processes. This method gives

an ability to review the changes done by the application

before committing to the underlying hardware, thus giving

control to accept, isolate or discard some of these changes.

Rutkowska et al. propose a new (modified Linux) operating

system called Qubes OS [13]. It is very similar to dfork in

a way that every process that is being secured gets its own

kernel and environment in a virtualized container. Qubes

OS provides security by isolating application execution in

its own virtual machine. Finally, Microsoft OS research has

proposed an approach called Singularity [11] to solve the

process isolation problem by introducing a new concept of

software assisted process isolation as opposed to widely

accepted, de-facto, standard of hardware assisted process

isolation.

CTrust provides a root of trust to the cloud application in

the secure hypervisor. The proposed solution is significantly

different that the existing solutions in that it provides a

mechanism to embed any secure hardware architecture, of

the choosing of the cloud provider, to provide security in

the cloud. Therefore the aim of this research is to provide

flexible security solution to the cloud providers without

imposing significant overheads.

37229

Page 7: [IEEE 2012 International Conference on Cyber Security (CyberSecurity) - Alexandria, VA, USA (2012.12.14-2012.12.16)] 2012 International Conference on Cyber Security - CTrust: A Framework

V. CONCLUSIONS

Cloud computing represents a new technological revolu-

tion that allows multiple users to share expensive computing

resources and leverages critical IT services, on demand, to

its users. However, its success is hindered by the security

threats that exist in its model. Hence this paper presents

CTrust, a framework for secure and trustworthy application

execution in cloud computing. CTrust is developed around

a fundamental security paradigm — root of trust. The

intuition behind this approach is to strengthen the security

of the virtualization software by embedding secure hard-

ware architectures in it. Thus we have proposed SecHYPE,

a secure hypervisor framework that can provide reliable

security and root of trust to the applications running in the

cloud without incurring significant performance overheads.

This framework is scalable to any virtualization software

and can incorporate any secure architecture as desired by

the cloud provider. Thus the CTrust architecture is capable

of providing reliable security to the applications running in

the cloud without imposing massive performance overheads

on the cloud system.

REFERENCES

[1] Xen Cloud Platform. http://www.xen.org/download/xcp/index 1.1.0.html.

[2] M. Almorsy, J. Grundy, and A.S. Ibrahim. Collaboration-based cloudcomputing security management framework. In Cloud Computing(CLOUD), 2011 IEEE International Conference on, pages 364 –371,july 2011.

[3] Ashish Thakwani. Process-level Isolation using Virtualization. http://repository.lib.ncsu.edu/ir/handle/1840.16/2031, 2010.

[4] Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris,Alex Ho, Rolf Neugebauer, Ian Pratt, and Andrew Warfield. Xenand the art of virtualization. In SOSP ’03, pages 164–177, 2003.

[5] Xiaoxin Chen, Tal Garfinkel, E. Christopher Lewis, Pratap Subrah-manyam, Carl A. Waldspurger, Dan Boneh, Jeffrey Dwoskin, andDan R.K. Ports. Overshadow: a virtualization-based approach toretrofitting protection in commodity operating systems. SIGOPSOper. Syst. Rev., 42(2):2–13, March 2008.

[6] Richard Chow, Philippe Golle, Markus Jakobsson, Elaine Shi, JessicaStaddon, Ryusuke Masuoka, and Jesus Molina. Controlling datain the cloud: outsourcing computation without outsourcing control.In Proceedings of the 2009 ACM workshop on Cloud computingsecurity, CCSW ’09, pages 85–90, New York, NY, USA, 2009.ACM.

[7] C. Cowan, F. Wagle, Calton Pu, S. Beattie, and J. Walpole. Bufferoverflows: attacks and defenses for the vulnerability of the decade. InDARPA Information Survivability Conference and Exposition, 2000.DISCEX ’00. Proceedings, volume 2, pages 119 –129 vol.2, 2000.

[8] Y. Demchenko, Canh Ngo, C. de Laat, T.W. Wlodarczyk, ChunmingRong, and W. Ziegler. Security infrastructure for on-demand provi-sioned cloud infrastructure services. In Cloud Computing Technologyand Science (CloudCom), 2011 IEEE Third International Conferenceon, pages 255 –263, 29 2011-dec. 1 2011.

[9] Jeffrey S. Dwoskin, Mahadevan Gomathisankaran, Yu-Yuan Chen,and Ruby B. Lee. A framework for testing hardware-softwaresecurity architectures. In Proceedings of the 26th Annual ComputerSecurity Applications Conference, ACSAC ’10, pages 387–397, NewYork, NY, USA, 2010. ACM.

[10] Mahadevan Gomathisankaran and Akhilesh Tyagi. Architecturesupport for 3d obfuscation. IEEE Trans. Computers, 55(5):497–507,2006.

[11] Galen C. Hunt and James R. Larus. Singularity: rethinking thesoftware stack. SIGOPS Oper. Syst. Rev., 41(2):37–49, April 2007.

[12] A.S. Ibrahim, J. Hamlyn-Harris, J. Grundy, and M. Almorsy. Cloud-sec: A security monitoring appliance for virtual machines in theiaas cloud model. In Network and System Security (NSS), 2011 5thInternational Conference on, pages 113 –120, sept. 2011.

[13] Joanna Rutkowska. Qubes OS Architecture. http://qubes-os.org/files/doc/arch-spec-0.3.pdf, 2010.

[14] Eric Keller, Jakub Szefer, Jennifer Rexford, and Ruby B. Lee.Nohype: virtualized cloud infrastructure without the virtualization.In Proceedings of the 37th annual international symposium onComputer architecture, ISCA ’10, pages 350–361, New York, NY,USA, 2010. ACM.

[15] Srujan Kotikela, Satyajeet Nimgaonkar, and Mahadevan Gomath-isankaran. Virtualization based secure execution and testing frame-work. In Parallel and Distributed Computing and Systems, Dallas,TX, 2011. IASTED, ACTA Press.

[16] Xianxian Li, Changhui Jiang, Jianxin Li, and Bo Li. Vminsight:Hardware virtualization-based process security monitoring system.In Network Computing and Information Security (NCIS), 2011International Conference on, volume 1, pages 62 –66, may 2011.

[17] F. Lins, R. Medeiros, B. Silva, A. Souza, D. Aragao, J. Damasceno,P. Maciel, N. Rosa, B. Stephenson, and J. Li. Ssc4cloud tooling: Anintegrated environment for the development of business processeswith security requirements in the cloud. In Services (SERVICES),2011 IEEE World Congress on, pages 53 –60, july 2011.

[18] Qian Liu, Chuliang Weng, Minglu Li, and Yuan Luo. An in-vm measuring framework for increasing virtual machine security inclouds. Security Privacy, IEEE, 8(6):56 –62, nov.-dec. 2010.

[19] Xiaoqi Lu and Scott F. Smith. A microkernel virtual machine::building security with clear interfaces. In Proceedings of the 2006workshop on Programming languages and analysis for security,PLAS ’06, pages 47–56, New York, NY, USA, 2006. ACM.

[20] Shengmei Luo, Zhaoji Lin, Xiaohua Chen, Zhuolin Yang, and Jiany-ong Chen. Virtualization security for cloud computing service. InCloud and Service Computing (CSC), 2011 International Conferenceon, pages 174 –179, dec. 2011.

[21] Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, AnupamDatta, Virgil Gligor, and Adrian Perrig. Trustvisor: Efficient tcb re-duction and attestation. In Proceedings of the 2010 IEEE Symposiumon Security and Privacy, SP ’10, pages 143–158, Washington, DC,USA, 2010. IEEE Computer Society.

[22] National Institute of Standards and Technology. The NIST Defini-tion of Cloud Computing, nist special publication 800-145 edition,January 2011.

[23] S. Nimgaonkar and M. Gomathisankaran. Energy efficient memoryauthentication mechanism in embedded systems. In ElectronicSystem Design (ISED), 2011 International Symposium on, pages 248–253, dec. 2011.

[24] Reiner Sailer and Ronald Perez Stefan Berger and Ramn Cceres andLeendert van Doorn. Towards Enterprise-level Security with Xen,2006.

[25] Thomas Ristenpart, Eran Tromer, Hovav Shacham, and Stefan Sav-age. Hey, you, get off of my cloud: exploring information leakagein third-party compute clouds. In Proceedings of the 16th ACMconference on Computer and communications security, CCS ’09,pages 199–212, New York, NY, USA, 2009. ACM.

[26] J. Sahoo, S. Mohapatra, and R. Lath. Virtualization: A survey onconcepts, taxonomy and associated security issues. In Computerand Network Technology (ICCNT), 2010 Second International Con-ference on, pages 222 –226, april 2010.

[27] G. Edward Suh, Charles W. O’Donnell, and Srinivas Devadas. Aegis:A Single-Chip Secure Processor. IEEE Design & Test of Computers,24(6):570–580, 2007.

[28] Xiaodong Sun, Guiran Chang, and Fengyun Li. A trust managementmodel to enhance security of cloud computing environments. InNetworking and Distributed Computing (ICNDC), 2011 SecondInternational Conference on, pages 244 –248, sept. 2011.

[29] R. Uhlig, G. Neiger, D. Rodgers, A.L. Santoni, F.C.M. Martins, A.V.Anderson, S.M. Bennett, A. Kagi, F.H. Leung, and L. Smith. Intelvirtualization technology. Computer, 38(5):48 – 56, may 2005.

[30] Rich Uhlig, Gil Neiger, Dion Rodgers, Amy L. Santoni, Fer-nando C.M. Martins, Andrew V. Anderson, Steven M. Bennett,Alain Kagi, Felix H. Leung, and Larry Smith. Intel virtualizationtechnology. Computer, 38:48–56, 2005.

37330

Page 8: [IEEE 2012 International Conference on Cyber Security (CyberSecurity) - Alexandria, VA, USA (2012.12.14-2012.12.16)] 2012 International Conference on Cyber Security - CTrust: A Framework

[31] Jinpeng Wei, Xiaolan Zhang, Glenn Ammons, Vasanth Bala, andPeng Ning. Managing security of virtual machine images in a cloudenvironment. In Proceedings of the 2009 ACM workshop on Cloudcomputing security, CCSW ’09, pages 91–96, New York, NY, USA,2009. ACM.

[32] S.R. White and L. Comerford. Abyss: an architecture for softwareprotection. Software Engineering, IEEE Transactions on, 16(6):619–629, jun 1990.

[33] Jun Yang, Youtao Zhang, and Lan Gao. Fast secure processor forinhibiting software piracy and tampering. In Microarchitecture,2003. MICRO-36. Proceedings. 36th Annual IEEE/ACM Interna-tional Symposium on, pages 351 – 360, dec. 2003.

[34] Fengzhe Zhang, Jin Chen, Haibo Chen, and Binyu Zang. Cloudvisor:retrofitting protection of virtual machines in multi-tenant cloud withnested virtualization. In Proceedings of the Twenty-Third ACMSymposium on Operating Systems Principles, SOSP ’11, pages 203–216, New York, NY, USA, 2011. ACM.

[35] Xufei Zheng and Yonghui Fang. An ais-based cloud security model.In Intelligent Control and Information Processing (ICICIP), 2010International Conference on, pages 153 –158, aug. 2010.

[36] Min Zhu, Miao Yu, Mingyuan Xia, Bingyu Li, Peijie Yu, ShangGao, Zhengwei Qi, Liang Liu, Ying Chen, and Haibing Guan. Vasp:virtualization assisted security monitor for cross-platform protection.In Proceedings of the 2011 ACM Symposium on Applied Computing,SAC ’11, pages 554–559, New York, NY, USA, 2011. ACM.

[37] Xiaotong Zhuang, Tao Zhang, and Santosh Pande. Hide: an infras-tructure for efficiently protecting information leakage on the addressbus. SIGARCH Comput. Archit. News, 32(5):72–84, October 2004.

37431