lilicoding / soot-infoflow-android-iccta

Inter-component communication Taint Analysis for Android
https://sites.google.com/site/icctawebpage/
GNU Lesser General Public License v2.1
92 stars 46 forks source link

"RuntimeException" and "NullPointerException" while running Epicc and IccTA #3

Closed muntaha14 closed 9 years ago

muntaha14 commented 9 years ago

Hi,

I am not able to analyze apps. Commands to run Epicc and IccTA are resulting in errors. Can you please look into it. Details are given below

1) Error while running epicc

Command: "./runEpicc.sh [apkPath]"

Output:

"........ Soot has run for 0 min. 37 sec. Directory: testspace/InterAppCommunication_IntentSink1.apk/retargeted/retargeted/InterAppCommunication_IntentSink1 [*] parsing manifest '../../apks/InterAppCommunication_IntentSink1.apk' java.io.FileNotFoundException: output_iccta/InterAppCommunication_IntentSink1.csv (No such file or directory) at java.io.FileOutputStream.open(Native Method) .... at soot.jimple.interproc.cc.ConnectedComponents.computeConnectedComponents(ConnectedComponents.java:88) at soot.jimple.interproc.cc.TestApps.Epicc.main(Epicc.java:83) Manifest components links: Warning: android.content.pm.ResolveInfo is a phantom class! ...... Transforming android.support.v4.view.ViewGroupCompat$ViewGroupCompatImpl... java.lang.NullPointerException Transforming de.ecspride.BuildConfig... at soot.jimple.interproc.cc.ConnectedComponents.computeConnectedComponents(ConnectedComponents.java:283) Transforming android.support.v4.content.ContextCompatHoneycomb... at soot.jimple.interproc.cc.TestApps.Epicc.main(Epicc.java:83) Transforming android.support.v4.util.TimeUtils... Exception in thread "main" java.lang.NullPointerException Transforming android.support.v4.widget.SearchViewCompat$SearchViewCompatImpl... at soot.jimple.interproc.cc.ConnectedComponents.computeConnectedComponents(ConnectedComponents.java:318) Transforming android.support.v4.widget.SearchViewCompat$OnQueryTextListenerCompat... at soot.jimple.interproc.cc.TestApps.Epicc.main(Epicc.java:83) Transforming android.support.v4.widget.SearchViewCompat... ....... The following ICC values were found: Precision stats: null "

2) Error while running IccTA

Command: "java -jar IccTA.jar -apkPath [apk path] -androidJars [path of jars] -iccProvider [path of epicc] -enableDB -intentMatchLevel 3"

Output:

"Exception in thread "main" java.lang.RuntimeException: parameter error [args = [Ljava.lang.String;@1235feb] at lu.uni.serval.iccta.TestApps.Main.main(Main.java:20)"

lilicoding commented 9 years ago

For the exception of Epicc ,please create a directory in your working directory called output_iccta, anyway, it will not influence Epicc's result. For this, you can check your database in which there should be some data inside. I also update this to the "Usage of IccTA" wiki.

For the exception of IccTA, notice that for parameter -iccProvider, the value should be only epicc instead of [path of epicc]. If you specify epicc here, IccTA will load its needs from the database, where Epicc manipulates with.

muntaha14 commented 9 years ago

1) IccTA I used "-iccProvider epicc", instead of -iccProvider [path of epicc]. But it is still giving same error.

2) Epicc After creating that directory, Epicc is not giving any error. Output is

"..... 'The following ICC values were found: Precision stats: null'"

Database was populated with data. Table 'PermissionStrings' etc had some values.

lilicoding commented 9 years ago

Could you show me your running parameters and also how you use them to launch the app?

muntaha14 commented 9 years ago

Command with used param: "java -jar IccTA.jar -apkPath /home/muntaha/ICCTA/tool/soot-infoflow-android-iccta/apks/InterAppCommunication_ActivityCommunication1.apk -androidJars /home/muntaha/ICCTA/tool/android-platforms -iccProvider epicc -enableDB -intentMatchLevel 3"

Working Directory: /home/muntaha/ICCTA/tool/soot-infoflow-android-iccta/release

How is command used: 1) In eclipse, right click on 'soot-infoflow-android-iccta/release/IccTA.jar'. Then click on 'Show in Remote Systems view' 2) In 'Remote Systems view', right click on 'soot-infoflow-android-iccta/release'. Then click on 'Launch shell', which opens local shell for path '/home/muntaha/ICCTA/tool/soot-infoflow-android-iccta/release'. 3) In newly opened shell, give above mentioned command

lilicoding commented 9 years ago

Hi,

Please do not run the released jar but instead directly run the source code (soot.jimple.infoflow.android.iccta.TestApps.Test). The IccTA.jar file under release directory is out-of-date, I plan to release a new jar soon.

You can directly right click on "soot.jimple.infoflow.android.iccta.TestApps.Test" and then select "Run As" -> "Run Configurations". In the popup dialog, input your parameters "-apkPath /home/muntaha/ICCTA/tool/soot-infoflow-android-iccta/apks/InterAppCommunication_ActivityCommunication1.apk -androidJars /home/muntaha/ICCTA/tool/android-platforms -iccProvider epicc -enableDB -intentMatchLevel 3" into Arguments tab.

Alternatively, you can also build your own jar file through Eclipse (easiest way) and then launch your experience on the new built jar file.

muntaha14 commented 9 years ago

I ran the source code, it executed successfully.

There was one error that 'res/jdbc.xml' was not present, so I copied it from 'release'. After that analysis ran successfully.

Thanks,