Improving Copy Protection for Mobile Apps
Total Page:16
File Type:pdf, Size:1020Kb
INSTITUT FÜR INFORMATIK DER TECHNISCHEN UNIVERSITÄT MÜNCHEN Dissertation zum Erreichen des akademischen Grades eines Dr. rer. nat. (Doktor der Naturwissenschaften) Improving Copy Protection for Mobile Apps Nils Timotheus Kannengießer INSTITUT FÜR INFORMATIK DER TECHNISCHEN UNIVERSITÄT MÜNCHEN Improving Copy Protection for Mobile Apps Nils Timotheus Kannengießer Vollständiger Abdruck der von der Fakultät für Informatik der Technischen Universität München zur Erlangung des akademischen Grades eines Doktors der Naturwissenschaften (Dr. rer. nat.) genehmigten Dissertation. Vorsitzende/r: Univ. Prof. Dr. Claudia Eckert Prüfer/in der Dissertation: 1. Univ. Prof. Dr. Uwe Baumgarten 2. Prof. Sejun Song, Ph.D. Die Dissertation wurde am 10.08.2016 bei der Technischen Universität München eingereicht und durch die Fakultät für Informatik am 16.11.2016 angenommen. “Copy protection is never perfect” [1] Thomas Aura, Dieter Gollmann Acknowledgements 1 Acknowledgements First of all, I would like to thank my main supervisor Prof. Dr. Uwe Baumgarten, who was always available to discuss any open questions. He also provided many helpful hints during the writing of this dissertation. Ultimately, he gave me the required workspace and utilities as part of my job at TUM, which surely helped me in finishing this document within the recent years. During this time, I highly enjoyed my work as a Teaching/Research Associate at TUM in introducing students to Android, and working closely together on interesting projects with major industry partners from both Germany and the US. Moreover, I would like to thank Prof. Sejun Song, PhD for the feedback he provided as well as his engagement in related research papers throughout these years. He also provided students and me helpful hints in paper writing. In addition, I’d like to thank him for the support during my international research visit in September 2015. In addition, I would like to thank our industry partner, Giesecke & Devrient and in particular Mr. Rizvanovic and Dr. Sterzinger for their support and for providing me their MSC product. I would also like to thank all industry partners that are not mentioned or their provided and helpful inputs for this work. Furthermore, I appreciate the helpful replies by Mrs. Dr. Weinl from the TUM library on my questions regarding the best quotation techniques. Moreover, I want to thank all my students for helping me on various aspects of this work by investigating subtopics, implementing my proposed ideas or just for evaluating the solution ideas, while also providing helpful information used in this research work. A big thanks to all of them and in particular the following: Sebastian Schleemilch, Yixiang Chen, Magnus Jahnen, Marius Muntean, Michael Bichlmeier, Patrick Bernhard, Norbert Schmidbartl, Janosch Maier, Philipp Schreitmueller, Ioana Negoita, Ozan Pekmezci, Johannes Neutze, Lorenz Stadler, Hans Kirchner, Lucas Jaros, Nam Bui, Jochen Hartl, Arves Baus, Thomas Petting, Tomas Ladek, Florian Gareis, Aser Abdelrahmen, Mohamad Ayad, Shiffudin Al Masud, Gabriel Michels, Jonas Raedle, Vadym Strelchenko, Tuba Topaloglu, Nikolaos Tsiamitros, Felix Weissl and Konrad Weiss. A special thanks is also extended to Kordian Bruck and Philipp Fent, who did not contribute to this research work directly, but indirectly by developing and supporting one of our most ambitious apps, the TUM Campus App that was used for the performed surveys of this dissertation in recent months. Moreover, I would like to thank my family, including my brother Simon, as well as my parents, Fritz and Irmgard Kannengiesser, for their general support on my studies throughout all these years. Last but not least, I would like to thank Nancy Lorenz for the feedback she provided regarding the improvement of the English writing styles in this dissertation. Thank you everyone. 6 Abstract 2 Abstract English: This dissertation identifies existing issues with major copyright protection mechanisms used on the Android operating system by Google for mobile devices like smartphones and tablets. First, the general problem of weak copyright protections used on major app stores is introduced, and the fundamentals on Android itself are presented to make the reader familiar with the operating system and reengineering of the apps themselves. Furthermore, related research topics are reviewed and discussed. A security analysis of possible protection methods highlights the current situation of existing solutions used to protect Android software from piracy these days, while possible solutions to improve copyright protection on Android using e.g., secure elements or native code, are analyzed as well. In addition, other practical and conceptual ideas related to e.g., secure elements and trusted execution environments, are introduced that have responsibilities to stakeholders like Google and hardware manufacturers and need to be honored. Moreover, improved solutions using native code are shown. Based on the presented ideas, several sample implementations have been developed and evaluated, and show a significant improvement to the existing solutions provided by Google and Amazon already. An outlook on further research possibilities is given as well. German: Diese Dissertation behandelt die Thematik von Kopierschutzmaßnahmen für mobile Apps mit dem Schwerpunkt des Betriebssystems Android für Smartphones und Tablets. Hierbei werden zunächst das Problem eines schwachen Kopierschutzes bei Apps in den großen App-Stores aufgezeigt, sowie ein Überblick über Android und das einfache Reengineering von Android Anwendungen selbst gegeben. Ebenfalls werden vorhandene Lösungen und Forschungen diskutiert. In einer Sicherheitsanalyse zu möglichen, aktuellen Kopierschutzverfahren zur Vermeidung von Softwarepiraterie unter Android werden vorhandene Risiken und Probleme genannt, wobei auch bereits Lösungsvorschläge unter Verwendung von, z.B. Secure Elements oder nativen Code, in die Analyse einbezogen werden. Zusätzlich werden praktische und konzeptionelle Lösungsideen mit Bezug zu Secure Elements oder Trusted Execution Environments vorgestellt, deren tatsächliche Realisierung in Abhängigkeit zu weiteren Stakeholdern (Google, Hardwareherstellern) steht. Ebenso werden Möglichkeiten zur Verbesserung mit nativen Code aufgezeigt. Im Zuge praktischer Evaluierungen wurden ausgewählte Methoden exemplarisch untersucht, deren Ergebnisse signifikante Verbesserungen beim Kopierschutz im Vergleich zu bestehenden Lösungen - von beispielsweise Google oder Amazon - erkennen lassen. Darüber hinaus werden weitere Ideen und Möglichkeiten für künftige Forschungsarbeiten aufgezeigt. 7 Assumptions 3 Assumptions Target versions and available hardware This dissertation aims to provide information for the recent Android versions using the ART VM (6.x). Therefore, methods that apply to older versions of Android are not presented in detail. For evaluations, only official Google-branded devices like the Nexus series were used and available. Smartphones by other vendors (e.g., Samsung S5, S7, etc.) were not available and were only examined in a theoretical way. Research Group / Students’ theses The theses of students involved in the research of the author are not listed under related work, but are referred to as work done in the research group “we”, while quoting them as usual. The topics, as well as initial ideas, were usually defined by the author of this dissertation and guided in the required direction, while requesting certain implementations based on the author’s ideas like, e.g., the nLVL, or the analysis of Lucky Patcher. Reader requirements Even the fundamental section tries to cover many topics; this dissertation requires general knowledge on all computer science topics, particular IT-security in general and a basic Android developer’s knowledge. A master’s degree in either computer science or a related field is highly recommended. Additional guidance by hardware designer suggested (NDA requirement) Furthermore, the presented ideas using secure elements (SE) try to show general methods that may be used with hardware from several manufacturers. The specialties of the used security equipment (like the MSC by Giesecke & Devrient) are not reviewed, however, the hardware is assumed to be safe, and evaluations (e.g., side-channel attacks, etc.) are out of scope and not performed in this dissertation. Based on the used product, further support by the hardware manufacture is recommended and was not available upon creation of this dissertation regarding used hardware and software (cf. G&D’s MSC). All information that is assumed to be protected by our NDA is either blackened or omitted. References In general, this work was created by taking the suggestions of TUM’s Quotation Guide1 in mind. In addition, open questions were discussed with my first advisor (Prof. Dr. Baumgarten) and library employees (Mrs. Dr. Weinl) and led to the following, additional guidelines: Videos: Any statements made here are quoted as direct quotations with their sources closely attached, while mentioning “transcript by author” in a footnote. Sources mentioned at the beginning or end of a section represent reported speech for that whole section. 1 https://mediatum.ub.tum.de/doc/1231945/1231945.pdf 8 Assumptions Single or short phrases (e.g. Secure Element) are not quoted. Instead, their sources may be found at the end of the particular phrase or closely attached to that section. Exception: Special terms defined by the author only. In cases of reported speech of reported speech, attempts