<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://homeostasis.scs.carleton.ca/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sliske</id>
	<title>Soma-notes - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://homeostasis.scs.carleton.ca/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sliske"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php/Special:Contributions/Sliske"/>
	<updated>2026-05-03T10:28:37Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6384</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6384"/>
		<updated>2010-12-02T16:21:33Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Additional questions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung, Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
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:&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since the application can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf [2&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]  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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec [4&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information. However, in this case the &amp;quot;taint&amp;quot; variables are infact important private data. &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm [6&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf [7&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [8&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf [9&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf [10&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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. &lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&#039;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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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. &lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;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.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. &#039;&#039;Communications of the ACM 19, 5&#039;&#039; (May 1976), 236–243&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. &#039;&#039;Twenty-First Annual Computer Security Applications Confrence (ACSAC),&#039;&#039; (2005)&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software] &#039;&#039;Proceedings of the Network and Distributed System Security Symposium&#039;&#039; (NDSS 2005)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. [http://www.usenix.org/events/sec04/tech/chow/chow_html/ Understanding Data Lifetime via Whole System Simulation]. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[5] CEARA, D., POTET, ML., et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] &#039;&#039;GINP ENSIMAG GoogleCode&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[6] FITZPATRICK, M. [http://news.bbc.co.uk/2/hi/technology/8559683.stm Mobile that allows bosses to snoop on staff developed]. &#039;&#039;BBC News, Technology&#039;&#039; (March 2010) &lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] &#039;&#039;http://pskl.us&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] &#039;&#039;International Workshop on Run Time Enforcement for Mobile and Distributed Systems&#039;&#039; (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145, University of California, Berkeley&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006)&lt;br /&gt;
&lt;br /&gt;
[11] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security&#039;&#039; (2007)&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Provide a brief description of information flow and taint analysis.&lt;br /&gt;
** 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&#039;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)&lt;br /&gt;
* How is TaintDroid different from previous taint analysis programs? What are some problems specific to the TaintDroid implementation?&lt;br /&gt;
** 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&#039;s source. Since applications are &amp;quot;black-boxes&amp;quot;, 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)&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;].&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6228</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6228"/>
		<updated>2010-12-02T06:24:02Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Additional questions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung, Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
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:&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since the application can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf [2&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]  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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec [4&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information. However, in this case the &amp;quot;taint&amp;quot; variables are infact important private data. &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm [6&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf [7&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [8&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf [9&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf [10&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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. &lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&#039;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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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. &lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;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.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. &#039;&#039;Communications of the ACM 19, 5&#039;&#039; (May 1976), 236–243&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. &#039;&#039;Twenty-First Annual Computer Security Applications Confrence (ACSAC),&#039;&#039; (2005)&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software] &#039;&#039;Proceedings of the Network and Distributed System Security Symposium&#039;&#039; (NDSS 2005)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. [http://www.usenix.org/events/sec04/tech/chow/chow_html/ Understanding Data Lifetime via Whole System Simulation]. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[5] CEARA, D., POTET, ML., et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] &#039;&#039;GINP ENSIMAG GoogleCode&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[6] FITZPATRICK, M. [http://news.bbc.co.uk/2/hi/technology/8559683.stm Mobile that allows bosses to snoop on staff developed]. &#039;&#039;BBC News, Technology&#039;&#039; (March 2010) &lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] &#039;&#039;http://pskl.us&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] &#039;&#039;International Workshop on Run Time Enforcement for Mobile and Distributed Systems&#039;&#039; (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145, University of California, Berkeley&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006)&lt;br /&gt;
&lt;br /&gt;
[11] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security&#039;&#039; (2007)&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Provide a brief description of information flow and taint analysis.&lt;br /&gt;
** 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&#039;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)&lt;br /&gt;
* How is TaintDroid different from previous taint analysis programs? What are some problems specific to the TaintDroid implementation?&lt;br /&gt;
** 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&#039;s source. Since applications are &amp;quot;black-boxes&amp;quot;, 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)&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;].&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_8&amp;diff=6222</id>
		<title>Talk:COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_8&amp;diff=6222"/>
		<updated>2010-12-02T06:09:59Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Work Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Group Members&lt;br /&gt;
&lt;br /&gt;
Trevor Bonesaw Malone - tmalone@connect.carleton.ca //FIRST POST!&lt;br /&gt;
&lt;br /&gt;
Qi Zhang   - qzhang13@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Gregory Bint - gbint@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Gautam Akiwate - gakiwate@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Corey Ling - cling@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Sarah Liske&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Work Plan ==&lt;br /&gt;
&lt;br /&gt;
As Trevor intimated, we should have clear division of work going forward.  This is sort of the break down as I see it.  Please edit as you think of new ideas!&lt;br /&gt;
&lt;br /&gt;
* Background Concepts&lt;br /&gt;
** Information Flow Theory. (Implicit and Explicit Flows.) --Done[--[[User:Gautam|Gautam]] 03:54, 28 November 2010 (UTC)]&lt;br /&gt;
** What is dynamic taint analysis --Done[--[[User:Gautam|Gautam]] 05:07, 28 November 2010 (UTC)]&lt;br /&gt;
** What is the difference between dynamic and static analysis --Done[--[[User:Gautam|Gautam]] 03:54, 30 November 2010 (UTC)]]&lt;br /&gt;
* Research Problem&lt;br /&gt;
** How do we build a DTA engine for a phone? - done, but by who?&lt;br /&gt;
** Why do we want to?  (information misuse) - done, but by who?&lt;br /&gt;
* Contribution&lt;br /&gt;
** How did they implement their DTA engine (Done: --[[User:Cling|Cling]] 04:50, 26 November 2010 (UTC))&lt;br /&gt;
** What did they find about information misuse (Done: --[[User:Cling|Cling]] 04:50, 26 November 2010 (UTC))&lt;br /&gt;
** Compared to the existing taint tracking approaches. [[User:Zhangqi|Zhangqi]] 07:11, 27 November 2010 (UTC)&lt;br /&gt;
** (What else should be in the contributions? Anything need fleshing out?) (Working on that now :) ) sliske&lt;br /&gt;
* Critique&lt;br /&gt;
**Added two paragraphs at the end of the present critique. Please incorporate it into your content as you deem fit.--[[User:Gautam|Gautam]] 09:07, 30 November 2010 (UTC) &lt;br /&gt;
**^ done. fleshed out critique, and added a bit about how taintdroid doesn&#039;t track implicit flow. Also reworded (the entire essay) for clarity where necessary/checked spelling. It would be a good idea for everyone to read it over once for spelling/clarity before thursday, just in case something doesn&#039;t make sense - sliske&lt;br /&gt;
* References&lt;br /&gt;
** The article has 61 references!  We can probably use some of them&lt;br /&gt;
**whee! reading papers and sticking in information as need be. &lt;br /&gt;
**references added and citations -taken care of- were removed/reworked, as it says in the assignment guidelines they&#039;re not allowed. will go over fill in a few places where information may be lacking after class sliske&lt;br /&gt;
**Referencing is a little askew. The numbers don&#039;t match the papers as listed in the referencing. Also the papers are usually cited with a number and enclosed in &amp;quot;[]&amp;quot;&lt;br /&gt;
**thanks for giving the paper a read over/noticing that :)&lt;br /&gt;
&lt;br /&gt;
List of information we need to find external sources for:&lt;br /&gt;
* History of taint analysis&lt;br /&gt;
* History of privacy research relating to smart phones&lt;br /&gt;
&lt;br /&gt;
== Work In Progress ==&lt;br /&gt;
&lt;br /&gt;
Log what you are working on *right now* so that other people don&#039;t try to do the same thing.  Make sure to clear your name from here when you are done.&lt;br /&gt;
&lt;br /&gt;
* Gregory Bint:  Research Problem&lt;br /&gt;
&lt;br /&gt;
* Gautam Akiwate:  Background Concepts&lt;br /&gt;
** Any resources on Dynamic taint Analysis would be appreciated!&lt;br /&gt;
&lt;br /&gt;
* Qi Zhang, Corey Ling: Contributions&lt;br /&gt;
&lt;br /&gt;
* Trevor Malone: Critique&lt;br /&gt;
&lt;br /&gt;
* Sarah Liske: References and Questions, Clarity/Spelling.&lt;br /&gt;
&lt;br /&gt;
== Some Notes from the Video ==&lt;br /&gt;
&lt;br /&gt;
Tracking of privacy sensitive data through Dynamic Taint Analysis (aka. Taint Tracking).  The trick is to mark private data as it sourced, and then follow those marks until (unless) they leave the phone.&lt;br /&gt;
	&lt;br /&gt;
Android phones run Java apps, which are compiled into DEX, and then run on top of the Dalvik VM.  It is this VM that we modify so that we can support the storage and tracking of taint tags.&lt;br /&gt;
&lt;br /&gt;
Taint sources&lt;br /&gt;
* low -bandwidth sensors&lt;br /&gt;
** Location&lt;br /&gt;
** Accelerometer&lt;br /&gt;
* High-bandwidth sensors&lt;br /&gt;
** Mic&lt;br /&gt;
** Camera&lt;br /&gt;
* Information DB&lt;br /&gt;
** Address book&lt;br /&gt;
** SMS storage&lt;br /&gt;
* Device ID&lt;br /&gt;
** IMEI&lt;br /&gt;
** IMSI   (don&#039;t actually track this one because of false positives)&lt;br /&gt;
** ICC_ID&lt;br /&gt;
** Phone Number&lt;br /&gt;
&lt;br /&gt;
Taint sink  (where marked data can leave the phone)&lt;br /&gt;
* Network Taint Sink&lt;br /&gt;
&lt;br /&gt;
Taint propagation&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
Taint tags are stored in memory interleaved with the variables they are tracking&lt;br /&gt;
&lt;br /&gt;
Some standard Data Flow technique is used to propagate these tags, especially as one variable that is marked may be assigned to another, so now that variable needs to be tracked as well.&lt;br /&gt;
&lt;br /&gt;
Tracks explicit flows of data, not implicit&lt;br /&gt;
	To fully capture implicit flows, you need to do static analysis, which is hard with closed-source apps, and cannot be done real-time&lt;br /&gt;
	&lt;br /&gt;
Implicit flows are not tracked&lt;br /&gt;
* Implicit flows can involve &amp;quot;taint-scope&amp;quot;, tracking based on conditionals in code&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
=== Performance ===&lt;br /&gt;
&lt;br /&gt;
The goal is to create a real time tracking system, so the TaintDroid&#039;s performance impact is of some importance&lt;br /&gt;
&lt;br /&gt;
14% CPU overhead&lt;br /&gt;
4.4% memory overhead&lt;br /&gt;
&lt;br /&gt;
Macro benchmarks  (to get a feel for what the phone&#039;s usability is like with TD running)&lt;br /&gt;
* App load:  3%  (2ms) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Findings ===&lt;br /&gt;
&lt;br /&gt;
20 out of 30 tested applications share data in a way that is not expected.&lt;br /&gt;
&lt;br /&gt;
67 of 105 flagged pieces of data leaving the device had no obviously legitimate purpose (verified by the authors).&lt;br /&gt;
&lt;br /&gt;
Many apps sent location data and other unique identifiers to advertising servers.&lt;br /&gt;
&lt;br /&gt;
Most apps do not mention anything to the user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
&lt;br /&gt;
Tracks only explicit data flows.&lt;br /&gt;
&lt;br /&gt;
An application *could* launder the tags off of the data, if they really wanted to hide this sort of thing from TaintDroid.&lt;br /&gt;
&lt;br /&gt;
There are methods that could be used to protect against this, but they go against the goal of a light-weight, real-time tracking system.  TD is not necessarily about catching truly malicious programs, but rather just those that leak information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why do apps take this information?&lt;br /&gt;
* Lazy;  in the demo video, the wallpaper app seems to use the IMEI just as a ready made unique ID&lt;br /&gt;
* Overzealous;  the developer might thing they *need* the data for something, but actually &lt;br /&gt;
* Ads;  advertises do seem a little presumptuous in their data collection&lt;br /&gt;
* Spying;  bosses or spouses&lt;br /&gt;
* Malicious;  &lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
=== QA Period ===&lt;br /&gt;
&lt;br /&gt;
Q:  how do we prevent a malicious app from removing a taint attribute on a file&lt;br /&gt;
&lt;br /&gt;
A:  TD operates a too low a level for this to be a problem;  TD assumes that the native code is trusted&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Q:  It seems like you had a lot of false positives&lt;br /&gt;
&lt;br /&gt;
A:  The point of this tool was to identify privacy sensitive information as having left the phone, not whether or not a privacy violation has taken place.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Q: Now that TD is released; couldn&#039;t malicious apps use some of the methods described in the paper to get around it?    &lt;br /&gt;
&lt;br /&gt;
A: Well, yes, but it is not just about maliciousness, it could just laziness or over-zealous ad stuff.&lt;br /&gt;
&lt;br /&gt;
==Other Information==&lt;br /&gt;
&lt;br /&gt;
Hey guys, thought I would just post a generalized paragraph about our essay.&lt;br /&gt;
&lt;br /&gt;
In today’s society, Smartphones are the new big thing. To me that’s what makes this paper so interesting. This paper focuses on private information in android phones and the misuse of this information. The misuse of information includes the SIM card, the ID of the device, or the phone number. TaintDroid is used on smart phones with an efficient taint tracking and analysis system. It has the ability to track sensitive data from multiple sources and examines the misuse of such data. In their study, out of 80 popular third-party applications, TaintDroid monitored that 68 applications had potential misuse of user’s private data. This tool is great for knowing with applications are safe and which are not, so your private data can remained private.&lt;br /&gt;
&lt;br /&gt;
Also, we should really think of splitting up the work in some way. If some people have specific sections they would like to do lets figure that out now so we can divide the workload and get it done over the next couple of days. I don&#039;t personally care what part I&#039;m going to have to do, so lets get this going. Any other information people wanna post feel free the more the better, even if we don&#039;t end up using it.&lt;br /&gt;
&lt;br /&gt;
[[user:Tmalone|Trevor Malone]]&lt;br /&gt;
&lt;br /&gt;
Hey guys! Anything else we need to get done? Let me know and I can help in anyway possible.&lt;br /&gt;
&lt;br /&gt;
[[user:Tmalone|Trevor Malone]]&lt;br /&gt;
&lt;br /&gt;
==Relevant Sources==&lt;br /&gt;
*NEWSOME,J.,AND SONG,D.Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software.      [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Analysis for Automatic Detection]&lt;br /&gt;
&amp;lt;u&amp;gt;Seems to be THE Dynamic Taint Analysis Paper.Talks about implementation on TaintCheck. Could be also useful for critique section&amp;lt;/u&amp;gt; -[Gautam]&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6221</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6221"/>
		<updated>2010-12-02T06:09:04Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Contribution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung, Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
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:&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since the application can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf [2&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]  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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec [4&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information. However, in this case the &amp;quot;taint&amp;quot; variables are infact important private data. &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm [6&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf [7&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [8&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf [9&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf [10&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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. &lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&#039;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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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. &lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;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.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. &#039;&#039;Communications of the ACM 19, 5&#039;&#039; (May 1976), 236–243&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. &#039;&#039;Twenty-First Annual Computer Security Applications Confrence (ACSAC),&#039;&#039; (2005)&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software] &#039;&#039;Proceedings of the Network and Distributed System Security Symposium&#039;&#039; (NDSS 2005)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. [http://www.usenix.org/events/sec04/tech/chow/chow_html/ Understanding Data Lifetime via Whole System Simulation]. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[5] CEARA, D., POTET, ML., et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] &#039;&#039;GINP ENSIMAG GoogleCode&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[6] FITZPATRICK, M. [http://news.bbc.co.uk/2/hi/technology/8559683.stm Mobile that allows bosses to snoop on staff developed]. &#039;&#039;BBC News, Technology&#039;&#039; (March 2010) &lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] &#039;&#039;http://pskl.us&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] &#039;&#039;International Workshop on Run Time Enforcement for Mobile and Distributed Systems&#039;&#039; (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145, University of California, Berkeley&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006)&lt;br /&gt;
&lt;br /&gt;
[11] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security&#039;&#039; (2007)&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Provide a brief description of information flow and taint analysis.&lt;br /&gt;
** 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&#039;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)&lt;br /&gt;
* How is TaintDroid different from previous taint analysis programs? How does it achieve these goals?&lt;br /&gt;
** 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 a lot of effort is put into reducing overhead. (Contribution)&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;].&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6218</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6218"/>
		<updated>2010-12-02T06:01:53Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Additional questions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung, Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
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:&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since the application can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf [2&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]  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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec [4&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information. However, in this case the &amp;quot;taint&amp;quot; variables are infact important private data. &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm [6&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf [7&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [8&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf [9&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf [10&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (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 &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&#039;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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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. &lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;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.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. &#039;&#039;Communications of the ACM 19, 5&#039;&#039; (May 1976), 236–243&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. &#039;&#039;Twenty-First Annual Computer Security Applications Confrence (ACSAC),&#039;&#039; (2005)&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software] &#039;&#039;Proceedings of the Network and Distributed System Security Symposium&#039;&#039; (NDSS 2005)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. [http://www.usenix.org/events/sec04/tech/chow/chow_html/ Understanding Data Lifetime via Whole System Simulation]. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[5] CEARA, D., POTET, ML., et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] &#039;&#039;GINP ENSIMAG GoogleCode&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[6] FITZPATRICK, M. [http://news.bbc.co.uk/2/hi/technology/8559683.stm Mobile that allows bosses to snoop on staff developed]. &#039;&#039;BBC News, Technology&#039;&#039; (March 2010) &lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] &#039;&#039;http://pskl.us&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] &#039;&#039;International Workshop on Run Time Enforcement for Mobile and Distributed Systems&#039;&#039; (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145, University of California, Berkeley&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006)&lt;br /&gt;
&lt;br /&gt;
[11] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security&#039;&#039; (2007)&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Provide a brief description of information flow and taint analysis.&lt;br /&gt;
** 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&#039;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)&lt;br /&gt;
* How is TaintDroid different from previous taint analysis programs? How does it achieve these goals?&lt;br /&gt;
** 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 a lot of effort is put into reducing overhead. (Contribution)&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;].&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6217</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6217"/>
		<updated>2010-12-02T06:01:32Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Contribution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung, Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
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:&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since the application can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf [2&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]  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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec [4&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information. However, in this case the &amp;quot;taint&amp;quot; variables are infact important private data. &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm [6&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf [7&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [8&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf [9&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf [10&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (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 &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&#039;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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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. &lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;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.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. &#039;&#039;Communications of the ACM 19, 5&#039;&#039; (May 1976), 236–243&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. &#039;&#039;Twenty-First Annual Computer Security Applications Confrence (ACSAC),&#039;&#039; (2005)&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software] &#039;&#039;Proceedings of the Network and Distributed System Security Symposium&#039;&#039; (NDSS 2005)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. [http://www.usenix.org/events/sec04/tech/chow/chow_html/ Understanding Data Lifetime via Whole System Simulation]. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[5] CEARA, D., POTET, ML., et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] &#039;&#039;GINP ENSIMAG GoogleCode&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[6] FITZPATRICK, M. [http://news.bbc.co.uk/2/hi/technology/8559683.stm Mobile that allows bosses to snoop on staff developed]. &#039;&#039;BBC News, Technology&#039;&#039; (March 2010) &lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] &#039;&#039;http://pskl.us&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] &#039;&#039;International Workshop on Run Time Enforcement for Mobile and Distributed Systems&#039;&#039; (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145, University of California, Berkeley&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006)&lt;br /&gt;
&lt;br /&gt;
[11] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security&#039;&#039; (2007)&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6215</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6215"/>
		<updated>2010-12-02T06:00:43Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Contribution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung, Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
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:&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since the application can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf [2&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]  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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec [4&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information. However, in this case the &amp;quot;taint&amp;quot; variables are infact important private data. &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm [6&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf [7&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [8&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf [9&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf [10&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (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 &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&#039;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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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&amp;lt;nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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. &lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;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.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. &#039;&#039;Communications of the ACM 19, 5&#039;&#039; (May 1976), 236–243&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. &#039;&#039;Twenty-First Annual Computer Security Applications Confrence (ACSAC),&#039;&#039; (2005)&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software] &#039;&#039;Proceedings of the Network and Distributed System Security Symposium&#039;&#039; (NDSS 2005)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. [http://www.usenix.org/events/sec04/tech/chow/chow_html/ Understanding Data Lifetime via Whole System Simulation]. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[5] CEARA, D., POTET, ML., et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] &#039;&#039;GINP ENSIMAG GoogleCode&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[6] FITZPATRICK, M. [http://news.bbc.co.uk/2/hi/technology/8559683.stm Mobile that allows bosses to snoop on staff developed]. &#039;&#039;BBC News, Technology&#039;&#039; (March 2010) &lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] &#039;&#039;http://pskl.us&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] &#039;&#039;International Workshop on Run Time Enforcement for Mobile and Distributed Systems&#039;&#039; (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145, University of California, Berkeley&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006)&lt;br /&gt;
&lt;br /&gt;
[11] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security&#039;&#039; (2007)&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6135</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6135"/>
		<updated>2010-12-02T03:29:40Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Implicit Flow */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung, Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
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:&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since the application can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf [2&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]  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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec [4&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information. However, in this case the &amp;quot;taint&amp;quot; variables are infact important private data. &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm [6&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf [7&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [8&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf [9&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf [10&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (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 &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&#039;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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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. &lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;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.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. &#039;&#039;Communications of the ACM 19, 5&#039;&#039; (May 1976), 236–243&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. &#039;&#039;Twenty-First Annual Computer Security Applications Confrence (ACSAC),&#039;&#039; (2005)&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software] &#039;&#039;Proceedings of the Network and Distributed System Security Symposium&#039;&#039; (NDSS 2005)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. [http://www.usenix.org/events/sec04/tech/chow/chow_html/ Understanding Data Lifetime via Whole System Simulation]. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[5] CEARA, D., POTET, ML., et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] &#039;&#039;GINP ENSIMAG GoogleCode&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[6] FITZPATRICK, M. [http://news.bbc.co.uk/2/hi/technology/8559683.stm Mobile that allows bosses to snoop on staff developed]. &#039;&#039;BBC News, Technology&#039;&#039; (March 2010) &lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] &#039;&#039;http://pskl.us&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] &#039;&#039;International Workshop on Run Time Enforcement for Mobile and Distributed Systems&#039;&#039; (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145, University of California, Berkeley&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006)&lt;br /&gt;
&lt;br /&gt;
[11] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security&#039;&#039; (2007)&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6128</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6128"/>
		<updated>2010-12-02T03:23:32Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Critique */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung, Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
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:&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf [2&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]  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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec [4&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information. However, in this case the &amp;quot;taint&amp;quot; variables are infact important private data. &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm [6&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf [7&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [8&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf [9&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf [10&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (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 &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&#039;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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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. &lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;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.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. &#039;&#039;Communications of the ACM 19, 5&#039;&#039; (May 1976), 236–243&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. &#039;&#039;Twenty-First Annual Computer Security Applications Confrence (ACSAC),&#039;&#039; (2005)&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software] &#039;&#039;Proceedings of the Network and Distributed System Security Symposium&#039;&#039; (NDSS 2005)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. [http://www.usenix.org/events/sec04/tech/chow/chow_html/ Understanding Data Lifetime via Whole System Simulation]. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[5] CEARA, D., POTET, ML., et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] &#039;&#039;GINP ENSIMAG GoogleCode&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[6] FITZPATRICK, M. [http://news.bbc.co.uk/2/hi/technology/8559683.stm Mobile that allows bosses to snoop on staff developed]. &#039;&#039;BBC News, Technology&#039;&#039; (March 2010) &lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] &#039;&#039;http://pskl.us&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] &#039;&#039;International Workshop on Run Time Enforcement for Mobile and Distributed Systems&#039;&#039; (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145, University of California, Berkeley&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006)&lt;br /&gt;
&lt;br /&gt;
[11] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security&#039;&#039; (2007)&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6120</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6120"/>
		<updated>2010-12-02T03:19:24Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Critique */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung, Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
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:&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf [2&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]  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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec [4&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information. However, in this case the &amp;quot;taint&amp;quot; variables are infact important private data. &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm [6&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf [7&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [8&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf [9&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf [10&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (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 &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&#039;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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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, and TaintDroid could have aimed to go further than research.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. &#039;&#039;Communications of the ACM 19, 5&#039;&#039; (May 1976), 236–243&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. &#039;&#039;Twenty-First Annual Computer Security Applications Confrence (ACSAC),&#039;&#039; (2005)&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software] &#039;&#039;Proceedings of the Network and Distributed System Security Symposium&#039;&#039; (NDSS 2005)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. [http://www.usenix.org/events/sec04/tech/chow/chow_html/ Understanding Data Lifetime via Whole System Simulation]. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[5] CEARA, D., POTET, ML., et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] &#039;&#039;GINP ENSIMAG GoogleCode&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[6] FITZPATRICK, M. [http://news.bbc.co.uk/2/hi/technology/8559683.stm Mobile that allows bosses to snoop on staff developed]. &#039;&#039;BBC News, Technology&#039;&#039; (March 2010) &lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] &#039;&#039;http://pskl.us&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] &#039;&#039;International Workshop on Run Time Enforcement for Mobile and Distributed Systems&#039;&#039; (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145, University of California, Berkeley&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006)&lt;br /&gt;
&lt;br /&gt;
[11] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security&#039;&#039; (2007)&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6115</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6115"/>
		<updated>2010-12-02T03:11:45Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Background Concepts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung, Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
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:&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf [2&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]  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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec [4&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information. However, in this case the &amp;quot;taint&amp;quot; variables are infact important private data. &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm [6&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf [7&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [8&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf [9&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf [10&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (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 &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&#039;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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.   &lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. &#039;&#039;Communications of the ACM 19, 5&#039;&#039; (May 1976), 236–243&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. &#039;&#039;Twenty-First Annual Computer Security Applications Confrence (ACSAC),&#039;&#039; (2005)&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software] &#039;&#039;Proceedings of the Network and Distributed System Security Symposium&#039;&#039; (NDSS 2005)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. [http://www.usenix.org/events/sec04/tech/chow/chow_html/ Understanding Data Lifetime via Whole System Simulation]. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[5] CEARA, D., POTET, ML., et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] &#039;&#039;GINP ENSIMAG GoogleCode&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[6] FITZPATRICK, M. [http://news.bbc.co.uk/2/hi/technology/8559683.stm Mobile that allows bosses to snoop on staff developed]. &#039;&#039;BBC News, Technology&#039;&#039; (March 2010) &lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] &#039;&#039;http://pskl.us&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] &#039;&#039;International Workshop on Run Time Enforcement for Mobile and Distributed Systems&#039;&#039; (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145, University of California, Berkeley&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006)&lt;br /&gt;
&lt;br /&gt;
[11] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security&#039;&#039; (2007)&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_8&amp;diff=6111</id>
		<title>Talk:COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_8&amp;diff=6111"/>
		<updated>2010-12-02T03:11:17Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Work Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Group Members&lt;br /&gt;
&lt;br /&gt;
Trevor Bonesaw Malone - tmalone@connect.carleton.ca //FIRST POST!&lt;br /&gt;
&lt;br /&gt;
Qi Zhang   - qzhang13@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Gregory Bint - gbint@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Gautam Akiwate - gakiwate@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Corey Ling - cling@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Sarah Liske&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Work Plan ==&lt;br /&gt;
&lt;br /&gt;
As Trevor intimated, we should have clear division of work going forward.  This is sort of the break down as I see it.  Please edit as you think of new ideas!&lt;br /&gt;
&lt;br /&gt;
* Background Concepts&lt;br /&gt;
** Information Flow Theory. (Implicit and Explicit Flows.) --Done[--[[User:Gautam|Gautam]] 03:54, 28 November 2010 (UTC)]&lt;br /&gt;
** What is dynamic taint analysis --Done[--[[User:Gautam|Gautam]] 05:07, 28 November 2010 (UTC)]&lt;br /&gt;
** What is the difference between dynamic and static analysis --Done[--[[User:Gautam|Gautam]] 03:54, 30 November 2010 (UTC)]]&lt;br /&gt;
* Research Problem&lt;br /&gt;
** How do we build a DTA engine for a phone? - done, but by who?&lt;br /&gt;
** Why do we want to?  (information misuse) - done, but by who?&lt;br /&gt;
* Contribution&lt;br /&gt;
** How did they implement their DTA engine (Done: --[[User:Cling|Cling]] 04:50, 26 November 2010 (UTC))&lt;br /&gt;
** What did they find about information misuse (Done: --[[User:Cling|Cling]] 04:50, 26 November 2010 (UTC))&lt;br /&gt;
** Compared to the existing taint tracking approaches. [[User:Zhangqi|Zhangqi]] 07:11, 27 November 2010 (UTC)&lt;br /&gt;
** (What else should be in the contributions? Anything need fleshing out?) (Working on that now :) ) sliske&lt;br /&gt;
* Critique&lt;br /&gt;
**Added two paragraphs at the end of the present critique. Please incorporate it into your content as you deem fit.--[[User:Gautam|Gautam]] 09:07, 30 November 2010 (UTC) &lt;br /&gt;
**^ done. fleshed out critique, and added a bit about how taintdroid doesn&#039;t track implicit flow. Also reworded (the entire essay) for clarity where necessary/checked spelling. It would be a good idea for everyone to read it over once for spelling/clarity before thursday, just in case something doesn&#039;t make sense - sliske&lt;br /&gt;
* References&lt;br /&gt;
** The article has 61 references!  We can probably use some of them&lt;br /&gt;
**whee! reading papers and sticking in information as need be. Also working out how to cite properly, as there are two citations used currently&lt;br /&gt;
**references added and citations taken care of. will go over fill in a few places where information may be lacking after class sliske&lt;br /&gt;
**Referencing is a little askew. The numbers don&#039;t match the papers as listed in the referencing. Also the papers are usually cited with a number and enclosed in &amp;quot;[]&amp;quot;&lt;br /&gt;
**thanks for giving the paper a read over/noticing that :)&lt;br /&gt;
&lt;br /&gt;
List of information we need to find external sources for:&lt;br /&gt;
* History of taint analysis&lt;br /&gt;
* History of privacy research relating to smart phones&lt;br /&gt;
&lt;br /&gt;
== Work In Progress ==&lt;br /&gt;
&lt;br /&gt;
Log what you are working on *right now* so that other people don&#039;t try to do the same thing.  Make sure to clear your name from here when you are done.&lt;br /&gt;
&lt;br /&gt;
* Gregory Bint:  Research Problem&lt;br /&gt;
** Need to find some history on smart phone security research for the second part.&lt;br /&gt;
&lt;br /&gt;
* Gautam Akiwate:  Background Concepts&lt;br /&gt;
** Any resources on Dynamic taint Analysis would be appreciated!&lt;br /&gt;
&lt;br /&gt;
* Qi Zhang, Corey Ling: Contributions&lt;br /&gt;
&lt;br /&gt;
* Trevor Malone: Critique&lt;br /&gt;
&lt;br /&gt;
* Sarah Liske: References and Questions, Clarity/Spelling.&lt;br /&gt;
&lt;br /&gt;
== Some Notes from the Video ==&lt;br /&gt;
&lt;br /&gt;
Tracking of privacy sensitive data through Dynamic Taint Analysis (aka. Taint Tracking).  The trick is to mark private data as it sourced, and then follow those marks until (unless) they leave the phone.&lt;br /&gt;
	&lt;br /&gt;
Android phones run Java apps, which are compiled into DEX, and then run on top of the Dalvik VM.  It is this VM that we modify so that we can support the storage and tracking of taint tags.&lt;br /&gt;
&lt;br /&gt;
Taint sources&lt;br /&gt;
* low -bandwidth sensors&lt;br /&gt;
** Location&lt;br /&gt;
** Accelerometer&lt;br /&gt;
* High-bandwidth sensors&lt;br /&gt;
** Mic&lt;br /&gt;
** Camera&lt;br /&gt;
* Information DB&lt;br /&gt;
** Address book&lt;br /&gt;
** SMS storage&lt;br /&gt;
* Device ID&lt;br /&gt;
** IMEI&lt;br /&gt;
** IMSI   (don&#039;t actually track this one because of false positives)&lt;br /&gt;
** ICC_ID&lt;br /&gt;
** Phone Number&lt;br /&gt;
&lt;br /&gt;
Taint sink  (where marked data can leave the phone)&lt;br /&gt;
* Network Taint Sink&lt;br /&gt;
&lt;br /&gt;
Taint propagation&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
Taint tags are stored in memory interleaved with the variables they are tracking&lt;br /&gt;
&lt;br /&gt;
Some standard Data Flow technique is used to propagate these tags, especially as one variable that is marked may be assigned to another, so now that variable needs to be tracked as well.&lt;br /&gt;
&lt;br /&gt;
Tracks explicit flows of data, not implicit&lt;br /&gt;
	To fully capture implicit flows, you need to do static analysis, which is hard with closed-source apps, and cannot be done real-time&lt;br /&gt;
	&lt;br /&gt;
Implicit flows are not tracked&lt;br /&gt;
* Implicit flows can involve &amp;quot;taint-scope&amp;quot;, tracking based on conditionals in code&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
=== Performance ===&lt;br /&gt;
&lt;br /&gt;
The goal is to create a real time tracking system, so the TaintDroid&#039;s performance impact is of some importance&lt;br /&gt;
&lt;br /&gt;
14% CPU overhead&lt;br /&gt;
4.4% memory overhead&lt;br /&gt;
&lt;br /&gt;
Macro benchmarks  (to get a feel for what the phone&#039;s usability is like with TD running)&lt;br /&gt;
* App load:  3%  (2ms) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Findings ===&lt;br /&gt;
&lt;br /&gt;
20 out of 30 tested applications share data in a way that is not expected.&lt;br /&gt;
&lt;br /&gt;
67 of 105 flagged pieces of data leaving the device had no obviously legitimate purpose (verified by the authors).&lt;br /&gt;
&lt;br /&gt;
Many apps sent location data and other unique identifiers to advertising servers.&lt;br /&gt;
&lt;br /&gt;
Most apps do not mention anything to the user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
&lt;br /&gt;
Tracks only explicit data flows.&lt;br /&gt;
&lt;br /&gt;
An application *could* launder the tags off of the data, if they really wanted to hide this sort of thing from TaintDroid.&lt;br /&gt;
&lt;br /&gt;
There are methods that could be used to protect against this, but they go against the goal of a light-weight, real-time tracking system.  TD is not necessarily about catching truly malicious programs, but rather just those that leak information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why do apps take this information?&lt;br /&gt;
* Lazy;  in the demo video, the wallpaper app seems to use the IMEI just as a ready made unique ID&lt;br /&gt;
* Overzealous;  the developer might thing they *need* the data for something, but actually &lt;br /&gt;
* Ads;  advertises do seem a little presumptuous in their data collection&lt;br /&gt;
* Spying;  bosses or spouses&lt;br /&gt;
* Malicious;  &lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
=== QA Period ===&lt;br /&gt;
&lt;br /&gt;
Q:  how do we prevent a malicious app from removing a taint attribute on a file&lt;br /&gt;
&lt;br /&gt;
A:  TD operates a too low a level for this to be a problem;  TD assumes that the native code is trusted&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Q:  It seems like you had a lot of false positives&lt;br /&gt;
&lt;br /&gt;
A:  The point of this tool was to identify privacy sensitive information as having left the phone, not whether or not a privacy violation has taken place.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Q: Now that TD is released; couldn&#039;t malicious apps use some of the methods described in the paper to get around it?    &lt;br /&gt;
&lt;br /&gt;
A: Well, yes, but it is not just about maliciousness, it could just laziness or over-zealous ad stuff.&lt;br /&gt;
&lt;br /&gt;
==Other Information==&lt;br /&gt;
&lt;br /&gt;
Hey guys, thought I would just post a generalized paragraph about our essay.&lt;br /&gt;
&lt;br /&gt;
In today’s society, Smartphones are the new big thing. To me that’s what makes this paper so interesting. This paper focuses on private information in android phones and the misuse of this information. The misuse of information includes the SIM card, the ID of the device, or the phone number. TaintDroid is used on smart phones with an efficient taint tracking and analysis system. It has the ability to track sensitive data from multiple sources and examines the misuse of such data. In their study, out of 80 popular third-party applications, TaintDroid monitored that 68 applications had potential misuse of user’s private data. This tool is great for knowing with applications are safe and which are not, so your private data can remained private.&lt;br /&gt;
&lt;br /&gt;
Also, we should really think of splitting up the work in some way. If some people have specific sections they would like to do lets figure that out now so we can divide the workload and get it done over the next couple of days. I don&#039;t personally care what part I&#039;m going to have to do, so lets get this going. Any other information people wanna post feel free the more the better, even if we don&#039;t end up using it.&lt;br /&gt;
&lt;br /&gt;
[[user:Tmalone|Trevor Malone]]&lt;br /&gt;
&lt;br /&gt;
Hey guys! Anything else we need to get done? Let me know and I can help in anyway possible.&lt;br /&gt;
&lt;br /&gt;
[[user:Tmalone|Trevor Malone]]&lt;br /&gt;
&lt;br /&gt;
==Relevant Sources==&lt;br /&gt;
*NEWSOME,J.,AND SONG,D.Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software.      [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Analysis for Automatic Detection]&lt;br /&gt;
&amp;lt;u&amp;gt;Seems to be THE Dynamic Taint Analysis Paper.Talks about implementation on TaintCheck. Could be also useful for critique section&amp;lt;/u&amp;gt; -[Gautam]&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6109</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6109"/>
		<updated>2010-12-02T03:10:30Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung, Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf [2&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]  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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec [4&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information. However, in this case the &amp;quot;taint&amp;quot; variables are infact important private data. &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm [6&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf [7&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [8&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf [9&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf [10&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (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 &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&#039;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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.   &lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. &#039;&#039;Communications of the ACM 19, 5&#039;&#039; (May 1976), 236–243&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. &#039;&#039;Twenty-First Annual Computer Security Applications Confrence (ACSAC),&#039;&#039; (2005)&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software] &#039;&#039;Proceedings of the Network and Distributed System Security Symposium&#039;&#039; (NDSS 2005)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. [http://www.usenix.org/events/sec04/tech/chow/chow_html/ Understanding Data Lifetime via Whole System Simulation]. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[5] CEARA, D., POTET, ML., et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] &#039;&#039;GINP ENSIMAG GoogleCode&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[6] FITZPATRICK, M. [http://news.bbc.co.uk/2/hi/technology/8559683.stm Mobile that allows bosses to snoop on staff developed]. &#039;&#039;BBC News, Technology&#039;&#039; (March 2010) &lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] &#039;&#039;http://pskl.us&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] &#039;&#039;International Workshop on Run Time Enforcement for Mobile and Distributed Systems&#039;&#039; (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145, University of California, Berkeley&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006)&lt;br /&gt;
&lt;br /&gt;
[11] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security&#039;&#039; (2007)&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6105</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6105"/>
		<updated>2010-12-02T03:07:57Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Contribution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung, Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf [2&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]  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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec [4&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf [5&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf [1&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information. However, in this case the &amp;quot;taint&amp;quot; variables are infact important private data. &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm [6&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf [7&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [8&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf [9&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf [10&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (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 &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;], 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&#039;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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
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&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.   &lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf [3&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. &#039;&#039;Communications of the ACM 19, 5&#039;&#039; (May 1976), 236–243&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. &#039;&#039;Twenty-First Annual Computer Security Applications Confrence (ACSAC),&#039;&#039; (2005)&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software] &#039;&#039;Proceedings of the Network and Distributed System Security Symposium&#039;&#039; (NDSS 2005)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. [http://www.usenix.org/events/sec04/tech/chow/chow_html/ Understanding Data Lifetime via Whole System Simulation]. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[5] CEARA, D., POTET, ML., et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] &#039;&#039;GINP ENSIMAG GoogleCode&#039;&#039;(2009)&lt;br /&gt;
&lt;br /&gt;
[6] FITZPATRICK, M. [http://news.bbc.co.uk/2/hi/technology/8559683.stm Mobile that allows bosses to snoop on staff developed]. &#039;&#039;BBC News, Technology&#039;&#039; (March 2010) &lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] &#039;&#039;http://pskl.us&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] &#039;&#039;International Workshop on Run Time Enforcement for Mobile and Distributed Systems&#039;&#039; (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145, University of California, Berkeley&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006)&lt;br /&gt;
&lt;br /&gt;
[11] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security&#039;&#039; (2007)&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf [11&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6053</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=6053"/>
		<updated>2010-12-02T01:03:03Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Contribution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 3]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm 6]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf 8]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf 3]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf 9]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf 10]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (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 &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).&lt;br /&gt;
&lt;br /&gt;
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&amp;amp;rep=rep1&amp;amp;type=pdf 11], 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&#039;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&amp;amp;rep=rep1&amp;amp;type=pdf 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. [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.&lt;br /&gt;
&lt;br /&gt;
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] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf 11].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. &#039;&#039;Communications of the ACM 19, 5&#039;&#039; (May 1976), 236–243&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. &#039;&#039;Twenty-First Annual Computer Security Applications Confrence (ACSAC),&#039;&#039; (2005)&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software] &#039;&#039;Proceedings of the Network and Distributed System Security Symposium&#039;&#039; (NDSS 2005)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. [http://www.usenix.org/events/sec04/tech/chow/chow_html/ Understanding Data Lifetime via Whole System Simulation]. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[5] CEARA, D., POTET, ML., et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] &#039;&#039;GINP ENSIMAG GoogleCode&#039;&#039;(2009)&lt;br /&gt;
&lt;br /&gt;
[6] FITZPATRICK, M. [http://news.bbc.co.uk/2/hi/technology/8559683.stm Mobile that allows bosses to snoop on staff developed]. &#039;&#039;BBC News, Technology&#039;&#039; (March 2010) &lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] &#039;&#039;http://pskl.us&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] &#039;&#039;International Workshop on Run Time Enforcement for Mobile and Distributed Systems&#039;&#039; (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145, University of California, Berkeley&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006)&lt;br /&gt;
&lt;br /&gt;
[11] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security&#039;&#039; (2007)&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5994</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5994"/>
		<updated>2010-12-01T19:59:28Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Mathematical Model */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 3]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm 6]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf 8]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf 3]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf 9]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf 10]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (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 &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).&lt;br /&gt;
&lt;br /&gt;
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&amp;amp;rep=rep1&amp;amp;type=pdf 11], rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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&amp;amp;rep=rep1&amp;amp;type=pdf 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. [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.&lt;br /&gt;
&lt;br /&gt;
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] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf 11].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. &#039;&#039;Communications of the ACM 19, 5&#039;&#039; (May 1976), 236–243&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. &#039;&#039;Twenty-First Annual Computer Security Applications Confrence (ACSAC),&#039;&#039; (2005)&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software] &#039;&#039;Proceedings of the Network and Distributed System Security Symposium&#039;&#039; (NDSS 2005)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. [http://www.usenix.org/events/sec04/tech/chow/chow_html/ Understanding Data Lifetime via Whole System Simulation]. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[5] CEARA, D., POTET, ML., et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] &#039;&#039;GINP ENSIMAG GoogleCode&#039;&#039;(2009)&lt;br /&gt;
&lt;br /&gt;
[6] FITZPATRICK, M. [http://news.bbc.co.uk/2/hi/technology/8559683.stm Mobile that allows bosses to snoop on staff developed]. &#039;&#039;BBC News, Technology&#039;&#039; (March 2010) &lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] &#039;&#039;http://pskl.us&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] &#039;&#039;International Workshop on Run Time Enforcement for Mobile and Distributed Systems&#039;&#039; (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145, University of California, Berkeley&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006)&lt;br /&gt;
&lt;br /&gt;
[11] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security&#039;&#039; (2007)&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5992</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5992"/>
		<updated>2010-12-01T19:56:17Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 3]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm 6]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf 8]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf 3]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf 9]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf 10]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (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 &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).&lt;br /&gt;
&lt;br /&gt;
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&amp;amp;rep=rep1&amp;amp;type=pdf 11], rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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&amp;amp;rep=rep1&amp;amp;type=pdf 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. [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.&lt;br /&gt;
&lt;br /&gt;
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] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf 11].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. &#039;&#039;Communications of the ACM 19, 5&#039;&#039; (May 1976), 236–243&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. &#039;&#039;Twenty-First Annual Computer Security Applications Confrence (ACSAC),&#039;&#039; (2005)&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software] &#039;&#039;Proceedings of the Network and Distributed System Security Symposium&#039;&#039; (NDSS 2005)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. [http://www.usenix.org/events/sec04/tech/chow/chow_html/ Understanding Data Lifetime via Whole System Simulation]. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[5] CEARA, D., POTET, ML., et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] &#039;&#039;GINP ENSIMAG GoogleCode&#039;&#039;(2009)&lt;br /&gt;
&lt;br /&gt;
[6] FITZPATRICK, M. [http://news.bbc.co.uk/2/hi/technology/8559683.stm Mobile that allows bosses to snoop on staff developed]. &#039;&#039;BBC News, Technology&#039;&#039; (March 2010) &lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] &#039;&#039;http://pskl.us&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] &#039;&#039;International Workshop on Run Time Enforcement for Mobile and Distributed Systems&#039;&#039; (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145, University of California, Berkeley&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006)&lt;br /&gt;
&lt;br /&gt;
[11] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security&#039;&#039; (2007)&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5991</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5991"/>
		<updated>2010-12-01T19:55:59Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 3]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm 6]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf 8]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf 3]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf 9]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf 10]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (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 &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).&lt;br /&gt;
&lt;br /&gt;
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&amp;amp;rep=rep1&amp;amp;type=pdf 11], rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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&amp;amp;rep=rep1&amp;amp;type=pdf 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. [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.&lt;br /&gt;
&lt;br /&gt;
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] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf 11].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. &#039;&#039;Communications of the ACM 19, 5&#039;&#039; (May 1976), 236–243&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. &#039;&#039;Twenty-First Annual Computer Security Applications Confrence (ACSAC),&#039;&#039; (2005)&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software] &#039;&#039;Proceedings of the Network and Distributed System Security Symposium&#039;&#039; (NDSS 2005)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. [http://www.usenix.org/events/sec04/tech/chow/chow_html/ Understanding Data Lifetime via Whole System Simulation]. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[5] CEARA, D., POTET, ML., et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] &#039;&#039;GINP ENSIMAG GoogleCode&#039;&#039;(2009)&lt;br /&gt;
&lt;br /&gt;
[6] Fitzpatrick, M. [http://news.bbc.co.uk/2/hi/technology/8559683.stm Mobile that allows bosses to snoop on staff developed]. &#039;&#039;BBC News, Technology&#039;&#039; (March 2010) &lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] &#039;&#039;http://pskl.us&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] &#039;&#039;International Workshop on Run Time Enforcement for Mobile and Distributed Systems&#039;&#039; (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145, University of California, Berkeley&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006)&lt;br /&gt;
&lt;br /&gt;
[11] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security&#039;&#039; (2007)&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5990</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5990"/>
		<updated>2010-12-01T19:54:14Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 3]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm 6]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf 8]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf 3]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf 9]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf 10]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (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 &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).&lt;br /&gt;
&lt;br /&gt;
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&amp;amp;rep=rep1&amp;amp;type=pdf 11], rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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&amp;amp;rep=rep1&amp;amp;type=pdf 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. [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.&lt;br /&gt;
&lt;br /&gt;
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] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf 11].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. &#039;&#039;Communications of the ACM 19, 5&#039;&#039; (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software] &#039;&#039;Proceedings of the Network and Distributed System Security Symposium&#039;&#039; (NDSS 2005)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. [http://www.usenix.org/events/sec04/tech/chow/chow_html/ Understanding Data Lifetime via Whole System Simulation]. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[5] CEARA, D., POTET, ML., et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] &#039;&#039;GINP ENSIMAG GoogleCode&#039;&#039;(2009)&lt;br /&gt;
&lt;br /&gt;
[6] Fitzpatrick, M. [http://news.bbc.co.uk/2/hi/technology/8559683.stm Mobile that allows bosses to snoop on staff developed]. &#039;&#039;BBC News, Technology&#039;&#039; (March 2010) &lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] &#039;&#039;http://pskl.us&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] &#039;&#039;International Workshop on Run Time Enforcement for Mobile and Distributed Systems&#039;&#039; (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145, University of California, Berkeley&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006).&lt;br /&gt;
&lt;br /&gt;
[11] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5989</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5989"/>
		<updated>2010-12-01T19:53:51Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 3]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm 6]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf 8]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf 3]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf 9]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf 10]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (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 &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).&lt;br /&gt;
&lt;br /&gt;
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&amp;amp;rep=rep1&amp;amp;type=pdf 11], rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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&amp;amp;rep=rep1&amp;amp;type=pdf 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. [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.&lt;br /&gt;
&lt;br /&gt;
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] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf 11].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. &#039;&#039;Communications of the ACM 19, 5&#039;&#039; (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software] &#039;&#039;Proceedings of the Network and Distributed System Security Symposium&#039;&#039; (NDSS 2005)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. [http://www.usenix.org/events/sec04/tech/chow/chow_html/ Understanding Data Lifetime via Whole System Simulation]. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[5] CEARA, D., POTET, ML., et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] &#039;&#039;GINP ENSIMAG GoogleCode&#039;&#039;(2009)&lt;br /&gt;
&lt;br /&gt;
[6] Fitzpatrick, M. (March 2010). [http://news.bbc.co.uk/2/hi/technology/8559683.stm Mobile that allows bosses to snoop on staff developed]. BBC News, Technology.  &lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] &#039;&#039;http://pskl.us&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] &#039;&#039;International Workshop on Run Time Enforcement for Mobile and Distributed Systems&#039;&#039; (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145, University of California, Berkeley&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006).&lt;br /&gt;
&lt;br /&gt;
[11] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5988</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5988"/>
		<updated>2010-12-01T19:51:25Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 3]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm 6]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf 8]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf 3]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf 9]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf 10]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (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 &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).&lt;br /&gt;
&lt;br /&gt;
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&amp;amp;rep=rep1&amp;amp;type=pdf 11], rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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&amp;amp;rep=rep1&amp;amp;type=pdf 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. [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.&lt;br /&gt;
&lt;br /&gt;
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] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf 11].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. &#039;&#039;Communications of the ACM 19, 5&#039;&#039; (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software] &#039;&#039;Proceedings of the Network and Distributed System Security Symposium&#039;&#039; (NDSS 2005)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. [http://www.usenix.org/events/sec04/tech/chow/chow_html/ Understanding Data Lifetime via Whole System Simulation]. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[5] CEARA, D., POTET, ML., et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] &#039;&#039;GINP ENSIMAG GoogleCode&#039;&#039;(2009)&lt;br /&gt;
&lt;br /&gt;
[6] http://news.bbc.co.uk/2/hi/technology/8559683.stm&lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] &#039;&#039;http://pskl.us&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] &#039;&#039;International Workshop on Run Time Enforcement for Mobile and Distributed Systems&#039;&#039; (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145, University of California, Berkeley&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006).&lt;br /&gt;
&lt;br /&gt;
[11] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_8&amp;diff=5986</id>
		<title>Talk:COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_8&amp;diff=5986"/>
		<updated>2010-12-01T19:49:35Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Work Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Group Members&lt;br /&gt;
&lt;br /&gt;
Trevor Bonesaw Malone - tmalone@connect.carleton.ca //FIRST POST!&lt;br /&gt;
&lt;br /&gt;
Qi Zhang   - qzhang13@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Gregory Bint - gbint@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Gautam Akiwate - gakiwate@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Corey Ling - cling@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Sarah Liske&lt;br /&gt;
&lt;br /&gt;
==Relevant Sources==&lt;br /&gt;
*NEWSOME,J.,AND SONG,D.Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software.      [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Analysis for Automatic Detection]&lt;br /&gt;
&amp;lt;u&amp;gt;Seems to be THE Dynamic Taint Analysis Paper.Talks about implementation on TaintCheck. Could be also useful for critique section&amp;lt;/u&amp;gt; -[Gautam]&lt;br /&gt;
&lt;br /&gt;
== Work Plan ==&lt;br /&gt;
&lt;br /&gt;
As Trevor intimated, we should have clear division of work going forward.  This is sort of the break down as I see it.  Please edit as you think of new ideas!&lt;br /&gt;
&lt;br /&gt;
* Background Concepts&lt;br /&gt;
** Information Flow Theory. (Implicit and Explicit Flows.) --Done[--[[User:Gautam|Gautam]] 03:54, 28 November 2010 (UTC)]&lt;br /&gt;
** What is dynamic taint analysis --Done[--[[User:Gautam|Gautam]] 05:07, 28 November 2010 (UTC)]&lt;br /&gt;
** What is the difference between dynamic and static analysis - it&#039;s there, who added it?&lt;br /&gt;
* Research Problem&lt;br /&gt;
** How do we build a DTA engine for a phone? - done, but by who?&lt;br /&gt;
** Why do we want to?  (information misuse) - done, but by who?&lt;br /&gt;
* Contribution&lt;br /&gt;
** How did they implement their DTA engine (Done: --[[User:Cling|Cling]] 04:50, 26 November 2010 (UTC))&lt;br /&gt;
** What did they find about information misuse (Done: --[[User:Cling|Cling]] 04:50, 26 November 2010 (UTC))&lt;br /&gt;
** Compared to the existing taint tracking approaches. [[User:Zhangqi|Zhangqi]] 07:11, 27 November 2010 (UTC) (Added something. Still looking for other examples,in progress)&lt;br /&gt;
** (What else should be in the contributions? Anything need fleshing out?) (Working on that now :) ) sliske&lt;br /&gt;
* Critique&lt;br /&gt;
**Added two paragraphs at the end of the present critique. Please incorporate it into your content as you deem fit.--[[User:Gautam|Gautam]] 09:07, 30 November 2010 (UTC) &lt;br /&gt;
**^ done. fleshed out critique, and added a bit about how taintdroid doesn&#039;t track implicit flow. Also reworded (the entire essay) for clarity where necessary/checked spelling. It would be a good idea for everyone to read it over once for spelling/clarity before thursday, just in case something doesn&#039;t make sense - sliske&lt;br /&gt;
* References&lt;br /&gt;
** The article has 61 references!  We can probably use some of them&lt;br /&gt;
**whee! reading papers and sticking in information as need be. Also working out how to cite properly, as there are two citations used currently&lt;br /&gt;
references added and citations taken care of. will go over fill in a few places where information may be lacking after class sliske&lt;br /&gt;
&lt;br /&gt;
List of information we need to find external sources for:&lt;br /&gt;
* History of taint analysis&lt;br /&gt;
* History of privacy research relating to smart phones&lt;br /&gt;
&lt;br /&gt;
== Work In Progress ==&lt;br /&gt;
&lt;br /&gt;
Log what you are working on *right now* so that other people don&#039;t try to do the same thing.  Make sure to clear your name from here when you are done.&lt;br /&gt;
&lt;br /&gt;
* Gregory Bint:  Research Problem&lt;br /&gt;
** Need to find some history on smart phone security research for the second part.&lt;br /&gt;
&lt;br /&gt;
* Gautam Akiwate:  Background Concepts&lt;br /&gt;
** Any resources on Dynamic taint Analysis would be appreciated!&lt;br /&gt;
&lt;br /&gt;
* Corey Ling: Contributions (Qi Zhang) &lt;br /&gt;
&lt;br /&gt;
* Trevor Malone: Critique&lt;br /&gt;
&lt;br /&gt;
* Sarah Liske: References and Questions, Clarity/Spelling.&lt;br /&gt;
&lt;br /&gt;
== Some Notes from the Video ==&lt;br /&gt;
&lt;br /&gt;
Tracking of privacy sensitive data through Dynamic Taint Analysis (aka. Taint Tracking).  The trick is to mark private data as it sourced, and then follow those marks until (unless) they leave the phone.&lt;br /&gt;
	&lt;br /&gt;
Android phones run Java apps, which are compiled into DEX, and then run on top of the Dalvik VM.  It is this VM that we modify so that we can support the storage and tracking of taint tags.&lt;br /&gt;
&lt;br /&gt;
Taint sources&lt;br /&gt;
* low -bandwidth sensors&lt;br /&gt;
** Location&lt;br /&gt;
** Accelerometer&lt;br /&gt;
* High-bandwidth sensors&lt;br /&gt;
** Mic&lt;br /&gt;
** Camera&lt;br /&gt;
* Information DB&lt;br /&gt;
** Address book&lt;br /&gt;
** SMS storage&lt;br /&gt;
* Device ID&lt;br /&gt;
** IMEI&lt;br /&gt;
** IMSI   (don&#039;t actually track this one because of false positives)&lt;br /&gt;
** ICC_ID&lt;br /&gt;
** Phone Number&lt;br /&gt;
&lt;br /&gt;
Taint sink  (where marked data can leave the phone)&lt;br /&gt;
* Network Taint Sink&lt;br /&gt;
&lt;br /&gt;
Taint propagation&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
Taint tags are stored in memory interleaved with the variables they are tracking&lt;br /&gt;
&lt;br /&gt;
Some standard Data Flow technique is used to propagate these tags, especially as one variable that is marked may be assigned to another, so now that variable needs to be tracked as well.&lt;br /&gt;
&lt;br /&gt;
Tracks explicit flows of data, not implicit&lt;br /&gt;
	To fully capture implicit flows, you need to do static analysis, which is hard with closed-source apps, and cannot be done real-time&lt;br /&gt;
	&lt;br /&gt;
Implicit flows are not tracked&lt;br /&gt;
* Implicit flows can involve &amp;quot;taint-scope&amp;quot;, tracking based on conditionals in code&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
=== Performance ===&lt;br /&gt;
&lt;br /&gt;
The goal is to create a real time tracking system, so the TaintDroid&#039;s performance impact is of some importance&lt;br /&gt;
&lt;br /&gt;
14% CPU overhead&lt;br /&gt;
4.4% memory overhead&lt;br /&gt;
&lt;br /&gt;
Macro benchmarks  (to get a feel for what the phone&#039;s usability is like with TD running)&lt;br /&gt;
* App load:  3%  (2ms) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Findings ===&lt;br /&gt;
&lt;br /&gt;
20 out of 30 tested applications share data in a way that is not expected.&lt;br /&gt;
&lt;br /&gt;
67 of 105 flagged pieces of data leaving the device had no obviously legitimate purpose (verified by the authors).&lt;br /&gt;
&lt;br /&gt;
Many apps sent location data and other unique identifiers to advertising servers.&lt;br /&gt;
&lt;br /&gt;
Most apps do not mention anything to the user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
&lt;br /&gt;
Tracks only explicit data flows.&lt;br /&gt;
&lt;br /&gt;
An application *could* launder the tags off of the data, if they really wanted to hide this sort of thing from TaintDroid.&lt;br /&gt;
&lt;br /&gt;
There are methods that could be used to protect against this, but they go against the goal of a light-weight, real-time tracking system.  TD is not necessarily about catching truly malicious programs, but rather just those that leak information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why do apps take this information?&lt;br /&gt;
* Lazy;  in the demo video, the wallpaper app seems to use the IMEI just as a ready made unique ID&lt;br /&gt;
* Overzealous;  the developer might thing they *need* the data for something, but actually &lt;br /&gt;
* Ads;  advertises do seem a little presumptuous in their data collection&lt;br /&gt;
* Spying;  bosses or spouses&lt;br /&gt;
* Malicious;  &lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
=== QA Period ===&lt;br /&gt;
&lt;br /&gt;
Q:  how do we prevent a malicious app from removing a taint attribute on a file&lt;br /&gt;
&lt;br /&gt;
A:  TD operates a too low a level for this to be a problem;  TD assumes that the native code is trusted&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Q:  It seems like you had a lot of false positives&lt;br /&gt;
&lt;br /&gt;
A:  The point of this tool was to identify privacy sensitive information as having left the phone, not whether or not a privacy violation has taken place.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Q: Now that TD is released; couldn&#039;t malicious apps use some of the methods described in the paper to get around it?    &lt;br /&gt;
&lt;br /&gt;
A: Well, yes, but it is not just about maliciousness, it could just laziness or over-zealous ad stuff.&lt;br /&gt;
&lt;br /&gt;
==Other Information==&lt;br /&gt;
&lt;br /&gt;
Hey guys, thought I would just post a generalized paragraph about our essay.&lt;br /&gt;
&lt;br /&gt;
In today’s society, Smartphones are the new big thing. To me that’s what makes this paper so interesting. This paper focuses on private information in android phones and the misuse of this information. The misuse of information includes the SIM card, the ID of the device, or the phone number. TaintDroid is used on smart phones with an efficient taint tracking and analysis system. It has the ability to track sensitive data from multiple sources and examines the misuse of such data. In their study, out of 80 popular third-party applications, TaintDroid monitored that 68 applications had potential misuse of user’s private data. This tool is great for knowing with applications are safe and which are not, so your private data can remained private.&lt;br /&gt;
&lt;br /&gt;
Also, we should really think of splitting up the work in some way. If some people have specific sections they would like to do lets figure that out now so we can divide the workload and get it done over the next couple of days. I don&#039;t personally care what part I&#039;m going to have to do, so lets get this going. Any other information people wanna post feel free the more the better, even if we don&#039;t end up using it.&lt;br /&gt;
&lt;br /&gt;
[[user:Tmalone|Trevor Malone]]&lt;br /&gt;
&lt;br /&gt;
Hey guys! Anything else we need to get done? Let me know and I can help in anyway possible.&lt;br /&gt;
&lt;br /&gt;
[[user:Tmalone|Trevor Malone]]&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5985</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5985"/>
		<updated>2010-12-01T19:46:15Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 3]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm 6]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf 8]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf 3]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf 9]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf 10]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (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 &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).&lt;br /&gt;
&lt;br /&gt;
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&amp;amp;rep=rep1&amp;amp;type=pdf 11], rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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&amp;amp;rep=rep1&amp;amp;type=pdf 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. [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.&lt;br /&gt;
&lt;br /&gt;
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] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf 11].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. &#039;&#039;Communications of the ACM 19, 5&#039;&#039; (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. [http://www.usenix.org/events/sec04/tech/chow/chow_html/ Understanding Data Lifetime via Whole System Simulation]. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[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)&lt;br /&gt;
&lt;br /&gt;
[6] http://news.bbc.co.uk/2/hi/technology/8559683.stm&lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006).&lt;br /&gt;
&lt;br /&gt;
[11] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5984</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5984"/>
		<updated>2010-12-01T19:44:55Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Questions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 3]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm 6]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf 8]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf 3]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf 9]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf 10]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (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 &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).&lt;br /&gt;
&lt;br /&gt;
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&amp;amp;rep=rep1&amp;amp;type=pdf 11], rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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&amp;amp;rep=rep1&amp;amp;type=pdf 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. [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.&lt;br /&gt;
&lt;br /&gt;
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] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf 11].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. Understanding Data Lifetime via Whole System Simulation. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[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)&lt;br /&gt;
&lt;br /&gt;
[6] http://news.bbc.co.uk/2/hi/technology/8559683.stm&lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006).&lt;br /&gt;
&lt;br /&gt;
[11] &lt;br /&gt;
&lt;br /&gt;
[] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5983</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5983"/>
		<updated>2010-12-01T19:44:31Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Contribution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 3]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm 6]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf 8]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf 3]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf 9]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf 10]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (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 &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).&lt;br /&gt;
&lt;br /&gt;
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&amp;amp;rep=rep1&amp;amp;type=pdf 11], rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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&amp;amp;rep=rep1&amp;amp;type=pdf 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. [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.&lt;br /&gt;
&lt;br /&gt;
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] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. Understanding Data Lifetime via Whole System Simulation. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[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)&lt;br /&gt;
&lt;br /&gt;
[6] http://news.bbc.co.uk/2/hi/technology/8559683.stm&lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006).&lt;br /&gt;
&lt;br /&gt;
[11] &lt;br /&gt;
&lt;br /&gt;
[] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5982</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5982"/>
		<updated>2010-12-01T19:44:30Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Critique */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 3]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm 6]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf 8]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf 3]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf 9]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf 10]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (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 &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).&lt;br /&gt;
&lt;br /&gt;
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&amp;amp;rep=rep1&amp;amp;type=pdf 12], rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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&amp;amp;rep=rep1&amp;amp;type=pdf 12] 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.&lt;br /&gt;
&lt;br /&gt;
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] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. Understanding Data Lifetime via Whole System Simulation. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[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)&lt;br /&gt;
&lt;br /&gt;
[6] http://news.bbc.co.uk/2/hi/technology/8559683.stm&lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006).&lt;br /&gt;
&lt;br /&gt;
[11] &lt;br /&gt;
&lt;br /&gt;
[] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5981</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5981"/>
		<updated>2010-12-01T19:43:36Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Contribution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 3]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm 6]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf 8]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf 3]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf 9]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf 10]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (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 &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).&lt;br /&gt;
&lt;br /&gt;
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&amp;amp;rep=rep1&amp;amp;type=pdf 12], rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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&amp;amp;rep=rep1&amp;amp;type=pdf 12] 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.&lt;br /&gt;
&lt;br /&gt;
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] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. Understanding Data Lifetime via Whole System Simulation. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[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)&lt;br /&gt;
&lt;br /&gt;
[6] http://news.bbc.co.uk/2/hi/technology/8559683.stm&lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006).&lt;br /&gt;
&lt;br /&gt;
[11] &lt;br /&gt;
&lt;br /&gt;
[] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5980</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5980"/>
		<updated>2010-12-01T19:38:15Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 3]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm 6]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf 8]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf 3]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf 9]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf 10]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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. [REF] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. [REF] Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).[REF]&lt;br /&gt;
&lt;br /&gt;
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [REF], 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, rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.[REF] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. Understanding Data Lifetime via Whole System Simulation. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[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)&lt;br /&gt;
&lt;br /&gt;
[6] http://news.bbc.co.uk/2/hi/technology/8559683.stm&lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006).&lt;br /&gt;
&lt;br /&gt;
[11] &lt;br /&gt;
&lt;br /&gt;
[] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5979</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5979"/>
		<updated>2010-12-01T19:37:33Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 3]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm 6]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf 8]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf 3]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf 9]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf 10]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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. [REF] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. [REF] Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).[REF]&lt;br /&gt;
&lt;br /&gt;
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [REF], 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, rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.[REF] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., ROSENBLUM, M., [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html Understanding Data Lifetime via Whole System Simulation] USENIX Secutiry &#039;04 &lt;br /&gt;
&lt;br /&gt;
[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)&lt;br /&gt;
&lt;br /&gt;
[6] http://news.bbc.co.uk/2/hi/technology/8559683.stm&lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006).&lt;br /&gt;
&lt;br /&gt;
[11] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., AND ROSENBLUM, M. Understanding Data Lifetime via Whole System Simulation. &#039;&#039;Proceedings of the 13th USENIX Security&lt;br /&gt;
Symposium&#039;&#039; (August 2004).&lt;br /&gt;
&lt;br /&gt;
[] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5978</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5978"/>
		<updated>2010-12-01T19:35:00Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Research problem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 3]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm 6]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf 8]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf 3]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf 9]&lt;br /&gt;
* 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?[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf 10]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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. [REF] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. [REF] Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).[REF]&lt;br /&gt;
&lt;br /&gt;
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [REF], 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, rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.[REF] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., ROSENBLUM, M., [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html Understanding Data Lifetime via Whole System Simulation] USENIX Secutiry &#039;04 &lt;br /&gt;
&lt;br /&gt;
[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)&lt;br /&gt;
&lt;br /&gt;
[6] http://news.bbc.co.uk/2/hi/technology/8559683.stm&lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006).&lt;br /&gt;
&lt;br /&gt;
[] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5977</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5977"/>
		<updated>2010-12-01T19:34:47Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 3]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm 6]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf 8]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf 3]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf 9]&lt;br /&gt;
* 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?[REF]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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. [REF] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. [REF] Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).[REF]&lt;br /&gt;
&lt;br /&gt;
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [REF], 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, rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.[REF] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., ROSENBLUM, M., [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html Understanding Data Lifetime via Whole System Simulation] USENIX Secutiry &#039;04 &lt;br /&gt;
&lt;br /&gt;
[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)&lt;br /&gt;
&lt;br /&gt;
[6] http://news.bbc.co.uk/2/hi/technology/8559683.stm&lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[10] CHUNG LAM, L., CHIUEH, T., [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.74.1478&amp;amp;rep=rep1&amp;amp;type=pdf A General Dynamic Information Flow Tracking Framework for Security Applications]. &#039;&#039;Proceedings of the Annual Computer Security Applications Conference (ACSAC)&#039;&#039; (2006).&lt;br /&gt;
&lt;br /&gt;
[] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5976</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5976"/>
		<updated>2010-12-01T19:25:46Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 3]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm 6]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf 8]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf 3]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf 9]&lt;br /&gt;
* 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?[REF]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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. [REF] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. [REF] Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).[REF]&lt;br /&gt;
&lt;br /&gt;
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [REF], 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, rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.[REF] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., ROSENBLUM, M., [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html Understanding Data Lifetime via Whole System Simulation] USENIX Secutiry &#039;04 &lt;br /&gt;
&lt;br /&gt;
[5] D CEARA, ML POTET et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] GINP ENSIMAG GoogleCode(2009)&lt;br /&gt;
&lt;br /&gt;
[6] http://news.bbc.co.uk/2/hi/technology/8559683.stm&lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[9] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5975</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5975"/>
		<updated>2010-12-01T19:25:25Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 3]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm 6]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf 8]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf 3]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf 9]&lt;br /&gt;
* 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?[REF]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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. [REF] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. [REF] Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).[REF]&lt;br /&gt;
&lt;br /&gt;
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [REF], 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, rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.[REF] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., ROSENBLUM, M., [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html Understanding Data Lifetime via Whole System Simulation] USENIX Secutiry &#039;04 &lt;br /&gt;
&lt;br /&gt;
[5] D CEARA, ML POTET et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] GINP ENSIMAG GoogleCode(2009)&lt;br /&gt;
&lt;br /&gt;
[6] http://news.bbc.co.uk/2/hi/technology/8559683.stm&lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[] ZHU, Y., JUNG, J., KOHNO, T., WETHERALL, D., [http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf Privacy Scope: A Precise Information Flow Tracking System For Finding Application Leaks]. &#039;&#039;Technical Report No. UCB/EECS-2009-145&#039;&#039; (2009)&lt;br /&gt;
&lt;br /&gt;
[] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5974</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5974"/>
		<updated>2010-12-01T19:23:58Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Research problem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 3]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm 6]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf 8]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf 3]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-145.pdf 9]&lt;br /&gt;
* 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?[REF]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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. [REF] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. [REF] Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).[REF]&lt;br /&gt;
&lt;br /&gt;
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [REF], 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, rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.[REF] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., ROSENBLUM, M., [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html Understanding Data Lifetime via Whole System Simulation] USENIX Secutiry &#039;04 &lt;br /&gt;
&lt;br /&gt;
[5] D CEARA, ML POTET et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] GINP ENSIMAG GoogleCode(2009)&lt;br /&gt;
&lt;br /&gt;
[6] http://news.bbc.co.uk/2/hi/technology/8559683.stm&lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5973</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5973"/>
		<updated>2010-12-01T19:20:21Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Static Taint Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 3]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm 6]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf 8]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf 3]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[REF]&lt;br /&gt;
* 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?[REF]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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. [REF] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. [REF] Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).[REF]&lt;br /&gt;
&lt;br /&gt;
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [REF], 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, rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.[REF] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., ROSENBLUM, M., [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html Understanding Data Lifetime via Whole System Simulation] USENIX Secutiry &#039;04 &lt;br /&gt;
&lt;br /&gt;
[5] D CEARA, ML POTET et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] GINP ENSIMAG GoogleCode(2009)&lt;br /&gt;
&lt;br /&gt;
[6] http://news.bbc.co.uk/2/hi/technology/8559683.stm&lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5967</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5967"/>
		<updated>2010-12-01T18:16:16Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [REF]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm 6]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf 8]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf 3]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[REF]&lt;br /&gt;
* 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?[REF]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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. [REF] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. [REF] Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).[REF]&lt;br /&gt;
&lt;br /&gt;
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [REF], 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, rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.[REF] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[2] HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., ROSENBLUM, M., [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html Understanding Data Lifetime via Whole System Simulation] USENIX Secutiry &#039;04 &lt;br /&gt;
&lt;br /&gt;
[5] D CEARA, ML POTET et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] GINP ENSIMAG GoogleCode(2009)&lt;br /&gt;
&lt;br /&gt;
[6] http://news.bbc.co.uk/2/hi/technology/8559683.stm&lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&lt;br /&gt;
&lt;br /&gt;
[8] NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[] YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5966</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5966"/>
		<updated>2010-12-01T18:16:03Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [REF]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm 6]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf 8]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf 3]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[REF]&lt;br /&gt;
* 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?[REF]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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. [REF] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. [REF] Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).[REF]&lt;br /&gt;
&lt;br /&gt;
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [REF], 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, rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.[REF] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[2]HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[3] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&lt;br /&gt;
&lt;br /&gt;
[4] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., ROSENBLUM, M., [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html Understanding Data Lifetime via Whole System Simulation] USENIX Secutiry &#039;04 &lt;br /&gt;
&lt;br /&gt;
[5]D CEARA, ML POTET et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] GINP ENSIMAG GoogleCode(2009)&lt;br /&gt;
&lt;br /&gt;
[6] http://news.bbc.co.uk/2/hi/technology/8559683.stm&lt;br /&gt;
&lt;br /&gt;
[7] SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&lt;br /&gt;
&lt;br /&gt;
[8]NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)&lt;br /&gt;
&lt;br /&gt;
[]YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5965</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5965"/>
		<updated>2010-12-01T18:15:54Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Research problem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [REF]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm 6]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf 8]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf 3]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[REF]&lt;br /&gt;
* 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?[REF]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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. [REF] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. [REF] Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).[REF]&lt;br /&gt;
&lt;br /&gt;
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [REF], 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, rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.[REF] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[]D CEARA, ML POTET et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] GINP ENSIMAG GoogleCode(2009)&lt;br /&gt;
&lt;br /&gt;
[] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[]YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., ROSENBLUM, M., [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec:future Understanding Data Lifetime via Whole System Simulation] USENIX Secutiry &#039;04 &lt;br /&gt;
&lt;br /&gt;
[]HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[]SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&lt;br /&gt;
&lt;br /&gt;
[]NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5964</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5964"/>
		<updated>2010-12-01T18:14:09Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Taint Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf 2]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec 4]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf 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. [REF]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[REF]&lt;br /&gt;
* 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?[REF]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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. [REF] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. [REF] Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).[REF]&lt;br /&gt;
&lt;br /&gt;
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [REF], 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, rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.[REF] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[]D CEARA, ML POTET et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] GINP ENSIMAG GoogleCode(2009)&lt;br /&gt;
&lt;br /&gt;
[] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[]YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., ROSENBLUM, M., [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec:future Understanding Data Lifetime via Whole System Simulation] USENIX Secutiry &#039;04 &lt;br /&gt;
&lt;br /&gt;
[]HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[]SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&lt;br /&gt;
&lt;br /&gt;
[]NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5963</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5963"/>
		<updated>2010-12-01T18:12:29Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Information Flow */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf 1] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf]  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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf] 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. [REF]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[REF]&lt;br /&gt;
* 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?[REF]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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. [REF] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. [REF] Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).[REF]&lt;br /&gt;
&lt;br /&gt;
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [REF], 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, rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.[REF] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[]D CEARA, ML POTET et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] GINP ENSIMAG GoogleCode(2009)&lt;br /&gt;
&lt;br /&gt;
[] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[]YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., ROSENBLUM, M., [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec:future Understanding Data Lifetime via Whole System Simulation] USENIX Secutiry &#039;04 &lt;br /&gt;
&lt;br /&gt;
[]HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[]SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&lt;br /&gt;
&lt;br /&gt;
[]NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5961</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5961"/>
		<updated>2010-12-01T18:09:41Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Additional questions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf]  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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf] 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. [REF]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[REF]&lt;br /&gt;
* 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?[REF]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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. [REF] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. [REF] Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).[REF]&lt;br /&gt;
&lt;br /&gt;
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [REF], 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, rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.[REF] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[]D CEARA, ML POTET et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] GINP ENSIMAG GoogleCode(2009)&lt;br /&gt;
&lt;br /&gt;
[] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[]YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., ROSENBLUM, M., [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec:future Understanding Data Lifetime via Whole System Simulation] USENIX Secutiry &#039;04 &lt;br /&gt;
&lt;br /&gt;
[]HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[]SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&lt;br /&gt;
&lt;br /&gt;
[]NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5959</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5959"/>
		<updated>2010-12-01T18:08:30Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Static Taint Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf]  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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf] 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. [REF]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[REF]&lt;br /&gt;
* 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?[REF]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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. [REF] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. [REF] Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).[REF]&lt;br /&gt;
&lt;br /&gt;
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [REF], 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, rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.[REF] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** An application could use implicit flow to derive data from tainted objects, as TaintDroid has no way to inspect implicit flow dynamically, due to no branch structures being maintained at the JVM layer, where TaintDroid has been 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[]D CEARA, ML POTET et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] GINP ENSIMAG GoogleCode(2009)&lt;br /&gt;
&lt;br /&gt;
[] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[]YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., ROSENBLUM, M., [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec:future Understanding Data Lifetime via Whole System Simulation] USENIX Secutiry &#039;04 &lt;br /&gt;
&lt;br /&gt;
[]HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[]SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&lt;br /&gt;
&lt;br /&gt;
[]NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5958</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5958"/>
		<updated>2010-12-01T18:07:42Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Taint Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf]  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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [REF] 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. [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone)&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[REF]&lt;br /&gt;
* 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?[REF]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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. [REF] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. [REF] Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).[REF]&lt;br /&gt;
&lt;br /&gt;
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [REF], 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, rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.[REF] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** An application could use implicit flow to derive data from tainted objects, as TaintDroid has no way to inspect implicit flow dynamically, due to no branch structures being maintained at the JVM layer, where TaintDroid has been 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[]D CEARA, ML POTET et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] GINP ENSIMAG GoogleCode(2009)&lt;br /&gt;
&lt;br /&gt;
[] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[]YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., ROSENBLUM, M., [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec:future Understanding Data Lifetime via Whole System Simulation] USENIX Secutiry &#039;04 &lt;br /&gt;
&lt;br /&gt;
[]HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[]SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&lt;br /&gt;
&lt;br /&gt;
[]NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5957</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5957"/>
		<updated>2010-12-01T18:06:28Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Research problem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf]  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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [REF] 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. [REF]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone :D)&amp;lt;br&amp;gt; For more detailed information on Taint Analysis refer &amp;quot;Detecting Software Vulnerabilities Static Taint Analysis&amp;quot;[2]&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.&lt;br /&gt;
* 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.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.1353&amp;amp;rep=rep1&amp;amp;type=pdf]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[REF]&lt;br /&gt;
* 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?[REF]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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. [REF] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. [REF] Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).[REF]&lt;br /&gt;
&lt;br /&gt;
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [REF], 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, rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.[REF] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** An application could use implicit flow to derive data from tainted objects, as TaintDroid has no way to inspect implicit flow dynamically, due to no branch structures being maintained at the JVM layer, where TaintDroid has been 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[]D CEARA, ML POTET et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] GINP ENSIMAG GoogleCode(2009)&lt;br /&gt;
&lt;br /&gt;
[] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[]YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., ROSENBLUM, M., [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec:future Understanding Data Lifetime via Whole System Simulation] USENIX Secutiry &#039;04 &lt;br /&gt;
&lt;br /&gt;
[]HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[]SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&lt;br /&gt;
&lt;br /&gt;
[]NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5956</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5956"/>
		<updated>2010-12-01T18:03:36Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf]  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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [REF] 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. [REF]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone :D)&amp;lt;br&amp;gt; For more detailed information on Taint Analysis refer &amp;quot;Detecting Software Vulnerabilities Static Taint Analysis&amp;quot;[2]&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.[REF]&lt;br /&gt;
* 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.[REF]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[REF]&lt;br /&gt;
* 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?[REF]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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. [REF] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. [REF] Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).[REF]&lt;br /&gt;
&lt;br /&gt;
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [REF], 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, rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.[REF] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** An application could use implicit flow to derive data from tainted objects, as TaintDroid has no way to inspect implicit flow dynamically, due to no branch structures being maintained at the JVM layer, where TaintDroid has been 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&lt;br /&gt;
&lt;br /&gt;
[]D CEARA, ML POTET et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] GINP ENSIMAG GoogleCode(2009)&lt;br /&gt;
&lt;br /&gt;
[] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[]YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., ROSENBLUM, M., [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec:future Understanding Data Lifetime via Whole System Simulation] USENIX Secutiry &#039;04 &lt;br /&gt;
&lt;br /&gt;
[]HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
&lt;br /&gt;
[]SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&lt;br /&gt;
&lt;br /&gt;
[]NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007)&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5955</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5955"/>
		<updated>2010-12-01T18:03:05Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf]  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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [REF] 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. [REF]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone :D)&amp;lt;br&amp;gt; For more detailed information on Taint Analysis refer &amp;quot;Detecting Software Vulnerabilities Static Taint Analysis&amp;quot;[2]&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.[REF]&lt;br /&gt;
* 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.[REF]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[REF]&lt;br /&gt;
* 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?[REF]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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. [REF] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. [REF] Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).[REF]&lt;br /&gt;
&lt;br /&gt;
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [REF], 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, rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.[REF] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** An application could use implicit flow to derive data from tainted objects, as TaintDroid has no way to inspect implicit flow dynamically, due to no branch structures being maintained at the JVM layer, where TaintDroid has been 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&amp;lt;br&amp;gt;&lt;br /&gt;
[]D CEARA, ML POTET et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] GINP ENSIMAG GoogleCode(2009)&amp;lt;br&amp;gt;&lt;br /&gt;
[] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[]YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis]. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
[] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., ROSENBLUM, M., [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec:future Understanding Data Lifetime via Whole System Simulation] USENIX Secutiry &#039;04 &amp;lt;br&amp;gt;&lt;br /&gt;
[]HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
[]SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&amp;lt;br&amp;gt;&lt;br /&gt;
[]NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007) &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5954</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5954"/>
		<updated>2010-12-01T18:02:41Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf]  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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [REF] 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. [REF]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone :D)&amp;lt;br&amp;gt; For more detailed information on Taint Analysis refer &amp;quot;Detecting Software Vulnerabilities Static Taint Analysis&amp;quot;[2]&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.[REF]&lt;br /&gt;
* 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.[REF]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[REF]&lt;br /&gt;
* 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?[REF]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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. [REF] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. [REF] Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).[REF]&lt;br /&gt;
&lt;br /&gt;
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [REF], 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, rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.[REF] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** An application could use implicit flow to derive data from tainted objects, as TaintDroid has no way to inspect implicit flow dynamically, due to no branch structures being maintained at the JVM layer, where TaintDroid has been 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&amp;lt;br&amp;gt;&lt;br /&gt;
[]D CEARA, ML POTET et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] GINP ENSIMAG GoogleCode(2009)&amp;lt;br&amp;gt;&lt;br /&gt;
[] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[]YIN, H., SONG, D., EGELE, M., KRUEGEL, C., AND KIRDA, E. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf Panorama: Capturing system-wide Information Flow for Malware Detection and Analysis. In &#039;&#039;Proceedings of ACM Computer and Communications Security (2007).&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
[] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., ROSENBLUM, M., [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec:future Understanding Data Lifetime via Whole System Simulation] USENIX Secutiry &#039;04 &amp;lt;br&amp;gt;&lt;br /&gt;
[]HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
[]SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&amp;lt;br&amp;gt;&lt;br /&gt;
[]NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007) &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5953</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5953"/>
		<updated>2010-12-01T18:00:41Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Critique */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf]  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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [REF] 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. [REF]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone :D)&amp;lt;br&amp;gt; For more detailed information on Taint Analysis refer &amp;quot;Detecting Software Vulnerabilities Static Taint Analysis&amp;quot;[2]&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.[REF]&lt;br /&gt;
* 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.[REF]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[REF]&lt;br /&gt;
* 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?[REF]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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. [REF] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. [REF] Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).[REF]&lt;br /&gt;
&lt;br /&gt;
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [REF], 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, rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.[REF] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** An application could use implicit flow to derive data from tainted objects, as TaintDroid has no way to inspect implicit flow dynamically, due to no branch structures being maintained at the JVM layer, where TaintDroid has been 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&amp;lt;br&amp;gt;&lt;br /&gt;
[]D CEARA, ML POTET et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] GINP ENSIMAG GoogleCode(2009)&amp;lt;br&amp;gt;&lt;br /&gt;
[] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., ROSENBLUM, M., [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec:future Understanding Data Lifetime via Whole System Simulation] USENIX Secutiry &#039;04 &amp;lt;br&amp;gt;&lt;br /&gt;
[]HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
[]SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&amp;lt;br&amp;gt;&lt;br /&gt;
[]NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007) &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5952</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5952"/>
		<updated>2010-12-01T18:00:33Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Critique */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf]  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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [REF] 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. [REF]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone :D)&amp;lt;br&amp;gt; For more detailed information on Taint Analysis refer &amp;quot;Detecting Software Vulnerabilities Static Taint Analysis&amp;quot;[2]&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.[REF]&lt;br /&gt;
* 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.[REF]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[REF]&lt;br /&gt;
* 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?[REF]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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. [REF] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. [REF] Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).[REF]&lt;br /&gt;
&lt;br /&gt;
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [REF], 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, rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.[REF] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 1] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** An application could use implicit flow to derive data from tainted objects, as TaintDroid has no way to inspect implicit flow dynamically, due to no branch structures being maintained at the JVM layer, where TaintDroid has been 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&amp;lt;br&amp;gt;&lt;br /&gt;
[]D CEARA, ML POTET et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] GINP ENSIMAG GoogleCode(2009)&amp;lt;br&amp;gt;&lt;br /&gt;
[] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., ROSENBLUM, M., [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec:future Understanding Data Lifetime via Whole System Simulation] USENIX Secutiry &#039;04 &amp;lt;br&amp;gt;&lt;br /&gt;
[]HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
[]SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&amp;lt;br&amp;gt;&lt;br /&gt;
[]NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007) &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5951</id>
		<title>COMP 3000 Essay 2 2010 Question 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_8&amp;diff=5951"/>
		<updated>2010-12-01T18:00:22Z</updated>

		<summary type="html">&lt;p&gt;Sliske: /* Critique */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones=&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
* William Enck, Patrick McDaniel &#039;&#039;The Pennsylvania State University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Peter Gilbert, Landon P. Cox &#039;&#039;Duke University&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Byung-Gon Chun, Jaeyeon Jung Anmol N. Sheth &#039;&#039;Intel Labs&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://appanalysis.org/tdroid10.pdf Direct Link]&lt;br /&gt;
&lt;br /&gt;
[http://www.appanalysis.org/ Official Website]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=qnLujX1Dw4Y Video Demonstration]&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
To follow these 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.&amp;lt;br&amp;gt;&lt;br /&gt;
==Information Flow==&lt;br /&gt;
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] Information Flow Theory tries to quantify this flow of information into a mathematical model.&amp;lt;br&amp;gt; &lt;br /&gt;
In a security model the information flow can be categorized into:&amp;lt;br&amp;gt; &lt;br /&gt;
===Explicit Flow===&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf] The breach occurs because information is now more visible than it was intended to be. An example of explicit flow is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
notsecure = secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The information in &amp;lt;i&amp;gt;&#039;secure&#039;&amp;lt;/i&amp;gt; which is PRIVATE is transferred to &amp;lt;i&amp;gt;&#039;notsecure&#039;&amp;lt;/i&amp;gt; which is PUBLIC which is an information leak. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Implicit Flow===&lt;br /&gt;
Implicit Flow is when information subject to security classifications is deduced indirectly. This the leakage of information occurs through the program control flow. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf] Depending on the flow of the program the secure information can be compromised, as shown below&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;PRIVATE VAR &amp;lt;big&amp;gt;secure&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
PUBLIC VAR &amp;lt;big&amp;gt;notsecure&amp;lt;br&amp;gt;&lt;br /&gt;
if secure=&amp;quot;blah blah&amp;quot; then:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=1&amp;lt;br&amp;gt;&lt;br /&gt;
else:&amp;lt;br&amp;gt;&lt;br /&gt;
insecure=0&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since can determine the value of information in &amp;lt;i&amp;gt;secure&amp;lt;/i&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==Taint Analysis==&lt;br /&gt;
&lt;br /&gt;
The basic premise of taint analysis is to follow the information flow of &amp;quot;tainted&amp;quot; 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 &amp;quot;tainted&amp;quot;. Through various operations the &amp;quot;taint&amp;quot; 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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic Taint Analysis===&lt;br /&gt;
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. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf]  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. [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Static Taint Analysis===&lt;br /&gt;
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. [REF] 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. [REF]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mathematical Model===&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;code&amp;gt;For all variables V = {T,U} ;T are tainted and U are untainted:&amp;lt;br&amp;gt;&lt;br /&gt;
Using &amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;: V x V -&amp;gt; V, x, y ∈ V &amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = T; x = T OR y = T&amp;lt;br&amp;gt;&lt;br /&gt;
x&amp;lt;big&amp;gt;⊕&amp;lt;/big&amp;gt;y = U, if x = U AND y = U&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/big&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;Note: The paper talks about Dynamic Taint Analysis. TaintDroid makes ingenious use of &amp;quot;taint&amp;quot; to taint variables that are of value and tracks their progress. Though in the actual context of Taint Analysis &amp;quot;taint&amp;quot; is used for untrusted information however in this case the &amp;quot;taint&amp;quot; variables are infact important private data. (Just in case if it confused someone :D)&amp;lt;br&amp;gt; For more detailed information on Taint Analysis refer &amp;quot;Detecting Software Vulnerabilities Static Taint Analysis&amp;quot;[2]&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;smart&amp;quot;. 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. [http://news.bbc.co.uk/2/hi/technology/8559683.stm]&lt;br /&gt;
&lt;br /&gt;
A telling example of this is a wallpaper application that sends your phone number back to the developer.[http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The strategy they chose is called Dynamic Taint Analysis, sometimes called Taint Tracking. The basic idea being to mark (or &#039;&#039;taint&#039;&#039;) 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Some implementation difficulties are:&lt;br /&gt;
* 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 &amp;quot;usable&amp;quot; by the end user, and so the system must be truly light weight.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf]&lt;br /&gt;
* Third party applications arrive in a compiled format; we cannot analyze their source code.[REF]&lt;br /&gt;
* 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.[REF]&lt;br /&gt;
* Applications can share information with other applications, meaning that our tracking has to work across multiple processes.[REF]&lt;br /&gt;
* 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?[REF]&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
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 &amp;quot;CPU-bound micro-benchmark and imposes negligible overhead on interactive third-party applications.&amp;quot;(Enck et al., YEAR, p1)&lt;br /&gt;
&lt;br /&gt;
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. [REF] 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 &amp;quot;patch the taint propagation on return.&amp;quot; (Enck et al., YEAR, p3) so they can keep track of information transfer via native code. [REF] Finally, by modifying the network interface and secondary storage interfaces they are able to provide file-level taint tracking which enables them to ensure &amp;quot;persistent information conservatively retains its taint markings.&amp;quot; (Enck et al., YEAR, p3).[REF]&lt;br /&gt;
&lt;br /&gt;
Another contribution of TaintDroid is accuracy of tracking sensitive data. Unlike existing solutions that rely on heavy-weight, whole-system emulation [REF], 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, rely on instruction-level dynamic taint analysis using whole system emulation. This method can 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][http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.3789&amp;amp;rep=rep1&amp;amp;type=pdf] 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.&lt;br /&gt;
&lt;br /&gt;
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.[REF] 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.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
Challenges of monitoring network disclosure of privacy sensitive information are well outlined, as are TaintDroid&#039;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. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;Android System&#039; 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.&lt;br /&gt;
&lt;br /&gt;
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 &#039;TaintCheck&#039; on an x86 platform.[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 13] 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 &#039;TaintCheck&#039; 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 &#039;application binary&#039; 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&#039;t be much of a concern. This can even allow TaintDroid to incorporate signature based detection of &#039;malacious applications&#039;.&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
Possible exam questions and brief answers are listed below, along with the section to go to to find more information pertaining to that question.&lt;br /&gt;
&lt;br /&gt;
===Anil&#039;s questions===&lt;br /&gt;
* What is one source of false positives in TaintDroid? (In other words, what kind of code/data behavior leads to false alarms?)&lt;br /&gt;
** 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)&lt;br /&gt;
* What part of Android was modified for TaintDroid? Is this part of Android&#039;s kernel? Explain briefly. &lt;br /&gt;
** 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 &amp;quot;low-level&amp;quot; point of the system to implement taint tracking. (Contribution)&lt;br /&gt;
&lt;br /&gt;
===Additional questions===&lt;br /&gt;
* Although TaintDroid is adept at catching information leak, there are ways an application can bypass the TaintDroid filter. Describe one. &lt;br /&gt;
** An application could use implicit flow to derive data from tainted objects, as TaintDroid has no way to inspect implicit flow dynamically, due to no branch structures being maintained at the JVM layer, where TaintDroid has been 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&amp;amp;rep=rep1&amp;amp;type=pdf].&lt;br /&gt;
* hmmm&lt;br /&gt;
** words go here&lt;br /&gt;
* hmmmmmmmmmm&lt;br /&gt;
** words go here&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[] DENNING, D. E. [http://www.cs.georgetown.edu/~denning/infosec/lattice76.pdf A Lattice Model of Secure Information Flow]. Communications of the ACM 19, 5 (May 1976), 236–243.&amp;lt;br&amp;gt;&lt;br /&gt;
[]D CEARA, ML POTET et.al [http://tanalysis.googlecode.com/files/DumitruCeara_BSc.pdf Detecting Software Vulnerabilities Static Taint Analysis] GINP ENSIMAG GoogleCode(2009)&amp;lt;br&amp;gt;&lt;br /&gt;
[] NEWSOME,J.,AND SONG,D. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.2141&amp;amp;rep=rep1&amp;amp;type=pdf 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)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[] CHOW, J., PFAFF, B., GARFINKEL, T., CHRISTOPHER, K., ROSENBLUM, M., [http://www.usenix.org/events/sec04/tech/chow/chow_html/index.html#sec:future Understanding Data Lifetime via Whole System Simulation] USENIX Secutiry &#039;04 &amp;lt;br&amp;gt;&lt;br /&gt;
[]HALDAR, V., CHANDRA, D., FRANZ, M. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.94.3118&amp;amp;rep=rep1&amp;amp;type=pdf Dynamic Taint Propagation for Java]. University of California.&lt;br /&gt;
[]SMITH, E. [http://www.pskl.us/wp/wp-content/uploads/2010/09/iPhone-Applications-Privacy-Issues.pdf iPhone Applications &amp;amp; Privacy Issues: An Analysis of Application Transmission of iPhone Unique Device Identifiers (UDIDs).] http://pskl.us&amp;lt;br&amp;gt;&lt;br /&gt;
[]NAIR, S. K., SIMPSON, P. N., CRISPO, B., AND TANENBAUM, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.129.2676&amp;amp;rep=rep1&amp;amp;type=pdf A. S. A Virtual Machine Based Information Flow Control Systemfor Policy Enforcement.] International Workshop&lt;br /&gt;
on Run Time Enforcement for Mobile and Distributed Systems (REM 2007) &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sliske</name></author>
	</entry>
</feed>