Taming Reflection
Author(s) -
Xiaoyu Sun,
Li Li,
Tegawendé F. Bissyandé,
Jacques Klein,
Damien Octeau,
John G. Grundy
Publication year - 2021
Publication title -
acm transactions on software engineering and methodology
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.597
H-Index - 78
eISSN - 1557-7392
pISSN - 1049-331X
DOI - 10.1145/3440033
Subject(s) - computer science , android (operating system) , reflection (computer programming) , java , malware , static analysis , computer security , human–computer interaction , programming language , operating system
Android developers heavily use reflection in their apps for legitimate reasons. However, reflection is also significantly used for hiding malicious actions. Unfortunately, current state-of-the-art static analysis tools for Android are challenged by the presence of reflective calls, which they usually ignore. Thus, the results of their security analysis, e.g., for private data leaks, are incomplete, given the measures taken by malware writers to elude static detection. We propose a new instrumentation-based approach to address this issue in a non-invasive way. Specifically, we introduce to the community a prototype tool called DroidRA, which reduces the resolution of reflective calls to a composite constant propagation problem and then leverages the COAL solver to infer the values of reflection targets. After that, it automatically instruments the app to replace reflective calls with their corresponding Java calls in a traditional paradigm. Our approach augments an app so that it can be more effectively statically analyzable, including by such static analyzers that are not reflection-aware. We evaluate DroidRA on benchmark apps as well as on real-world apps, and we demonstrate that it can indeed infer the target values of reflective calls and subsequently allow state-of-the-art tools to provide more sound and complete analysis results.
Accelerating Research
Robert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom
Address
John Eccles HouseRobert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom