arguslab / Argus-SAF

Argus static analysis framework
Apache License 2.0
186 stars 51 forks source link

kik and signa apk get error #54

Open mcanonic opened 5 years ago

mcanonic commented 5 years ago

Hi, I've download the apk from quite famous mobile app such as signal and apk, from apk mirrow but it seems that your code is not able to manage them. For example:

private final Future a;

.....

private void i() { if (this.d == null) { Log.e("MixpanelAPI.PIdentity", "storeSuperProperties should not be called with uninitialized superPropertiesCache."); return; } String jSONObject = this.d.toString(); boolean z = h.a; try { Editor edit = ((SharedPreferences) this.a.get()).edit(); edit.putString("super_properties", jSONObject); a(edit); } catch (ExecutionException e) { Log.e("MixpanelAPI.PIdentity", "Cannot store superProperties in shared preferences.", e.getCause()); } catch (Throwable e2) { Log.e("MixpanelAPI.PIdentity", "Cannot store superProperties in shared preferences.", e2); } }

The codes above is part of kiki.apk source code. You can see that "Editor edit = ((SharedPreferences) this.a.get()).edit();" create an editor which is to write files. And the SharedPreferences it uses is a Future kind which is used for asynchronous process. Because the workflow for Fordroid is to find Sinks firstly and then look back upon the files' name where it created. It seems that Amandroid cannot located the file creator since it doesn't know exactly when and where the file will be created.

I would like this fixed in order to use Fordroid tool. Thanks!

fgwei commented 5 years ago

I am not sure what you mean. You mean you want to find where the SharedPreference is created?

mcanonic commented 5 years ago

The error that I get by running your code with kik apk follows at the end of this message.

It seems that the error happened before line 148 (val taint_analysis_result = AndroidDataDependentTaintAnalysis(yard, iddResult, idfg.ptaresult, ssm)) which are processing procedure of Amandroid's. And these error happens again in signal apk.

The error is this: Exception in thread "main" java.util.NoSuchElementException: None.get at scala.None$.get(Option.scala:349) at scala.None$.get(Option.scala:347) at org.argus.play.random.FileResolver$.$anonfun$main$1(FileResolver.scala:131) at org.argus.play.random.FileResolver$.$anonfun$main$1$adapted(FileResolver.scala:119) at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:320) at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:976) at org.argus.play.random.FileResolver$.main(FileResolver.scala:119) at org.argus.play.cli.Main$.cmdFileResolver(Main.scala:47) at org.argus.play.cli.Main$.delayedEndpoint$org$argus$play$cli$Main$1(Main.scala:61) at org.argus.play.cli.Main$delayedInit$body.apply(Main.scala:10) at scala.Function0.apply$mcV$sp(Function0.scala:34) at scala.Function0.apply$mcV$sp$(Function0.scala:34) at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12) at scala.App.$anonfun$main$1$adapted(App.scala:76) at scala.collection.immutable.List.foreach(List.scala:389) at scala.App.main(App.scala:76) at scala.App.main$(App.scala:74) at org.argus.play.cli.Main$.main(Main.scala:10) at org.argus.play.cli.Main.main(Main.scala)

Process finished with exit code 1