




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































Improving Desktop System Security Using Compartmentalization
by Mohsen Zohrevandi
A Dissertation Presented in Partial Fulfillment of the Requirements for the Degree Doctor of Philosophy
Approved April 2018 by the Graduate Supervisory Committee: Rida Bazzi, Chair Gail-Joon Ahn Adam Doupé Ming Zhao
August 2018
Compartmentalizing access to content, be it websites accessed in a browser or docu- ments and applications accessed outside the browser, is an established method for protect- ing information integrity [12, 19, 21, 60]. Compartmentalization solutions change the user experience, introduce performance overhead and provide varying degrees of security. Strik- ing a balance between usability and security is not an easy task. If the usability aspects are neglected or sacrificed in favor of more security, the resulting solution would have a hard time being adopted by end-users. The usability is affected by factors including (1) the gen- erality of the solution in supporting various applications, (2) the type of changes required, (3) the performance overhead introduced by the solution, and (4) how much the user expe- rience is preserved. The security is affected by factors including (1) the attack surface of the compartmentalization mechanism, and (2) the security decisions offloaded to the user. This dissertation evaluates existing solutions based on the above factors and presents two novel compartmentalization solutions that are arguably more practical than their existing counterparts. The first solution, called FlexICon, is an attractive alternative in the design space of compartmentalization solutions on the desktop. FlexICon allows for the creation of a large number of containers with small memory footprint and low disk overhead. This is achieved by using lightweight virtualization based on Linux namespaces. FlexICon uses two mech- anisms to reduce user mistakes: 1) a trusted file dialog for selecting files for opening and launching it in the appropriate containers, and 2) a secure URL redirection mechanism that detects the user’s intent and opens the URL in the proper container. FlexICon also provides a language to specify the access constraints that should be enforced by various containers. The second solution called Auto-FBI, deals with web-based attacks by creating multi- ple instances of the browser and providing mechanisms for switching between the browser
i
To my family
iii
I like to thank my advisor, members of my graduate supervisory committee and my family and friends for their guidance, help and support during my PhD study at Arizona State University. I am indebted to my advisor Dr Rida Bazzi for his guidance, support and encourage- ment for my work. I learned how to approach a challenging research problem and how to communicate academic research effectively from Dr Bazzi. I also had the opportunity to work with him as a teaching assistant for a number of years. I learned how to stay motivated in class from him and I developed a deeper passion for teaching after witnessing his tireless efforts to improve the course every semester. I would like to thank my graduate supervisory committee members, Dr Adam Doupé, Dr Gail-Joon Ahn and Dr Ming Zhao for their insightful advice and suggestions on my work. I appreciate their time and effort in serving on my committee. Finally, I am grateful to my family for supporting me during these years that I have been far away from home. They have always encouraged me to follow my passion and made a lot of sacrifices to support me.
iv
Table Page
ix
Chapter 1
INTRODUCTION
Websites are vulnerable to Cross-Site Request Forgery (CSRF) [8], Cross-Site Scripting (XSS) [44] and Clickjacking [5] attacks [55]. There are specific solutions for each of these attacks, however, the solutions must be implemented by each website separately and are often tricky to implement correctly [77]. A major concern for users is that they do not know if adequate security measures are implemented for a website while they need to trust websites with sensitive information. This concern is further compounded by the fact that the user can download content that might be malicious or the websites themselves might install content on the user’s machine without the user’s knowledge. Once this content executes on the user’s machine, it can access user data without explicit user permission due to the access control model used in desktop systems. In all major desktop operating systems, a program is executed on behalf of the user who launches it inheriting all access privileges afforded to that user. Most of the time, the broad access privileges available to programs are not necessary and can cause security problems [1, 53, 62, 75, 76]. Researchers have proposed approaches to dealing with these concerns. Approaches that are restricted to combating CSRF, XSS and Clickjacking attacks include [8, 19, 21, 23, 39, 44, 57, 72, 73]. The existing solutions either need to be implemented by each website separately [8, 23, 39, 44, 57, 72, 73] or require websites to opt in and entail major changes in the browser code base [19, 21]. Other works [12, 60] propose compartmentalization to reduce the harm that can result from malicious content. The central idea is to break down the monolithic execution envi-
ronment of the operating system into multiple isolated execution environments (henceforth called containers ) with limited access to user data and other system resources. If an at- tacker manages to run malicious code in one of these containers, the rest of the system is safe from damage. Although the key idea of system compartmentalization is simple, an actual solution requires making trade-offs between security and usability. The existing so- lutions, namely Qubes OS [60] and Bromium [12], represent two distinct points in this design space. Bromium is a commercial system for Microsoft Windows based on the Xen hypervisor that supports the creation of light-weight virtual machines (called MicroVMs) for specific applications. Qubes is an open source project for providing virtual machines on top of the Xen hypervisor. Bromium can support isolation with little effect on the user experience for a handful of commonly-used applications. For the web browser, Bromium provides isolation at the tab level and the user has essentially the same browsing experience. The user experience is slightly affected when editing and viewing documents (for instance if two Word documents are in different virtual machines, one cannot use the switch windows option to switch be- tween the two documents). This ability to minimally affect the user experience is achieved by modifying the applications. Qubes on the other hand does not modify the applications and if one wishes two tabs to be isolated, one would need two separate instances of the browser in different containers (called AppVMs). Qubes requires the user to decide in which container particular content should be viewed whereas, for supported applications, Bromium relieves the user from making such decisions (for the most part). Qubes provides the ability to color the border of the application window with a color associated with its container, but the user is ultimately responsible for keeping track of the various containers. The advantages of Bromium come at a cost. Qubes disk access overhead and network over-
Table 1. Comparing FlexICon, Qubes and Bromium
Aspect FlexICon Qubes Bromium Large number of containers 3 7 3 Fast container launch 3 7? Fast application launch 3 3 3 Low disk overhead 3 7 7 Low network overhead 3 3 7 Cooperative 3 7 N/A Mitigates human error 3 7 3 Requires no application modification 3 3 7 Minimal change to user experience 7 7 3
Platform Attack Surface FlexICon Full kernel API Qubes Hypervisor + disaggregated restricted kernel API Bromium Hypervisor + restricted kernel API
FlexICon allows for the creation of a large number of containers with small memory foot- print. The disk and network overhead of FlexICon are better than those of Qubes and Bromium. This is achieved by using lightweight virtualization based on Linux namespaces. To reduce the effects of user mistakes and the effects of the design on the browsing expe- rience, FlexICon uses two mechanisms: 1) A trusted file dialog that allows applications running in any container to select a file for opening and launching it in the appropriate container, and 2) it provides seamless transitions between browser instances in various con- tainers using a browser extension that reports all user-requested URLs to the system so that if the URL must be handled by a browser running in a different container, the system can
detect user’s intent and open the URL in the proper container. FlexICon also provides a language that allows a savvy user to specify the access constraints that should be enforced by various containers. A summary of the comparison of FlexICon to Qubes and Bromium is shown in Table 1. Overall, FlexICon has better performance compared to Qubes and Bromium, is more general compared to Bromium in terms of application support, makes less changes to user experience compared to Qubes, reduces error-prone security decisions by the user at runtime compared to Qubes, but has a larger attack surface compared to Qubes and Bromium.
1.1 Contributions
This dissertation has the following contributions: (a) It presents Auto-FBI, an easily portable solution for isolating access to sensitive web- sites that does not require changing the browser code base or cooperation from web- site owners. (b) It presents a comprehensive evaluation of existing system compartmentalization so- lutions in terms of performance and security. (c) It presents FlexICon, a system compartmentalization solution that represents a new point in the design space of system compartmentalization solutions with unique trade- offs between performance, security and usability. (d) It presents an implementation of FlexICon for Ubuntu using light-weight isolation containers that can create large number of containers and achieve low performance overhead compared to existing systems.
Chapter 2
RELATED WORK
This chapter explores related work in the following areas: (1) web-specific solutions, (2) compartmentalization solutions, (3) isolation techniques, (4) secure graphical user inter- faces, and (5) access control.
2.1 Web-specific Solutions
Existing techniques for combating CSRF, XSS and Clickjacking attacks require each website to implement these measures individually. Content Security Policy (CSP) [72] allows the website developer to specify origins that are allowed to load in the context of a web page as well as putting restrictions on loading a page inside frames. Origin and Referer header validation [8] can be used to determine the origin of a request. SameSite cookies [73] prevent the browser from sending the cookie with cross-site requests. CSRF tokens [57, 77] can be used to mitigate CSRF attacks. Researchers have proposed isolating web applications in a single browser to combat CSRF, XSS and Clickjacking attacks [19]. The website providers can signal the browser using the host-meta mechanism [36] to isolate their website. Implementing the isolation mechanism in the browser requires non-trivial changes to the code base of the browser which means that major browsers are not likely to adopt this method. A benefit of this approach is that it can be fine-grained beyond isolating entire origins. Tahoma [21] provides a browser operating system (BOS), a software layer on top of which web browsers can run. The BOS employs the Xen hypervisor to compartmentalize
each web application in a Xen domain. The policy, including code to run, web domains to allow access to, and web application’s identity is specified by the web provider. This approach requires major changes to the browser to be able to run on top of the BOS. FlowFox [25] implements information flow control for web scripts based on the secure multi-execution technique. A modified version of SpiderMonkey, the JavaScript engine used in Firefox and other browsers, is used to enforce information flow security policies. FlowFox can be used to prevent information leakage by web scripts.
2.2 Compartmentalization Solutions
This section discusses the following categories of compartmentalization solutions: (1) application compartmentalization, (2) content-based compartmentalization, and (3) system compartmentalization.
2.2.1 Application Compartmentalization
Complex applications such as web browsers can be a major attack vector on desktop platforms enabling malware to find its way on the system. In order to defend against these attacks, a large complex application might be broken into multiple smaller components that execute with minimal privileges necessary to do their job. There are specific examples of applying this technique in the literature such as [7] as well as software frameworks that make it easier to apply this idea such as [71]. Although this could reduce the damage to the system in case the fortified application is attacked, ransomware and other types of malicious programs are not prevented by this method.