Paper, My Focus Was Mainly on Designing, Imple- Menting and Evaluating Securepay
Total Page:16
File Type:pdf, Size:1020Kb
VULNERABLE BY DESIGN: MITIGATING DESIGN FLAWS IN HARDWARE AND SOFTWARE PH.D. THESIS RADHESH KRISHNAN KONOTH VRIJE UNIVERSITEIT AMSTERDAM, 2020 Faculty of Science The research reported in this dissertation was conducted at the Faculty of Science — at the Department of Computer Science — of the Vrije Universiteit Amsterdam This work was supported by the MALPAY consortium, consisting of the Dutch national police, ING, ABN AMRO, Rabobank, Fox-IT, and TNO. This thesis represents the position of the author and not that of the aforementioned consortium partners Copyright © 2020 by Radhesh Krishnan Konoth VRIJE UNIVERSITEIT VULNERABLE BY DESIGN: MITIGATING DESIGN FLAWS IN HARDWARE AND SOFTWARE ACADEMISCH PROEFSCHRIFT ter verkrijging van de graad Doctor of Philosophy aan de Vrije Universiteit Amsterdam, op gezag van de rector magnicus prof.dr. V. Subramaniam, in het openbaar te verdedigen ten overstaan van de promotiecommissie van de Faculteit der Bètawetenschappen op maandag 7 december 2020 om 13.45 uur in de online bijeenkomst van de universiteit, De Boelelaan 1105 door Radhesh Krishnan Konoth geboren te Koorkenchery, India promotor: prof.dr.ir. H. J. Bos copromotor: dr. K. Razavi ഞാൻ ഈ പുസ്തകം എെ അനും അയ്ും സമർിുു “Those that have an attitude of service towards others are the beauty of society." - Amma Acknowledgements Let me begin by acknowledging the people who supported me during this won- derful journey. First and foremost, I am greatly indebted to my supervisor Herbert Bos for providing me the opportunity to do a Ph.D. Thank you Herbert for taking that risk and for believing in me. This journey would not have been possible without your support and guidance. Your dedication, leadership, and the ability to sell any idea are such an inspiration. I truly couldn’t have wished for a better supervisor. You are the best! I am deeply grateful to my co-promoter Kaveh Razavi. Only amazing things happened from the moment you joined the team. You gave me the idea and opportunity to work on a crazy Rowhammer defense project and to do an intern- ship at UCSB. Both ideas ended up as two amazing chapters of this Ph.D. thesis. Every conversation with you was inspiring and you always pushed me to create the best research. I am grateful for all those pushes, guidance, and support. You made this journey a lot more exciting for me. I am indebted. Next, I would like to thank members of my Ph.D. thesis committee: Clémen- tine Maurice, Christian Rossow, Erik van der Kouwe, Michel van Eeten, Marten van Dijk and Wan Fokkink. Thank you for your allotting time and energy to review my thesis. During my Ph.D. I was fortunate to work with a lot of smart researchers. My sincere thanks to Victor, Andrei, Marco, Cristiano, Dennis, Elias, Enes, Wan, Martina, Veelasha, Emanuele, Björn, Christopher, Giovanni. This thesis wouldn’t have existed without your support. VUSec is a group of amazing researchers. Everyone there made this journey very special to me. Thank you Sanjay, Manolis, Taddeüs, Koen, Ben, Erik van der Kouwe, Erik Bosman, Chen, Istvan, Koustubha, Lucian, Natalie, Pietro, Sebasti- aan, Stephan, Elia, Brian, Hany, Emanuele, Alyssa, Marius, and Manuel. I am grateful to all the teachers of my life, friends, and family. Thank you ix x ACKNOWLEDGEMENTS Renuka, Vipin, Zubin, Praveen, Sreekumar, Roshan, Vinod, Candice, Elisabeth, Amrutha, Sreejith, and Akshara (my only niece, yet). I would like to thank my dad and my mom for all the motivation, support, and love. This Ph.D. thesis is a result of your eorts, sacrices, and prayers. Thank you from the bottom of my heart. At the heart of it all, let me express my humble gratitude towards Amma (Mata Amritanandamayi Devi) for her inspiration, guidance, and grace. Without her support, neither would I have started this journey nor would I have concluded this journey. Thank you, Amma. Radhesh Amsterdam, December 2020 Contents Acknowledgements ix Contents xi Publications xv 1 Introduction1 2 BAndroid9 2.1 Introduction............................. 10 2.2 Synchronization........................... 12 2.2.1 Remote Services ...................... 12 2.2.2 App Synchronization.................... 12 2.2.3 2FA Synchronization Vulnerabilities............ 13 2.3 Exploiting 2FA Synchronization Vulnerabilities.......... 14 2.3.1 Android........................... 14 2.3.2 iOS.............................. 18 2.3.3 Dedicated 2FA Apps .................... 19 2.4 Discussion.............................. 20 2.4.1 Feasibility.......................... 20 2.4.2 Recommendations and Future Work............ 21 2.4.3 Responsible Disclosure................... 23 2.5 Background and Related Work................... 23 2.5.1 Man-in-the-Browser.................... 23 2.5.2 Two-Factor Authentication................. 24 2.5.3 Cross-platform infection.................. 25 2.6 Conclusion ............................. 26 3 SecurePay 27 xi xii CONTENTS 3.1 Introduction............................. 28 3.2 Background............................. 31 3.2.1 Mobile transactions and 2FA................ 31 3.2.2 Separating the factors ................... 32 3.2.3 Trusted Execution Environment (TEE) .......... 33 3.3 Threat model and assumptions................... 33 3.4 Design................................ 34 3.4.1 Requirements for a secure and compatible design . 34 3.4.2 SecurePay.......................... 35 3.5 Implementation........................... 39 3.5.1 SecurePay components................... 39 3.5.2 SecurePay registration and bootstrap........... 43 3.6 Evaluation.............................. 44 3.6.1 Security of mobile transactions .............. 44 3.6.2 Security of non-mobile transactions............ 45 3.6.3 Verication using Tamarin . 46 3.6.4 Performance evaluation .................. 50 3.6.5 Integration eort...................... 51 3.6.6 Comparison with similar eorts.............. 51 3.7 Discussion.............................. 55 3.8 Related work ............................ 56 3.9 Conclusions............................. 58 4 ZebRAM 61 4.1 Introduction............................. 62 4.2 Background............................. 64 4.2.1 DRAM Organization.................... 64 4.2.2 The Rowhammer Bug ................... 66 4.2.3 Rowhammer Defenses................... 67 4.3 Threat Model............................ 68 4.4 Design................................ 68 4.5 Implementation........................... 71 4.5.1 ZebRAM Prototype Components ............. 72 4.5.2 Implementation Details................... 73 4.6 Security Evaluation......................... 75 4.6.1 Traditional Rowhammer Exploits............. 75 CONTENTS xiii 4.6.2 ZebRAM-aware Exploits.................. 76 4.7 Performance Evaluation ...................... 77 4.8 Related work ............................ 84 4.9 Discussion.............................. 87 4.9.1 Prototype.......................... 87 4.9.2 Alternative Implementations................ 87 4.10 Conclusion ............................. 88 5 MineSweeper 91 5.1 Introduction............................. 93 5.2 Background............................. 95 5.2.1 Cryptocurrency Mining Pools............... 96 5.2.2 In-browser Cryptomining ................. 96 5.2.3 Web Technologies ..................... 97 5.2.4 Existing Defenses against Drive-by Mining . 98 5.3 Threat Model............................ 99 5.4 Drive-by Mining in the Wild.................... 100 5.4.1 Data Collection....................... 101 5.4.2 Data Analysis and Correlation . 105 5.4.3 In-depth Analysis and Results . 108 5.4.4 Common Drive-by Mining Characteristics . 117 5.5 Drive-by Mining Detection..................... 117 5.5.1 Cryptomining Hashing Code . 118 5.5.2 Wasm Analysis....................... 120 5.5.3 Cryptographic Function Detection . 120 5.5.4 Deployment Considerations . 123 5.6 Evaluation.............................. 123 5.7 Limitations and Future Work.................... 128 5.8 Related Work............................ 129 5.9 Conclusion ............................. 130 6 Conclusion 133 References 139 Conference Proceedings ......................... 139 Articles .................................. 146 xiv CONTENTS Books ................................... 147 Technical Reports and Documentation . 147 Online................................... 148 Talks.................................... 153 Source code................................ 154 Summary 155 Samenvatting 157 Publications Parts of this dissertation have been published earlier. The text in this thesis dif- fers from the published versions in minor editorial changes that were made to improve readability. The following publications form the core of this thesis. R. K. Konoth, V. van der Veen, and H. Bos. How anywhere computing just killed your phone-based two-factor authentication. In Proceedings of the 20th International Conference on Financial Cryptography and Data Security (FC). Feb. 2016. [Appears in Chapter2.] R. K. Konoth, B. Fischer, W. Fokkink, E. Athanasopoulos, K. Razavi, and H. Bos. SecurePay: Strengthening two-factor authentication for arbitrary trans- actions. In Proceedings of the 5th IEEE European Symposium on Security and Pri- vacy (EuroS&P). Sep. 2020. [Appears in Chapter3.] R. K. Konoth, M. Oliverio, A. Tatar, D. Andriesse, H. Bos, C. Giurida, and K. Razavi. ZebRAM: Comprehensive and compatible software protection against rowhammer attacks. In Proceedings of the 13th USENIX Symposium on Operat- ing Systems Design and Implementation (OSDI). Nov. 2018. [Appears in Chapter4.] R. K. Konoth, E. Vineti, V. Moonsamy, M. Lindorfer, C. Kruegel, H. Bos, and G.