Burtscher, L. (2022). Tracing android apps based on ART ahead-of-time compilation profiles from Google Play [Diploma Thesis, Technische Universität Wien]. reposiTUm. https://doi.org/10.34726/hss.2022.90745
Privacy; Android; Dynamic Analysis; Tracing; eBPF; Google Play Store; Ahead-Of-Time Compilation Profiles; DEX-Tracer
en
Abstract:
Android ist als Betriebssystem für Smartphones weit verbreitet.Da Android Apps potenziell Zugriff auf private und sensible Daten haben, stellen sie ein wichtiges Forschungsgebiet für Datenschutzanalyse dar.Entwicklerinnen und Entwickler integrieren Datenlecks häufig vorsätzlich in ihre Apps.Die dadurch an Dritte weitergegebenen privaten Daten werden z. B. verwendet, um Einnahmen zu generieren.Solche Datenlecks können insbesondere durch dynamische Analyse, bei der das Verhalten einer App zur Laufzeit untersucht wird, entdeckt werden.Für den Erfolg von dynamischer Analyse ist es notwendig, dass jene Funktionen der App tatsächlich ausgeführt werden, die das Datenleck enthalten.Daher streben solche Analyseverfahren eine hohe Abdeckung aller möglichen Funktionen an.Das bedeutet, dass so viel Code der App wie möglich ausgeführt werden soll.Während der Analyse muss deshalb auf eine Weise mit der App interagiert werden, sodass alle relevanten Funktionen aufgerufen werden.Dies ist im Allgemeinen nicht möglich oder sehr zeitintensiv, weil die Interaktion mit der App automatisiert abläuft und die verwendeten Tools keine Information über die Funktionen der App haben.Da Datenlecks hauptsächlich in Codeteilen vorkommen, die häufig ausgeführt werden (hot code), entwickeln wir in dieser Arbeit eine Methode, die dabei unterstützt, die dynamische Analyse auf diese Codeteile zu fokussieren.Bei der Installation einer App aus dem Google Play Store wird eine Liste an hot code der App heruntergeladen und intern für Leistungsoptimierungen genutzt.Unser Ansatz verwendet diese Listen, um festzustellen, welche Teile von Apps hot sind.Da die Schnittstelle des Play Store nicht öffentlich dokumentiert ist, wenden wir Reverse Engineering an, um herauszufinden, wie diese sogenannten ahead-of-time (AOT) compilation profiles heruntergeladen werden.Auf Basis der Ergebnisse entwickeln wir dann ein Tool, das diese AOT Profile gezielt herunterladen kann.Wir implementieren weiters DEX-Tracer, ein Tool, das ein heruntergeladenes AOT Profil verwendet, um während der Laufzeit der betreffenden App zu überwachen, welche der im Profil enthaltenen Codeteile ausgeführt werden.Diese Informationen können nach Beendigung von DEX-Tracer eingesehen werden.Wenn diese Methode mit dynamischer Analyse kombiniert wird, dient sie als Metrik, um den Fortschritt der Analyse festzustellen.Wir zeigen empirisch, dass unser Ansatz, AOT Profile für diesen Zweck zu nutzen, realisierbar ist.Die Ergebnisse dieser Arbeit tragen deshalb dazu bei, die Effizienz von dynamischer Analyse für Android Apps zu erhöhen.
de
Android is widely used as an operating system for smartphones.Because Android apps have access to personal and privacy-sensitive data, they pose an important research target for privacy analysis.Data leaks, where personal information is disclosed to third parties, are often introduced by app developers intentionally for different reasons like monetization.Especially dynamic analysis, where the behavior of an app is examined during its run time, is able to discover such leaks.Dynamic analysis, however, requires the app to execute the functionalities that cause the data leak.Hence, such analysis approaches strive to achieve a high execution coverage, meaning that as much code of the app as possible gets executed.This necessitates to generate the correct inputs for the app to trigger all target functionalities. Automated tools that are used for this task do not have information about the functionalities of the app.Therefore, the generation of the needed inputs is typically infeasible in acceptable time.Because data leaks primarily occur in code paths that are executed frequently (hot code), we develop a method in this thesis that assists to focus dynamic analysis to those code paths.When an app is installed from the Google Play Store, a list of hot code is downloaded and used for performance optimizations.Our approach utilizes these lists to determine, which parts of the apps are hot.As the Play Store API is not publicly documented, we perform reverse engineering to obtain information on how these so-called ahead-of-time (AOT) compilation profiles are downloaded.Based on the gathered information, we then develop a proof of concept that is capable of downloading these AOT profiles systematically.Furthermore, we implement DEX-Tracer, a proof-of-concept tool that utilizes an AOT profile to monitor which of the contained hot code paths actually get executed during run time of the target app.This information can be viewed after DEX-Tracer exits.When used in conjunction with dynamic analysis, this technique works as a metric to determine the progress of the analysis.We empirically demonstrate that our approach to use AOT profiles for this purpose is feasible.The results of this work therefore allow to increase the efficiency of dynamic analysis of Android apps.