Everything You Code Can and Will Be Re-Used Against
Total Page:16
File Type:pdf, Size:1020Kb
instead of Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Collaborators: Acknowledgement Luca Davi, Essen-Duisburg University, GE Ferdinand Brasser, Tommaso Frassetto, Christopher Liebchen, TU Darmstadt, GE N. Asokan, Aalto, FI Fabian Monrose, Kevin Snow, UNC Chapel Hill, US Hovav Shacham, UCSD, US Per Larsen, Steven Crane, Andrei Homescu, Gene Tsudik, Michael Franz, UCI, US Thorsten Holz, Bochum University, GE Felix Shuster, Microsoft Research, UK Yier Jin, Dean Sullivan, Orlando Arias, UCF, US Patrick Kroebel, Matthias Schunter, Intel Labs Georg Koppen, Tor Project Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Motivation Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Three Decades of Runtime Attacks return-into- Return-oriented Morris Worm libc programming Continuing Arms 1988 Solar Designer Shacham Race 1997 CCS 2007 … Borrowed Code Code Chunk Injection Exploitation AlephOne Krahmer 1996 2005 Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Recent Attacks Attacks on Tor Browser [2013] Stagefright [Drake, BlackHat 2015] FBI Admits It Controlled Tor Servers These issues in Stagefright code critically Behind Mass Malware Attack. expose 95% of Android devices, an estimated 950 million devices MMS Adversary Cisco Router Exploit [2018] The Million Dollar Dissident [2016] Million CISCO ASA Firewalls potentially Government targeted human rights vulnerable to attacks (XML parsing vuln.) defender with a chain of zero-day exploits to infect his iPhone with spyware. Adversary Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Exploit Acquisition Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Remote Android Vulnerability Case: Stagefright MMS Adversary Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Remote Android Vulnerability Case: Stagefright Process Memory Android 4.0.1 Application Library 1 MMS libStagefright Adversary Non-randomized Code Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Remote Android Vulnerability Case: Stagefright Process Memory Android 4.0.1 Application libStagefright MMS Library 1 Adversary Non-randomized Code Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Remote Android Vulnerability Case: Stagefright libStagefright: Native Android library that can be used by Apps to Process Memory Android 4.0.1 process media files Application libStagefright Library 1 Adversary Non-randomized Code Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Remote Android Vulnerability Case: Stagefright libStagefright: Native Android library that can be used by Apps to Process Memory Android 4.0.1 process media files Application libStagefright Library 1 Adversary Example Payloads: Non-randomized - Connect back to attacker Code - Install Malware/Rootkit - Steal Credentials ROP Exploit Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Remote Android Vulnerability Case: Stagefright libStagefright: Native Android library that can be used by Apps to Process Memory Android 4.0.1 process media files Application libStagefright Library 1 Adversary Example Payloads: Non-randomized - Connect back to attacker Code - Install Malware/Rootkit - Steal Credentials ROP Exploit Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Prevalence of Exploits Case: Pegasus vs UAE Dissident Browser Root Privileges Kernel Sends text message Disk including link to a website with an exploit Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Prevalence of Exploits Case: Pegasus vs UAE Dissident Exploits CVE-2016-4657 Browser Vulnerability Root Visit Privileges website Kernel Sends text message Disk including link to a website with an exploit Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Prevalence of Exploits Case: Pegasus vs UAE Dissident Exploits CVE-2016-4657 Browser Vulnerability Root Visit Privileges website CVE-2016-4656 CVE-2016-4655 Kernel Sends text message Disk including link to a website with an exploit Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Relevance and Impact High Impact of Attacks • Web browsers repeatedly exploited in pwn2own contests • Zero-day issues exploited in Stuxnet/Duqu [Microsoft, BH 2012] • iOS jailbreak Industry Efforts on Defenses • Microsoft EMET includes a ROP detection engine • Microsoft Control Flow Guard (CFG) in Windows 10 • Google‘s compiler extension VTV (Virtual Table Verification) • Intel’s Hardware Extension CET (Control-flow Enforcement Technology) Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Relevance and Impact High Impact of Attacks • Web browsers repeatedly exploited in pwn2own contests • Zero-day issues exploited in Stuxnet/Duqu [Microsoft, BH 2012] • iOS jailbreak Industry Efforts on Defenses • Microsoft EMETCan includes either a ROP be detection bypassed, engine or may not • Microsoft Controlbe Flow sufficiently Guard (CFG) effectivein Windows 10 • Google‘s compiler extension VTV (Virtual Table Verification) [Davi et al, Blackhat2014], [Liebchen et al CCS2015], • Intel’s Hardware[Schuster, Extension et CET al S&P2015] (Control-flow Enforcement Technology) Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Relevance and Impact High Impact of Attacks • Web browsers repeatedly exploited in pwn2own contests • Zero-day issues exploited in Stuxnet/Duqu [Microsoft, BH 2012] • iOS jailbreak Industry Efforts on Defenses • Microsoft EMET includes a ROP detection engine • Microsoft Control Flow Guard (CFG) in Windows 10 • Google‘s compiler extension VTV (Virtual Table Verification) • Intel’s Hardware Extension CET (Control-flow Enforcement Technology) Hot Topic of Research • A large body of recent literature on attacks and defenses Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 The whole story ….. Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Problem Space of Zero-Day Exploits Control-Flow Attack Non-Control-Data Attack [Shacham, ACM CCS 2007] [Chen et al., USENIX Sec. 2005] [Schuster et al., IEEE S&P 2015] [Hu et al., USENIX Sec. 2015] A B C D E F Memory write Adversary Program flow Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Problem Space of Zero-Day Exploits Control-Flow Attack Non-Control-Data Attack [Shacham, ACM CCS 2007] Basic Block [Chen et al., USENIX Sec. 2005] [Schuster et al., IEEE S&P 2015] [Hu et al., USENIX Sec. 2015] ENTRY A asm_ins, … EXIT B C D E F Memory write Adversary Program flow Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Problem Space of Zero-Day Exploits Control-Flow Attack Non-Control-Data Attack [Shacham, ACM CCS 2007] Basic Block [Chen et al., USENIX Sec. 2005] [Schuster et al., IEEE S&P 2015] [Hu et al., USENIX Sec. 2015] ENTRY A asm_ins, … EXIT B C D E F X inject malicious code Memory write Adversary Program flow Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Problem Space of Zero-Day Exploits Control-Flow Attack Non-Control-Data Attack [Shacham, ACM CCS 2007] Basic Block [Chen et al., USENIX Sec. 2005] [Schuster et al., IEEE S&P 2015] [Hu et al., USENIX Sec. 2015] ENTRY A asm_ins, … EXIT B corrupt code C D E pointer F X inject malicious code Memory write Adversary Program flow Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Problem Space of Zero-Day Exploits Control-Flow Attack Non-Control-Data Attack [Shacham, ACM CCS 2007] Basic Block [Chen et al., USENIX Sec. 2005] [Schuster et al., IEEE S&P 2015] [Hu et al., USENIX Sec. 2015] ENTRY A asm_ins, … EXIT B corrupt code C D E pointer F DEP X inject malicious code Memory write Adversary Program flow Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Problem Space of Zero-Day Exploits Control-Flow Attack Non-Control-Data Attack [Shacham, ACM CCS 2007] Basic Block [Chen et al., USENIX Sec. 2005] [Schuster et al., IEEE S&P 2015] [Hu et al., USENIX Sec. 2015] ENTRY A asm_ins, … EXIT B corrupt code C D E pointer F DEP X inject malicious code Memory write Adversary Program flow Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Problem Space of Zero-Day Exploits Control-Flow Attack Non-Control-Data Attack [Shacham, ACM CCS 2007] Basic Block [Chen et al., USENIX Sec. 2005] [Schuster et al., IEEE S&P 2015] [Hu et al., USENIX Sec. 2015] ENTRY A asm_ins, … EXIT B corrupt code C D E pointer CFI F DEP X inject malicious code Memory write Adversary Program flow Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Problem Space of Zero-Day Exploits Control-Flow Attack Non-Control-Data Attack [Shacham, ACM CCS 2007] Basic Block [Chen et al., USENIX Sec. 2005] [Schuster et al., IEEE S&P 2015] [Hu et al., USENIX Sec. 2015] ENTRY A asm_ins, … EXIT A B B corrupt code C D E pointer C D E CFI F F DEP X inject malicious code Memory write Adversary Program flow Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Problem Space of Zero-Day Exploits Control-Flow Attack Non-Control-Data Attack [Shacham, ACM CCS 2007] Basic Block [Chen et al., USENIX Sec. 2005] [Schuster et al., IEEE S&P 2015] [Hu et al., USENIX Sec. 2015] switch(opmode) ENTRY case recovery: C asm_ins, … A case op1: D EXIT A case op2: E,F B B corrupt code C D E pointer C D E CFI F F DEP X inject malicious code Memory write Adversary Program flow Summer School on real-world crypto and privacy, Šibenik (Croatia), June 11–15, 2018 Problem Space of Zero-Day Exploits Control-Flow Attack Non-Control-Data Attack [Shacham, ACM CCS 2007] Basic Block [Chen et al., USENIX Sec.