Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The meaning of the edges in iddgraph #51

Open
sjl872964789 opened this issue Aug 31, 2018 · 0 comments
Open

The meaning of the edges in iddgraph #51

sjl872964789 opened this issue Aug 31, 2018 · 0 comments

Comments

@sjl872964789
Copy link

Hi, first of all, thank you for providing this great framework. I read you paper that published on CCS and the tutorial you have gave,I'm very interested in the iddresult that you have mentioned, so I tried it out with the example in Argus-SAF-playground. The following is part of my results:

<edge id="CallMainActivityenvMainL1109p0-MainActivityenvMainL1108" source="CallMainActivityenvMainL1109p0" target="MainActivityenvMainL1108"/>

could you please tell me the meaning of the the edge in its result And how do I find the corresponding location in the.Jawa file ,At first I thought this meant calling the contents of # L1109p0 in the class MainActivity ,but after searching the file named MainActivity.Jawa , I found that there was no content with the beginning of #L1,I would be grateful if you could give me any help.
By the way,here is my code, in case I wrote wrong anywhere.

val apk_name = "app-fdroid-debug.apk";
val apk_path = "F:\\AmAndroid_test\\apk_path\\" + apk_name
val out_path = "F:\\AmAndroid_test\\out_path\\"
val fileUri = FileUtil.toUri(apk_path)
val outputUri = FileUtil.toUri(out_path)
val reporter = new DefaultReporter
val yard = new ApkYard(reporter)
val layout = DecompileLayout(outputUri)
val strategy = DecompileStrategy(layout)
val settings = DecompilerSettings(debugMode = false,forceDelete = false, strategy, reporter)
val apk = yard.loadApk(fileUri, settings, collectInfo = true, resolveCallBack = true)
val component = apk.model.getComponents.head
    apk.model.getEnvMap.get(component) match {
        val ep = apk.getMethod(esig).get
        val initialfacts = AndroidReachingFactsAnalysisConfig.getInitialFactsForMainEnvironment(ep)
        val icfg = new InterProceduralControlFlowGraph[ICFGNode]
        val ptaresult = new PTAResult
        val sp = new AndroidSummaryProvider(apk)
        val analysis = new AndroidReachingFactsAnalysis(apk, icfg, ptaresult, new AndroidModelCallHandler, sp.getSummaryManager, new ClassLoadManager,AndroidReachingFactsAnalysisConfig.resolve_static_init,timeout = None)
        val idfg = analysis.build(ep, initialfacts, new Context(apk.nameUri))
        val iddResult = InterProceduralDataDependenceAnalysis(apk, idfg)
        val ssm = new DataLeakageAndroidSourceAndSinkManager(AndroidGlobalConfig.settings.sas_file)
        print(iddResult.getIddg.toGraphML(new PrintWriter(new File("F:\\AmAndroid_test\\out_path\\" + apk_name + "\\"+componentname+"\\iddresult.graphml"))))
    case None =>
        yard.reporter.error("TaintAnalysis", "Component " + component + " did not have environment! Some package or name mismatch maybe in the Manifest file.")

Best Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant