make dkom attacks great again
play

MAKE DKOM ATTACKS GREAT AGAIN MARIANO GRAZIANO Bologna, Italy - - PowerPoint PPT Presentation

MAKE DKOM ATTACKS GREAT AGAIN MARIANO GRAZIANO Bologna, Italy - 29/10/2016 1 whoami Security researcher at Cisco in the Talos group Ph.D. Telecom ParisTech/Eurecom Hackademic Malware analysis / memory forensics 2 ROOTKIT


  1. MAKE DKOM ATTACKS GREAT AGAIN MARIANO GRAZIANO Bologna, Italy - 29/10/2016 1

  2. whoami ‣ Security researcher at Cisco in the Talos group ‣ Ph.D. Telecom ParisTech/Eurecom ‣ Hackademic ‣ Malware analysis / memory forensics 2

  3. ROOTKIT “Software to maintain a persistent and stealthy access on a compromised machine” 3

  4. HOW? RING 3 RING 0 RING -1 RING -2 RING -3 PRIVILEGES 4

  5. HOW? DETECTION RING 3 RING 0 RING -1 RING -2 RING -3 PRIVILEGES 5

  6. HOW? DETECTION RING 3 COMMON ROOTKITS RING 0 RING -1 RING -2 RING -3 PRIVILEGES 6

  7. HOW? DETECTION RING 3 RING 0 - “Subvirt: Implementing malware with virtual machines“ - S&P 06 RING -1 RING -1 - Blue Pill - Joanna Rutkowska - Syscan 06 - Vitriol - Dino Dai Zovi - BHUS 06 RING -2 RING -3 PRIVILEGES 7

  8. HOW? DETECTION RING 3 - Duflot SMM research - “SMM rootkits: A new breed of OS independent malware” - SP 08 RING 0 - “System Management Mode Hacks” - Phrack #65 - ’08 - “Real SMM Rootkit: Reversing and Hooking BIOS SMI Handlers” - Phrack #66 - ’09 RING -1 RING -2 - “Implementing SMM PS/2 Keyboard sniffer” - Beist - 2009 - NSA - http://blog.cr4.sh/2016/02/exploiting-smm-callout-vulnerabilities.html RING -2 RING -3 PRIVILEGES 8

  9. HOW? 9

  10. HOW? DETECTION RING 3 RING 0 - “Introducing Ring -3 Rootkits” - Tereshkin & Wojtczuk - BHUS’09 - “Understanding DMA Malware” - Stewin et al. - DIMVA ‘12 RING -1 RING -3 - http://me.bios.io/Resources RING -2 RING -3 PRIVILEGES 10

  11. HOW? DKOM BOOTKITS ROP ROOTKITS BLUEPILLS FIRMWARE 11

  12. HOW? DKOM BOOTKITS ROP ROOTKITS BLUEPILLS FIRMWARE 12

  13. ROP ¡ROOTKIT? ‣ Motivation ‣ “ Return-oriented rootkits: Bypassing kernel code integrity protection mechanisms ” - USENIX Security 09 ‣ “ Persistent Data-only Malware: Function Hooks without Code ” - NDSS ‘14 13

  14. ROP ¡ROOTKIT? ‣ Persistence technique: ‣ CVE-2013-2094 ‣ sysenter ‣ IA32_SYSENTER_ESP (0x175) ‣ IA32_SYSENTER_EIP (0x176) 14

  15. ROP ¡ROOTKIT? Chuck ROP chains: 15

  16. DKOM “ D irect K ernel O bject M anipulation” 16

  17. TRADITIONAL ¡DKOM EPROCESS EPROCESS EPROCESS 17

  18. TRADITIONAL ¡DKOM EPROCESS EPROCESS EPROCESS 18

  19. DKOM ¡vs ¡PROCESSES ‣ DKOM is a generic technique ‣ Processes: ‣ Windows: KPROCESS/EPROCESS/PEB ‣ Linux: task_struct ‣ OSX : proc/task 19

  20. (E)PROCESS? 20

  21. (E)PROCESS? 21

  22. (K)PROCESS? 22

  23. PROCESS? 23

  24. PROCESS? ‣ EPROCESS info: ‣ Creation and exit time ‣ PID and PPID ‣ Pointer to the handle table ‣ VAD, etc ‣ PEB info: ‣ Pointer to the Image Base Address ‣ Pointer to the DLLs loaded ‣ Heap size, etc 24

  25. DKOM ¡DEFENSES ‣ Kernel data integrity solutions: ‣ invariants ‣ external systems ‣ memory analysis ‣ data partitioning 25

  26. VOLATILITY ¡-­‑ ¡PSLIST 26

  27. DEMO “ DKOM DEMO ” 27

  28. E-­‑DKOM “ E volutionary D irect K ernel O bject M anipulation” “Subverting Operating System Properties through Evolutionary DKOM Attacks” Mariano Graziano, Lorenzo Flore, Andrea Lanzi, Davide Balzarotti DIMVA 2016, San Sebastian, Spain 28

  29. E-­‑DKOM Data structure of interest Time 29

  30. E-­‑DKOM Violation of a temporal property 30

  31. E-­‑DKOM Violation of a temporal property The attack cannot be detected looking at a single snapshot 31

  32. STATE ¡vs ¡PROPERTY ‣ Traditional DKOM affects the state and are discrete ‣ Evolutionary DKOM (E-DKOM) affects the evolution in time of a given property and are continuous 32

  33. LINUX ¡CFS ¡SCHEDULER 33

  34. LINUX ¡CFS ¡SCHEDULER target 34

  35. LINUX ¡CFS ¡SCHEDULER target right-most 35

  36. LINUX ¡CFS ¡SCHEDULER Set target vruntime > rightmost vruntime target right-most 36

  37. LINUX ¡CFS ¡SCHEDULER We affect the evolution of the data structure over time. We altered the scheduler property (fair execution) target target 37

  38. DEMO “ E-DKOM DEMO ” 38

  39. DEFENSES? ‣ Reference monitor that mimics the OS property: ‣ OS specific ‣ Difficult to generalize 39

  40. DEFENSE ¡FRAMEWORK 40

  41. DEFENSE ¡FRAMEWORK 41

  42. DEFENSE ¡FRAMEWORK 42

  43. FUTURE ‣ Minimalism ‣ Possibile trends: ‣ Infections for the masses ‣ Stealthy and multi stage attacks ‣ Cat and mouse game ‣ Microsoft approach: ‣ Credential Guard ‣ Application Guard 43

  44. CONCLUSION ‣ Rootkit technology evolution ‣ New attack based on data structure evolution ‣ Experiment on the Linux CFS scheduler ‣ Defense based on hypervisor ‣ General mitigation/solution very hard 44

  45. THE ¡END THANK YOU email: magrazia@cisco.com twitter: @emd3l 45

Recommend


More recommend