exploiting correcting codes on the effectiveness of ecc
play

Exploiting Correcting Codes: On the Effectiveness of ECC Memory - PowerPoint PPT Presentation

Exploiting Correcting Codes: On the Effectiveness of ECC Memory Against Rowhammer Attacks Lucian Cojocar, Kaveh Razavi, Cristiano Giuffrida, Herbert Bos Rowhammer (RH) causes bits to flip Exploit to escalate privilege [Seaborn 15]


  1. Exploiting Correcting Codes: On the Effectiveness of ECC Memory Against Rowhammer Attacks Lucian Cojocar, Kaveh Razavi, Cristiano Giuffrida, Herbert Bos

  2. Rowhammer (RH) causes bits to flip Exploit to escalate privilege [Seaborn ’15] ● Exploit to escape sandboxes [Seaborn ’15, Gruss ’18] ● Exploit to compromise confidentiality [Razavi ‘16] ● Exploit different targets: ● Desktop computers (browser, local shell etc.) – On phones [van der Veen ‘17], on GPUs [Frigo ‘18] – Over the network [Tatar ‘18, Lipp ‘18] –

  3. Previous RH attacks are on non-server memory 1 2 3 4 5 6 7 8

  4. Previous RH attacks are on non-server memory 1 2 3 4 5 6 7 8 ECCploit, RH on server (ECC) memory 1 2 3 4 C 5 6 7 8

  5. Overview 1) Challenges for RH on ECC memory 2) Single-bit flips on ECC memory 1) Causing them 2) Observing them 3) Reverse engineering of ECC functions 4) Performance of Rowhammer on ECC memory

  6. What makes the exploitation of ECC memory difficult?

  7. BIT FLIPS BIT FLIPS

  8. It is hard (and dangerous) to get 3 bit flips Probability of X bits to be flipped 1 bit flipped 2 bits flipped 3 bits flipped

  9. It is hard (and dangerous) to get 3 bit flips Probability of X bits to be flipped Corrected by ECC 1 bit flipped 2 bits flipped 3 bits flipped

  10. It is hard (and dangerous) to get 3 bit flips Probability of X bits to be flipped Corrected by ECC 1 bit flipped Potentially uncorrectable 2 bits flipped machine crash 3 bits flipped

  11. It is hard (and dangerous) to get 3 bit flips Probability of X bits to be flipped Corrected by ECC 1 bit flipped Potentially uncorrectable 2 bits flipped machine crash Potentially uncorrectable 3 bits flipped potentially undetectable

  12. It is hard (and dangerous) to get 3 bit flips Probability of X bits to be flipped Corrected by ECC 1 bit flipped Potentially uncorrectable 2 bits flipped machine crash Potentially uncorrectable 3 bits flipped potentially undetectable Kind of useless for Rowhammer

  13. It is hard (and dangerous) to get 3 bit flips Probability of X bits to be flipped Corrected by ECC 1 bit flipped Potentially uncorrectable 2 bits flipped machine crash Potentially uncorrectable 3 bits flipped potentially undetectable Rowhammer on ECC memory is a mere DoS attack!

  14. It is hard (and dangerous) to get 3 bit flips Probability of X bits to be flipped Corrected by ECC 1 bit flipped Potentially uncorrectable 2 bits flipped machine crash Potentially uncorrectable 3 bits flipped potentially undetectable ECCploit is an upgrade from the DoS attack. ECCploit only causes undetectable bit flips

  15. Q: How to get from one bit flip to three bit flips without hitting two bit flips? 1 3

  16. A: Templating bit flips on ECC memory (ECCploit) 1. Get single bit flips 2. Combine them to cause silent corruptions (same ECC)

  17. Challenge: causing a single bit to flip

  18. Challenge: causing a single bit to flip 1 1 1 1 1 1 ... 1 A V 0 1 1 1 1 1 ... 1 1 1 1 1 1 1 ... 1 A

  19. Challenge: causing a single bit to flip 1 1 1 1 1 1 ... 1 A V 0 1 1 1 1 1 ... 1 1 1 1 1 1 1 ... 1 A

  20. Challenge: causing a single bit to flip 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 ... 1 A A: A: V 0 1 1 1 1 1 ... 1 V: 1 0 1 1 1 1 ... 1 V: 1 1 0 1 1 1 ... 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 ... 1 A A: A: A: 1 1 1 1 1 1 ... 1 A: 1 1 1 1 1 1 ... 1 A: 1 1 1 1 1 1 ... 1 V: 1 1 1 0 1 1 ... 1 V: 1 1 1 1 0 1 ... 1 V: 1 1 1 1 1 0 ... 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 ... 1 A: A: A:

  21. Challenge: observing a single bit flip

  22. Challenge: observing a single bit flip

  23. ECC correction is observable Word offset inside row

  24. A: Templating bit flips on ECC memory (ECCploit) 1. Get single bit flips 2. Combine them to cause silent corruptions (same ECC)

  25. Challenge: finding a suitable 3 bit flip that cause silent corruptions

  26. Challenge: finding a suitable 3 bit flip that cause silent corruptions

  27. Challenge: finding a suitable 3 bit flip that cause silent corruptions Reverse engineering the ECC implementation

  28. ECC errors reveal the ECC function Fault injection on the memory bus Cold-boot attack

  29. ECC errors reveal the ECC function Fault injection on the memory bus Cold-boot attack

  30. CPU writes data and control bits 1 2 3 4 64 bits of data 64 bits of data Memory C Controller 8 bits of ECC 5 6 7 8 ECC bits are stored *ptr = data; ControlBits = ECC(data); next to data

  31. CPU writes data and control bits 1 2 3 4 64 bits of data 64 bits of data Memory C Controller 8 bits of ECC 5 6 7 8 ECC bits are stored *ptr = data; ControlBits = ECC(data); next to data

  32. CPU reads data and checks control bits 1 2 3 4 64 bits of data 64 bits of data Memory C Controller 8 bits of ECC 5 6 7 8 CB_exp = ECC(data); ECC bits are stored data = *ptr; if (CB_read != CB_exp) next to data Error( DataForRAS );

  33. We can reconstruct the ECC function by observing ECC errors 1 2 3 4 64 bits of data 64 bits of data Memory C Controller 8 bits of ECC 5 6 7 8 CB_exp = ECC(data); ECC bits are stored data = *ptr; if (CB_read != CB_exp) next to data Error( DataForRAS );

  34. We can reconstruct the ECC function by observing ECC errors 1 2 3 4 64 bits of data 64 bits of data Memory C Controller 8 bits of ECC 5 6 7 8 CB_exp = ECC(data); ECC bits are stored data = *ptr; if (CB_read != CB_exp) next to data Error( DataForRAS );

  35. We can reconstruct the ECC function by observing ECC errors 1 2 3 4 64 bits of data 64 bits of data Memory C Controller 8 bits of ECC 5 6 7 8 CB_exp = ECC(data); ECC bits are stored data = *ptr; if (CB_read != CB_exp) next to data Error( DataThatWeUseForRE );

  36. ECCploit attack 1) Recover the ECC function (offline) 2) Template the memory 1) Avoid crashes by triggering only single-bit flips 2) Knowing the ECC function, combine single bit flips in undetectable bit flips 3) Massage the memory 4) Run the Exploit

  37. How long it takes to template ECC memory for Rowhammer?* *On our setup

  38. How long it takes to template ECC memory for Rowhammer?* ● If a perfect side channel (bit granularity) it takes: – 32 minutes for PTE or code change – 2 hours for the RSA key attack *On our setup

  39. How long it takes to template ECC memory for Rowhammer?* ● If a perfect side channel (bit granularity) it takes: – 32 minutes for PTE or code change – 2 hours for the RSA key attack ● If a typical side channel (word granularity) it takes: – 19 hours for PTE or code change – 3 days for RSA key attack *On our setup

  40. Error Correcting Codes: Only Slow Down Rowhammer Attacks https://vusec.net/projects/eccploit

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend