COMP 3000 Essay 2 2010 Question 8: Difference between revisions

From Soma-notes
Gautam (talk | contribs)
No edit summary
m Protected "COMP 3000 Essay 2 2010 Question 8" ([edit=sysop] (indefinite) [move=sysop] (indefinite))
 
(14 intermediate revisions by 2 users not shown)
Line 12: Line 12:


=Background Concepts=
=Background Concepts=
To follow the ideas in this paper, the ideas which form the basis of this theory have to be understood. All in all, the following two concepts can be said to be central to understanding this paper.<br>
To follow the ideas in this paper, the ideas which form the basis of this theory have to be understood. All in all, the following two concepts can be said to be central to understanding this paper:<br>
==Information Flow==
==Information Flow==
Information flow as the name suggests is the transfer of information. This transfer of information can be between two processes or within a given process, for example, between variables. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1<nowiki>]</nowiki>] Information Flow Theory tries to quantify this flow of information into a mathematical model.<br>  
Information flow as the name suggests is the transfer of information. This transfer of information can be between two processes or within a given process, for example, between variables. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1<nowiki>]</nowiki>] Information Flow Theory tries to quantify this flow of information into a mathematical model.<br>  
Line 36: Line 36:
insecure=0</big><br></code>
insecure=0</big><br></code>
<br>
<br>
Since can determine the value of information in <i>secure</i> using logic statements, we can indirectly access the secure information. Information leak due to implicit flows is much harder to detect and protect from, due to the indirect nature of implicit flows.
Since the application can determine the value of information in <i>secure</i> using logic statements, we can indirectly access the secure information. Information leak due to implicit flows is much harder to detect and protect from, due to the indirect nature of implicit flows.


==Taint Analysis==
==Taint Analysis==
Line 79: Line 79:


=Contribution=
=Contribution=
The main contribution of the TaintDroid paper is not that they achieved information flow tracking, but that they made it efficient enough to run in real time on real constrained hardware devices with minimal overhead. TaintDroid only causes roughly a 14% CPU overhead and approximately 4.4% memory overhead when tracking 32 taint markings per tainted data unit. It should also be noted that the 14% CPU over-head is only in regards to a "CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications."(Enck et al., YEAR, p1)
The main contribution of the TaintDroid paper is not that they achieved information flow tracking, but that they made it efficient enough to run in real time on real constrained hardware devices with minimal overhead. TaintDroid only causes roughly a 14% CPU overhead and approximately 4.4% memory overhead when tracking 32 taint markings per tainted data unit. It should also be noted that the 14% CPU over-head figure is obtained by using a CPU-bound benchmark, and while highly accurate for the scope it is tested in, the performance loss is not necessarily noticed by the end user.


This low overhead is achieved by modifying the code directly at the Java Virtual Machine (JVM) layer of the Android system to provide variable-level tracking. This allows direct control over how and what private information, such as location details from the GPS, is stored and accessed, as opposed to relying on heuristics or manual labels. [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf [9<nowiki>]</nowiki>] Next, they modified the Java Native Interface (JNI) to provide message-level tracking which allows them to monitor inter-process, a.k.a. inter-application, communications. This also allows them to "patch the taint propagation on return." (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure "persistent information conservatively retains its taint markings." (Enck et al., YEAR, p3).
This low overhead is achieved by modifying the code directly at the Java Virtual Machine (JVM) layer of the Android system to provide variable-level tracking. This allows direct control over how and what private information, such as location details from the GPS, is stored and accessed, as opposed to relying on heuristics or manual labels. [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf [9<nowiki>]</nowiki>] Next, they modified the Java Native Interface (JNI) to provide message-level tracking which allows them to monitor inter-process communications. This also allows them to modify variable taint tags when a method call returns, so they can keep track of information transfer via native code. Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which allows persistant content to keep its taint marks between sessions.  


Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [http://www.usenix.org/events/sec04/tech/chow/chow_html/ 4], the virtualized architecture of Android allows four levels of taint propagation: variable, method, message, and file. The granularity and flow semantics that TaintDroid offers highly influences the performance and accuracy of TaintDroid. Existing taint tracking approaches, like Panorama Taint System [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&rep=rep1&type=pdf [11<nowiki>]</nowiki>], rely on instruction-level dynamic taint analysis using whole system emulation. Panorama Taint System is able to perform OS-aware whole system taint analysis to detect and analyze malicious code's information processing behavior. The core feature of this kind of taint analysis is realtime. But this method will lead to the system preforming from 2-20 times slower than normal, which is not suitable at all for the trend of realtime analysis.[http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html 4][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&rep=rep1&type=pdf [11<nowiki>]</nowiki>] Moreover, instruction-level tracking faces a serious problem, taint explosion. When we use some complex instructions such as CMPXCHG, REP MOV,the stack pointer may become falsely tainted or taint loss. [REF] However, TaintDroid solved this problem with the combination of 4 levels of tracking. For example, the variable level allows TaintDroid to provide flow semantics for taint propagation, allowing distinction between different data pointers at different levels to ensure accuracy.
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [http://www.usenix.org/events/sec04/tech/chow/chow_html/ [4<nowiki>]</nowiki>], the virtualized architecture of Android allows four levels of taint propagation: variable, method, message, and file. The granularity and flow semantics that TaintDroid offers highly influences the performance and accuracy of TaintDroid. Existing taint tracking approaches, like Panorama Taint System [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&rep=rep1&type=pdf [11<nowiki>]</nowiki>], rely on instruction-level dynamic taint analysis using whole system emulation. One analyzer, Panorama Taint System, is able to perform OS-aware whole system taint analysis to detect and analyze malicious code's information processing behavior. As Panorama Taint System was one of the first dynamic taint analysis programs, a core feature in Panorama is the real-time abilities. However, Panorama used instruction-level analysis, and so had a high overhead. Most taint analyzing systems using instruction-level methods will result in the system preforming from 2-20 times slower than normal, which is not suitable at all for the trend of real-time analysis.[http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html [4<nowiki>]</nowiki>][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&rep=rep1&type=pdf [11<nowiki>]</nowiki>] Moreover, instruction-level tracking faces a serious problem, taint explosion. When we use some complex instructions such as CMPXCHG, REP MOV,the stack pointer may become falsely tainted or taint loss. [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf [9<nowiki>]</nowiki>] However, TaintDroid solved this problem with the combination of 4 levels of tracking. For example, the variable level allows TaintDroid to provide flow semantics for taint propagation, allowing distinction between different data pointers at different levels to ensure accuracy.


By combining these four levels (variable, method, message and file) of taint tracking, TaintDroid was able to effectively track 30 randomly selected, popular, 3rd party android applications. In doing so TaintDroid correctly flagged 105 instances of tainted information transmission. Of these 105, only 35 were legitimate risks.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf [9<nowiki>]</nowiki>] It also determined that 50% of the applications submitted the users location to advertising servers and 5 of the applications transmitted the users device ID, phone number and SIM card serial number. Clearly, the higher granularity is needed and TaintDroid is providing a step in the right direction, by providing a highly efficient real time tracking system.
By combining these four levels (variable, method, message and file) of taint tracking, TaintDroid was able to effectively track 30 randomly selected, popular, 3rd party android applications. In doing so TaintDroid correctly flagged 105 instances of tainted information transmission. Of these 105, only 35 were legitimate risks.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf [9<nowiki>]</nowiki>] It also determined that 50% of the applications submitted the users location to advertising servers and 5 of the applications transmitted the users device ID, phone number and SIM card serial number. Clearly, the higher granularity is needed and TaintDroid is providing a step in the right direction, by providing a highly efficient real time tracking system.
Line 93: Line 93:
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid's workarounds for these challenges. TaintDroid uses dynamic taint analysis to find a way around the challenges, using a taint source as the targeted sensitive information, and a taint marking to identify the information type. It is easy to see that this research was effective, due to the impressive number of information leaks that were found. TaintDroid effectively identifies information misuse at a high percentage. However, while the implementation is strong in that the overhead is so low and accuracy is high, there are trade-offs that were incurred to meet that overhead.  
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid's workarounds for these challenges. TaintDroid uses dynamic taint analysis to find a way around the challenges, using a taint source as the targeted sensitive information, and a taint marking to identify the information type. It is easy to see that this research was effective, due to the impressive number of information leaks that were found. TaintDroid effectively identifies information misuse at a high percentage. However, while the implementation is strong in that the overhead is so low and accuracy is high, there are trade-offs that were incurred to meet that overhead.  


To prevent additional overhead, TaintDroid does not track implicit data flow or control flow. This partially is because the applications being tested are loaded onto the phone as black-box, precompiled binaries; but mostly because the Android JVM does not maintain branch structures, which TaintDroid could use to track implicit flow dynamically. It is presumed that branch structures are maintained at a kernel level, as a static analysis could uncover data leak stemming from implicit data flow, but dynamic analysis such as TaintDroid cannot. This means that applications can bypass the taint analysis by using implicit flow. There are also other issues, particularly in Taint Tag Storage, which are due to the fact that most string objects have the same tag. Because of the similar tags, it is possible for false positives to occur.
To prevent additional overhead, TaintDroid does not track implicit data flow or control flow. This partially is because the applications being tested are loaded onto the phone as black-box, pre-compiled binaries; but mostly because the Android JVM does not maintain branch structures, which TaintDroid could use to track implicit flow dynamically. It is presumed that branch structures are maintained at a kernel level, as a static analysis could uncover data leak stemming from implicit data flow, but dynamic analysis such as TaintDroid cannot. This means that applications can bypass the taint analysis by using implicit flow. There are also other issues, particularly in Taint Tag Storage, which are due to the fact that most string objects have the same tag. Because of the similar tags, it is possible for false positives to occur.


Further more, TaintDroid is a firmware modification, not an application which raises the questions of its usability by the average user. Being a firmware modification drastically reduces its usability unless 'Android System' itself incorporates these changes which is highly unlikely as the overheads, in this case a memory overhead of 4.4%, an IPC overhead of 27% and an overall 14% overhead, are on the higher side in an already resource constrained smartphone. Essentially, this to make an arguement that TaintDroid could have been made with a set of better design choices.  
Further more, TaintDroid is a firmware modification, not an application which raises the questions of its usability by the average user. Being a firmware modification drastically reduces its usability unless 'Android System' itself incorporates these changes which is highly unlikely as the overheads, in this case a memory overhead of 4.4%, an IPC overhead of 27% and an overall 14% overhead, are on the higher side in an already resource constrained smartphone. This implementation choice was reasonable for the research project TaintDroid is, but taint analysis is (hopefully) of high importance to the everyday user; TaintDroid could have aimed to go further than research.  


Consider a possible alternative implementation of TaintDroid. TaintDroid is incorporated in the firmware and hence incurs an additional overhead as the user uses the phone. Consider the implementation of 'TaintCheck' on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&rep=rep1&type=pdf [3<nowiki>]</nowiki>] TaintCheck performs dynamic taint analysis on a program by running the program in its own emulation environment. This allows TaintCheck to monitor and control the program’s execution at a fine-grained level. All the TaintCheck needs is the binary which it the rewrites and uses it in its own emulated environment. What this essentially means is that 'TaintCheck' is a mechanism that can perform dynamic taint analysis by performing binary rewriting at run time on an emulated envioronment. Taking this further, we can consider an implementation of TaintDroid based on similar lines. One can then envision an application in which you uploaded the 'application binary' and then TaintDroid would return a result of whether the application is safe or not. This has the advantage of being needed to run just once before installation and hence the overheads won't be much of a concern. This can even allow TaintDroid to incorporate signature based detection of 'malacious applications'.
Consider a possible alternative implementation of TaintDroid. TaintDroid is incorporated in the firmware and hence incurs an additional overhead as the user uses the phone. Consider the implementation of 'TaintCheck' on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&rep=rep1&type=pdf [3<nowiki>]</nowiki>] TaintCheck performs dynamic taint analysis on a program by running the program in its own emulation environment. This allows TaintCheck to monitor and control the program’s execution at a fine-grained level. All the TaintCheck needs is the binary which it the rewrites and uses it in its own emulated environment. What this essentially means is that 'TaintCheck' is a mechanism that can perform dynamic taint analysis by performing binary rewriting at run time on an emulated environment. Taking this further, we can consider an implementation of TaintDroid based on similar lines. One can then envision an application in which you uploaded the 'application binary' and then TaintDroid would return a result of whether the application is safe or not. This has the advantage of being needed to run just once before installation and hence the overheads won't be much of a concern. This can even allow TaintDroid to incorporate signature based detection of malicious applications. This would allow TaintDroid to be used as a black box.


=References=
=References=
Line 109: Line 109:
Symposium'' (August 2004).
Symposium'' (August 2004).


[5] CEARA, D., POTET, ML., et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] ''GINP ENSIMAG GoogleCode''(2009)
[5] CEARA, D., POTET, ML., et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] ''GINP ENSIMAG GoogleCode'' (2009)


[6] FITZPATRICK, M. [http://news.bbc.co.uk/2/hi/technology/8559683.stm Mobile that allows bosses to snoop on staff developed]. ''BBC News, Technology'' (March 2010)  
[6] FITZPATRICK, M. [http://news.bbc.co.uk/2/hi/technology/8559683.stm Mobile that allows bosses to snoop on staff developed]. ''BBC News, Technology'' (March 2010)  
Line 133: Line 133:


===Additional questions===
===Additional questions===
* Provide a brief description of information flow and taint analysis.
** Information flow is the transfer of information between variables, methods, processes, and files. There are two types of information flow: implicit and explicit. Explicit flow is the direct transfer of data that results in it being more accessible than originally intended. Implicit flow refers to the ability to derive information that is supposed to be kept private. Taint analysis attempts to track information flow in order to better understand possible security issues. There are two types of taint analysis: static, which maps all possible paths of a program; and dynamic, which attempts to follow information as it's transferred in real time. Both can follow both implicit and explicit information flow, however there is a significant run-time disadvantage in tracking implicit flow in dynamic environments, so dynamic taint analysis is often done through emulation. (Background Concepts)
* How is TaintDroid different from previous taint analysis programs? What are some problems specific to the TaintDroid implementation?
** While dynamic analysis has been done before in many contexts, TaintDroid is one of the first to attempt to do dynamic analysis on a live embedded system with resource constraints, and so has some unique concerns. The most specific is surely the fact that smart phones are resource constrained. Preforming taint analysis without using emulation requires an efficient, low-overhead implementation, or the experiment will grind to a halt. The next largest issue is working with the existing software. TaintDroid needs to go low-level enough in the Android system to see everything the applications may possibly do, and also needs to interpret what the applications on the device are doing with the data, without being able to see the application's source. Since applications are "black-boxes", data may not look the same coming out as going in, and to get around this you must work at a level lower than the applications.(Research Problem)
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one.  
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one.  
** An application could use implicit flow to derive data from tainted objects. TaintDroid has no way to inspect implicit flow dynamically, due to no branch structures being maintained at the JVM layer, where TaintDroid is implemented. Instead, control structures would be part of the pre-compiled application binaries, which, while not entirely black boxes, are impractical to investigate dynamically. Implicit flow data leaks can, however, be caught by a static analysis [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&rep=rep1&type=pdf 11].
** An application could use implicit flow to derive data from tainted objects. TaintDroid has no way to inspect implicit flow dynamically, due to no branch structures being maintained at the JVM layer, where TaintDroid is implemented. Instead, control structures would be part of the pre-compiled application binaries, which, while not entirely black boxes, are impractical to investigate dynamically. Implicit flow data leaks can, however, be caught by a static analysis, or an alternate dynamic analysis implementation [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&rep=rep1&type=pdf [11<nowiki>]</nowiki>].
* hmmm
** words go here
* hmmmmmmmmmm
** words go here

Latest revision as of 19:45, 3 December 2010

TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones

Authors:

  • William Enck, Patrick McDaniel The Pennsylvania State University
  • Peter Gilbert, Landon P. Cox Duke University
  • Byung-Gon Chun, Jaeyeon Jung, Anmol N. Sheth Intel Labs

Direct Link

Official Website

Video Demonstration

Background Concepts

To follow the ideas in this paper, the ideas which form the basis of this theory have to be understood. All in all, the following two concepts can be said to be central to understanding this paper:

Information Flow

Information flow as the name suggests is the transfer of information. This transfer of information can be between two processes or within a given process, for example, between variables. [1] Information Flow Theory tries to quantify this flow of information into a mathematical model.
In a security model the information flow can be categorized into:

Explicit Flow

Explicit flow is when information subject to security classifications is transferred to a variable or process which is not subject to the same or higher level of security, causing a security breach. [1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:
PRIVATE VAR secure
PUBLIC VAR notsecure
notsecure = secure


The information in 'secure' which is PRIVATE is transferred to 'notsecure' which is PUBLIC which is an information leak.

Implicit Flow

Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [1] Depending on the flow of the program the secure information can be compromised, as shown below

PRIVATE VAR secure
PUBLIC VAR notsecure
if secure="blah blah" then:
insecure=1
else:
insecure=0


Since the application can determine the value of information in secure using logic statements, we can indirectly access the secure information. Information leak due to implicit flows is much harder to detect and protect from, due to the indirect nature of implicit flows.

Taint Analysis

The basic premise of taint analysis is to follow the information flow of "tainted" variables to ensure that they do not create a security breach. Any variable that can be modified directly or indirectly by the user and can become a security vulnerability is "tainted". Through various operations the "taint" can be passed from variable to variable, propagating it. When a tainted variable is used to execute potentially dangerous commands a breach is logged, allowing detection of possible security concerns. [2][5]

Dynamic Taint Analysis

Taint Analysis done at run-time is called as Dynamic Taint Analysis. The approach used in dynamic taint analysis is to label data originating from untrusted sources as tainted. The analysis keeps track of all the tainted data in memory and when such data is used in a potentially dangerous situation, a leak is logged. [3] This approach offers the capabilities to detect most input validation vulnerabilities with a very low false positive rate. However, the execution of the program is slower because of the additional checks being preformed. [4]

Static Taint Analysis

Static taint analysis is the technique used for detecting the over approximation of the set of instructions that are influenced by user input. The set of tainted instructions is computed statically by analyzing the sources of the program. [5] The main advantage for static taint analysis is that it takes into account all the possible execution paths of the program. On the other hand the analysis may not be as accurate as a dynamic analysis because the static analysis does not have access to any additional run-time information of the program. [3]

Mathematical Model

For all variables V = {T,U} ;T are tainted and U are untainted:
Using : V x V -> V, x, y ∈ V
xy = T; x = T OR y = T
xy = U, if x = U AND y = U

It is now easy to see that whenever a tainted variable is used by another variable, the variable that used the tainted variable becomes tainted as well; the taint is propagated. Taking this further we can see that, if needed, we can tag variables as tainted by attaching to them a tainted tag, which can then be tracked or used as wanted. [1]

Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of "taint" to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis "taint" is used for untrusted information. However, in this case the "taint" variables are infact important private data.

Research problem

In today’s society, smartphones are a prominent new technology. Smartphones, by their nature, are linked into many private details of our lives, including not only classic data like our contact list, but new kinds of data smartphones make available, such as location data. Smartphones also have the ability to download and run third party applications which can connect to the internet; indeed, this is why we call them "smart". Except for the odd tunnel or elevator, these phones are constantly connected to the internet. When you combine third party applications with an internet connection on a device that stores an immense amount of personal data, you suddenly find yourself unsure of how your data is being used; what is to stop a third party application from disseminating our private information? As it turns out, very little. [6]

A telling example of this is a wallpaper application that sends your phone number back to the developer.[7] Once the app is running on your phone, it can typically access any of the information on your phone that it has been given permission to access, and it is not necessarily clear when the application has accessed data, or what it is doing with it.

The authors of this paper set out to try to understand what kind of information is being collected and where that information is being sent, and in order to do that, they first needed to build a means of tracking that information.

The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or taint) sensitive information at its source, and to then follow that mark as the data moves through a system. In the context of this paper, if ever we should see marked data leave the network interface of the phone, then we know that some sensitive information has been disseminated.

There are many difficulties associated with implementing such a system on a smartphone. Their design goals were to create a light-weight, minimal overhead, real-time tracking system that runs directly on a real phone, with real applications. To be really useful, the tracking system must not impact the user experience too heavily.

Some implementation difficulties are:

  • Smart phones are resource constrained. Processing power and memory are limited, and any processing that we do perform will consume battery power. If the tracking system is to be real-time, the phone must be considered "usable" by the end user, and so the system must be truly light weight.[8]
  • Third party applications arrive in a compiled format; we cannot analyze their source code.
  • Applications may do complex things with the sensitive data. It is unlikely that the application will simply read a location from the GPS and dump it straight out over the network. More likely is that the application will use that data in some way, or combine it with other data, before it is sent. We need to be able to track sensitive data throughout this entire process if we hope to perform any useful analysis.[3]
  • Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[9]
  • The tracking must operate on a real phone, not a simulated one. With a simulated system, where we control the virtual hardware and memory, we can be certain that we can see everything that an application might do. On a real device, how can we get low-level enough to see everything the applications do?[10]

Contribution

The main contribution of the TaintDroid paper is not that they achieved information flow tracking, but that they made it efficient enough to run in real time on real constrained hardware devices with minimal overhead. TaintDroid only causes roughly a 14% CPU overhead and approximately 4.4% memory overhead when tracking 32 taint markings per tainted data unit. It should also be noted that the 14% CPU over-head figure is obtained by using a CPU-bound benchmark, and while highly accurate for the scope it is tested in, the performance loss is not necessarily noticed by the end user.

This low overhead is achieved by modifying the code directly at the Java Virtual Machine (JVM) layer of the Android system to provide variable-level tracking. This allows direct control over how and what private information, such as location details from the GPS, is stored and accessed, as opposed to relying on heuristics or manual labels. [9] Next, they modified the Java Native Interface (JNI) to provide message-level tracking which allows them to monitor inter-process communications. This also allows them to modify variable taint tags when a method call returns, so they can keep track of information transfer via native code. Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which allows persistant content to keep its taint marks between sessions.

Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [4], the virtualized architecture of Android allows four levels of taint propagation: variable, method, message, and file. The granularity and flow semantics that TaintDroid offers highly influences the performance and accuracy of TaintDroid. Existing taint tracking approaches, like Panorama Taint System [11], rely on instruction-level dynamic taint analysis using whole system emulation. One analyzer, Panorama Taint System, is able to perform OS-aware whole system taint analysis to detect and analyze malicious code's information processing behavior. As Panorama Taint System was one of the first dynamic taint analysis programs, a core feature in Panorama is the real-time abilities. However, Panorama used instruction-level analysis, and so had a high overhead. Most taint analyzing systems using instruction-level methods will result in the system preforming from 2-20 times slower than normal, which is not suitable at all for the trend of real-time analysis.[4][11] Moreover, instruction-level tracking faces a serious problem, taint explosion. When we use some complex instructions such as CMPXCHG, REP MOV,the stack pointer may become falsely tainted or taint loss. [9] However, TaintDroid solved this problem with the combination of 4 levels of tracking. For example, the variable level allows TaintDroid to provide flow semantics for taint propagation, allowing distinction between different data pointers at different levels to ensure accuracy.

By combining these four levels (variable, method, message and file) of taint tracking, TaintDroid was able to effectively track 30 randomly selected, popular, 3rd party android applications. In doing so TaintDroid correctly flagged 105 instances of tainted information transmission. Of these 105, only 35 were legitimate risks.[9] It also determined that 50% of the applications submitted the users location to advertising servers and 5 of the applications transmitted the users device ID, phone number and SIM card serial number. Clearly, the higher granularity is needed and TaintDroid is providing a step in the right direction, by providing a highly efficient real time tracking system.

Critique

This paper has quite a bit of information, but has a very strong structure in explaining what TaintDroid is and what it does, which makes it easy to read. The paper begins with a high-level overview of TaintDroid, then explains the history followed by an explanation of sources that are tracked by TaintDroid and its design. It continues with test results and the strengths and weaknesses of TaintDroid, with references to related work.

Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid's workarounds for these challenges. TaintDroid uses dynamic taint analysis to find a way around the challenges, using a taint source as the targeted sensitive information, and a taint marking to identify the information type. It is easy to see that this research was effective, due to the impressive number of information leaks that were found. TaintDroid effectively identifies information misuse at a high percentage. However, while the implementation is strong in that the overhead is so low and accuracy is high, there are trade-offs that were incurred to meet that overhead.

To prevent additional overhead, TaintDroid does not track implicit data flow or control flow. This partially is because the applications being tested are loaded onto the phone as black-box, pre-compiled binaries; but mostly because the Android JVM does not maintain branch structures, which TaintDroid could use to track implicit flow dynamically. It is presumed that branch structures are maintained at a kernel level, as a static analysis could uncover data leak stemming from implicit data flow, but dynamic analysis such as TaintDroid cannot. This means that applications can bypass the taint analysis by using implicit flow. There are also other issues, particularly in Taint Tag Storage, which are due to the fact that most string objects have the same tag. Because of the similar tags, it is possible for false positives to occur.

Further more, TaintDroid is a firmware modification, not an application which raises the questions of its usability by the average user. Being a firmware modification drastically reduces its usability unless 'Android System' itself incorporates these changes which is highly unlikely as the overheads, in this case a memory overhead of 4.4%, an IPC overhead of 27% and an overall 14% overhead, are on the higher side in an already resource constrained smartphone. This implementation choice was reasonable for the research project TaintDroid is, but taint analysis is (hopefully) of high importance to the everyday user; TaintDroid could have aimed to go further than research.

Consider a possible alternative implementation of TaintDroid. TaintDroid is incorporated in the firmware and hence incurs an additional overhead as the user uses the phone. Consider the implementation of 'TaintCheck' on an x86 platform.[3] TaintCheck performs dynamic taint analysis on a program by running the program in its own emulation environment. This allows TaintCheck to monitor and control the program’s execution at a fine-grained level. All the TaintCheck needs is the binary which it the rewrites and uses it in its own emulated environment. What this essentially means is that 'TaintCheck' is a mechanism that can perform dynamic taint analysis by performing binary rewriting at run time on an emulated environment. Taking this further, we can consider an implementation of TaintDroid based on similar lines. One can then envision an application in which you uploaded the 'application binary' and then TaintDroid would return a result of whether the application is safe or not. This has the advantage of being needed to run just once before installation and hence the overheads won't be much of a concern. This can even allow TaintDroid to incorporate signature based detection of malicious applications. This would allow TaintDroid to be used as a black box.

References

[1] DENNING, D. E. A Lattice Model of Secure Information Flow. Communications of the ACM 19, 5 (May 1976), 236–243

[2] HALDAR, V., CHANDRA, D., FRANZ, M. Dynamic Taint Propagation for Java. Twenty-First Annual Computer Security Applications Confrence (ACSAC), (2005)

[3] NEWSOME,J.,AND SONG,D. Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software Proceedings of the Network and Distributed System Security Symposium (NDSS 2005)

[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. Understanding Data Lifetime via Whole System Simulation. Proceedings of the 13th USENIX Security Symposium (August 2004).

[5] CEARA, D., POTET, ML., et.al Detecting Software Vulnerabilities Static Taint Analysis GINP ENSIMAG GoogleCode (2009)

[6] FITZPATRICK, M. Mobile that allows bosses to snoop on staff developed. BBC News, Technology (March 2010)

[7] SMITH, E. iPhone Applications & Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs). http://pskl.us

[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement. International Workshop on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)

[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks. Technical Report No. UCB/EECS-2009-145, University of California, Berkeley (2009)

[10] CHUNG LAM, L., CHIUEH, T., A General Dynamic Information Flow Tracking Framework for Security Applications. Proceedings of the Annual Computer Security Applications Conference (ACSAC) (2006)

[11] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis. In Proceedings of ACM Computer and Communications Security (2007)

Questions

Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.

Anil's questions

  • What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)
    • Some applications are making legitimate use of sensitive data; for example, Google Maps needs to know your location in order to work, and the use of this data is known by the user. TaintDroid cannot know whether the user has consented to the use of some data, and so flags it as a leak. (Critique - Content)
  • What part of Android was modified for TaintDroid? Is this part of Android's kernel? Explain briefly.
    • The Dalvic VM is modified. Dalvic is the java virtual machine used by Android to run user applications. Although Dalvic is a core part of the Android operating system, it is not a part of the kernel. Dalvic runs on top of the Android kernel as a user process. All third party user applications run on top of Dalvic, however, so it is a sufficiently "low-level" point of the system to implement taint tracking. (Contribution)

Additional questions

  • Provide a brief description of information flow and taint analysis.
    • Information flow is the transfer of information between variables, methods, processes, and files. There are two types of information flow: implicit and explicit. Explicit flow is the direct transfer of data that results in it being more accessible than originally intended. Implicit flow refers to the ability to derive information that is supposed to be kept private. Taint analysis attempts to track information flow in order to better understand possible security issues. There are two types of taint analysis: static, which maps all possible paths of a program; and dynamic, which attempts to follow information as it's transferred in real time. Both can follow both implicit and explicit information flow, however there is a significant run-time disadvantage in tracking implicit flow in dynamic environments, so dynamic taint analysis is often done through emulation. (Background Concepts)
  • How is TaintDroid different from previous taint analysis programs? What are some problems specific to the TaintDroid implementation?
    • While dynamic analysis has been done before in many contexts, TaintDroid is one of the first to attempt to do dynamic analysis on a live embedded system with resource constraints, and so has some unique concerns. The most specific is surely the fact that smart phones are resource constrained. Preforming taint analysis without using emulation requires an efficient, low-overhead implementation, or the experiment will grind to a halt. The next largest issue is working with the existing software. TaintDroid needs to go low-level enough in the Android system to see everything the applications may possibly do, and also needs to interpret what the applications on the device are doing with the data, without being able to see the application's source. Since applications are "black-boxes", data may not look the same coming out as going in, and to get around this you must work at a level lower than the applications.(Research Problem)
  • Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one.
    • An application could use implicit flow to derive data from tainted objects. TaintDroid has no way to inspect implicit flow dynamically, due to no branch structures being maintained at the JVM layer, where TaintDroid is implemented. Instead, control structures would be part of the pre-compiled application binaries, which, while not entirely black boxes, are impractical to investigate dynamically. Implicit flow data leaks can, however, be caught by a static analysis, or an alternate dynamic analysis implementation [11].