<div dir="ltr"><div><div><div><div>Hi,<br><br></div>Oh sorry, I thought you forgot to update SourcesandSinks.txt.<br><br><br></div><div>Final data flow results are stored in InfoflowResults object. I need to create a graph as it is difficult to understand in console. For this I have looked through soot API documentation. The nearest i could get is to the class InfoFlowAnalysis, but none of the methods defined in this class has InfoflowResults object as argument.<br><br></div>Likewise with CallGraph object, we can create callgraph in dot format,  How can I create dataflow dependency graph from InfoflowResults object ?<br><br></div><div><br></div>Regards<br></div>Lokesh Jain<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 5, 2015 at 3:49 PM, Steven Arzt <span dir="ltr">&lt;<a href="mailto:Steven.Arzt@cased.de" target="_blank">Steven.Arzt@cased.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="DE"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">Hi Lokesh,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">The SourcesAndSinks.txt file shipped with FlowDroid is just an example. We have a project called SuSi (published at NDSS’14) in which we use machine learning to automatically derive an almost complete set of sources and sinks from the Android API implementation. To be able to better compare FlowDroid with other tools, we however restricted ourselves to the small set. SuSi uses the same format as FlowDroid, so you can simply copy over the file is you want.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">The command-line application is only an example of how to use FlowDroid. It was never meant to be used as the main way of interacting with the data flow engine. That’s also why it is implemented in a class called “soot.jimple.infoflow.android.TestApps.Test. You can look into what we do there and take it as an example of how to use the FlowDroid API. The API gives you the path, sources, and sinks neatly in data objects. The most interesting method should be “runAnalysis”.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">Best regards,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">  Steven<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">Von:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> LOKESH JAIN [mailto:<a href="mailto:lokeshjain92@gmail.com" target="_blank">lokeshjain92@gmail.com</a>] <br><b>Gesendet:</b> Donnerstag, 5. Februar 2015 11:15<br><b>An:</b> Steven Arzt<br><b>Cc:</b> <a href="mailto:soot-list@googlegroups.com" target="_blank">soot-list@googlegroups.com</a>; Soot list; <a href="mailto:soot-list@cs.mcgill.ca" target="_blank">soot-list@cs.mcgill.ca</a></span></p><div><div class="h5"><br><b>Betreff:</b> Re: [Soot-list] Help Regarding Intra and Inter Procedural Analysis<u></u><u></u></div></div><p></p><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><div><div><div><div><p class="MsoNormal">Hi,<u></u><u></u></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">Thanks for the reply Steven.<br><br>Yes i have increased that heap size to 3GB. I have followed the steps from <a href="https://github.com/secure-software-engineering/soot-infoflow-android/wiki" target="_blank">https://github.com/secure-software-engineering/soot-infoflow-android/wiki</a> for eclipse. There it&#39;s mentioned that i need to import Heros Project. <br><br>It&#39;s working when i decrease the --aplength to 4. <u></u><u></u></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">I have tried --pathalgo contextsensitive, output of this is on command line which is very messy to understand. Is there a way that i could get a graph depicting these paths that would be easily understanble.?<u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black" lang="EN-US">*Suggestion*</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black" lang="EN-US">Please update the SourcesAndSinks.txt. It does not contain some important sources and sinks eg. gettext() function is missing from this text file.</span><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:black" lang="EN-US">Thanks &amp; Regards<br>Lokesh Jain</span><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">On Thu, Feb 5, 2015 at 2:59 PM, Steven Arzt &lt;<a href="mailto:Steven.Arzt@cased.de" target="_blank">Steven.Arzt@cased.de</a>&gt; wrote:<u></u><u></u></p><div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Hi Lokesh,</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">I am the maintainer of the FlowDroid project.</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">If you get an OutOfMemory exception or the analysis is simply taking forever, the most likely reason is that you run out of memory. Are you sure that you actually increased the Java heap size to 3 GB using the –Xmx3g VM parameter?</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">Additionally, your FlowDroid installation seems to be out of date. Where did you download it from? We don’t use the Heros solver anymore and that change has been done quite a while ago. If you just need a JAR file, use our nightly builds as described in the wiki: <a href="https://github.com/secure-software-engineering/soot-infoflow-android/wiki" target="_blank">https://github.com/secure-software-engineering/soot-infoflow-android/wiki</a>. If you want the code, make sure to use the “develop” branch, not “master”.</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">The wiki also contains a number of options with which you can configure the tradeoff between precision and performance. If you still run short on memory even with the newest version of FlowDroid, you might try those options.</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">It’s good that you use the official Android JARs. Do *<b>not</b>* use those from the Sable repository on Github. I think we should really add a disclaimer to that repository at some point. Those are complete implementations of the Android API extracted from emulators or real devices which is unnecessary for almost all analyses. In FlowDroid, we have other means of dealing with the Android API. Instead, use the JAR files shipped with Google’s official Android SDK, you can find them in the “platforms” folder of you SDK installation directory. This can make a difference of tens of gigabytes of memory consumption.</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">Your older questions looks like you are interested in the path, i.e., the statements over which the taint was propagated. FlowDroid can do that for you. You need to select a path reconstruction algorithm which supports full paths, not only source-to-sink connections. Try “--pathalgo contextsensitive” on the command-line application, that should do the trick. However, note that path tracking does add some performance penalty.</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">Best regards,</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US">  Steven</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:13.5pt;font-family:&quot;Courier New&quot;;color:black" lang="EN-US">M.Sc. M.Sc. Steven Arzt</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black" lang="EN-US">Secure Software Engineering Group (SSE)</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black" lang="EN-US">European Center for Security and Privacy by Design (EC SPRIDE) </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">Rheinstraße 75</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">D-64293 Darmstadt</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">Phone: +49 61 51 869-336</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">Fax: +49 61 51 16-72118</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black" lang="EN-US">eMail: </span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black"><a href="mailto:steven.arzt@ec-spride.de" target="_blank"><span lang="EN-US">steven.arzt@ec-spride.de</span></a></span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">Web: <a href="http://sse.ec-spride.de/" target="_blank">http://sse.ec-spride.de</a></span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">Von:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> LOKESH JAIN [mailto:<a href="mailto:lokeshjain92@gmail.com" target="_blank">lokeshjain92@gmail.com</a>] <br><b>Gesendet:</b> Donnerstag, 5. Februar 2015 10:19<br><b>An:</b> <a href="mailto:soot-list@googlegroups.com" target="_blank">soot-list@googlegroups.com</a>; Steven Arzt; Soot list; <a href="mailto:soot-list@cs.mcgill.ca" target="_blank">soot-list@cs.mcgill.ca</a><br><b>Betreff:</b> Re: [Soot-list] Help Regarding Intra and Inter Procedural Analysis</span><u></u><u></u></p><div><div><p class="MsoNormal"> <u></u><u></u></p><div><div><div><div><p class="MsoNormal" style="margin-bottom:12.0pt">Hi,<br><br>I am getting memory error using flowdroid. I am using 3GB memory for 398.1 kB android application. I am using official android.jar file of 21.8 MB(android-19).<br><br>[Thread-4] ERROR heros.solver.IDESolver - Worker thread execution failed: GC overhead limit exceeded<br>java.lang.OutOfMemoryError: GC overhead limit exceeded<u></u><u></u></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">How do i resolve this? Also please help me with my previous question posted in the same thread<u></u><u></u></p></div><p class="MsoNormal">Thanks &amp; Regards<u></u><u></u></p></div><p class="MsoNormal">Lokesh Jain<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p><div><p class="MsoNormal">On Wed, Feb 4, 2015 at 10:18 PM, LOKESH JAIN &lt;<a href="mailto:lokeshjain92@gmail.com" target="_blank">lokeshjain92@gmail.com</a>&gt; wrote:<u></u><u></u></p><div><div><div><div><div><div><div><div><p class="MsoNormal" style="margin-bottom:12.0pt">Hi,<u></u><u></u></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">Thanks for the reply.<u></u><u></u></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">Eric, yeah it&#39;s notifying me the flows but that&#39;s not only what i want. I need to analyze the data flow.<br><br>For eg. in the RV2013.apk i got the o/p<br>Found a flow to sink virtualinvoke $r4.&lt;android.telephony.SmsManager: void sendTextMessage(java.lang.String,java.lang.String,java.lang.String,android.app.PendingIntent,android.app.PendingIntent)&gt;($r6, null, $r7, null, null) on line 31, from the following sources:<br>    - $r1 = virtualinvoke $r0.&lt;de.ecspride.RV2013: android.view.View findViewById(int)&gt;(2131165187) (in &lt;de.ecspride.RV2013: void sendSms(android.view.View)&gt;)<br>    - $r1 = virtualinvoke $r0.&lt;de.ecspride.RV2013: android.view.View findViewById(int)&gt;(2131165184) (in &lt;de.ecspride.RV2013: void sendSms(android.view.View)&gt;)<u></u><u></u></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">I actually need the analyses(some data dependency graph) that could depict the flow ,a node sendsms() followed by(i.e edge) the node gettext() that is in the argument of sendTextMessage(...) followed by node sendTextMessage(...)  etc.<u></u><u></u></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">How do i get this?? I think i could get that flow using flowdroid, but i am not able to get how to i convert it to dot file.<u></u><u></u></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">Dacong, I will definitely try that tool.<u></u><u></u></p></div><p class="MsoNormal">Thanks &amp; Regards<u></u><u></u></p></div><p class="MsoNormal"><span style="color:#888888">Lokesh Jain</span><u></u><u></u></p><div><div><p class="MsoNormal"> <u></u><u></u></p><div><p class="MsoNormal"><span style="color:#888888"> </span><u></u><u></u></p><div><div><p class="MsoNormal"><span style="color:#888888"> </span><u></u><u></u></p></div></div></div></div></div></div><div><div><div><p class="MsoNormal"> <u></u><u></u></p><div><p class="MsoNormal">On Wed, Feb 4, 2015 at 2:05 PM, Bodden, Eric &lt;<a href="mailto:eric.bodden@sit.fraunhofer.de" target="_blank">eric.bodden@sit.fraunhofer.de</a>&gt; wrote:<u></u><u></u></p><p class="MsoNormal">Hi Lokesh.<br><br>&gt; I want to do intra and inter procedural data flow analysis for an .apk file.<br>&gt; For this I have used FlowDroid. I followed <a href="https://github.com/secure-software-engineering/soot-infoflow-android/wiki" target="_blank">https://github.com/secure-software-engineering/soot-infoflow-android/wiki</a> this tutorial in eclipse and it worked fine. But i am not able to deduce anything useful from the output. Is there any way, I can get the Data dependency graph from this ?<br><br>Yes, sure. That&#39;s the main data structure that FlowDroid supports. The textual output indeed won&#39;t help you much, though. FlowDroid provides callbacks instead, which notify you of any flows found. That&#39;s usually how people use the tool.<br><br>&gt; Also is FlowDroid is good option for getting Data dependency or is there any other option better than this?<br><br>There are other tools but FlowDroid is certainly one of the most stable and thorough ones.<br><br>Cheers,<br>Eric<u></u><u></u></p></div><p class="MsoNormal"> <u></u><u></u></p></div></div></div></div><p class="MsoNormal"> <u></u><u></u></p></div></div></div></div></div></div><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div></div></div></blockquote></div><br></div>