Heap Memory Snapshot Assisted Program Analysis for Android Permission Specification

Lannan Luo · 2020

Given a permission-based framework, its permission specification, which is a mapping between API methods of the framework and the permissions they require, is important for software developers and analysts. In the case of Android Framework, which contains millions of lines of code, static analysis is promising for analyzing such a large codebase to derive its permission specification. One of the common building blocks for static analysis is the generation of a global call graph. However, as common for object-oriented languages, the target of a virtual function call depends on the runtime type of the receiving object, which is undecidable statically. Existing work applies traditional analysis approaches, such as class-hierarchy analysis and points-to analysis, to building an over-approximated call graph of the framework, causing much imprecision to downstream analysis. We propose the heap memory snapshot assisted program analysis that leverages the dynamic information stored in the heap of Android Framework execution to assist in generating a more precise call graph; then, further analysis is performed on the call graph to extract the permission specification. We have developed a prototype and evaluated it on different versions of Android Framework. The evaluation shows that our method significantly improves on prior work, producing more precise results.

Read the paper · More papers on PaperTik