feel me flow a review of control flow integrity methods
play

Feel me Flow: A Review of Control-Flow Integrity Methods for User - PowerPoint PPT Presentation

Feel me Flow: A Review of Control-Flow Integrity Methods for User and Kernel Space Irene Dez-Franco, Igor Santos DeustoTech, University of Deusto irene.diez@deusto.es isantos@deusto.es Rationale Rationale Code injection attacks Code


  1. Feel me Flow: A Review of Control-Flow Integrity Methods for User and Kernel Space Irene Díez-Franco, Igor Santos DeustoTech, University of Deusto irene.diez@deusto.es isantos@deusto.es

  2. Rationale

  3. Rationale

  4. Code injection attacks

  5. Code injection attacks Control Flow Graph Intended flow Memory error

  6. Code injection attacks Control Flow Graph Intended flow Memory error Attacker

  7. Code injection attacks Control Flow Graph Intended flow Memory error Injected code Actual flow Attacker

  8. Code injection attacks Code injection Control Flow Graph Intended flow Memory error Injected code Actual flow Attacker

  9. Code injection attacks Code injection Data Execution Prevention (DEP) / Write XOR Execute (W ⊕ E) Canaries Control Flow Graph Intended flow Memory error Injected code Actual flow Attacker

  10. Code reuse attacks

  11. Code reuse attacks Control Flow Graph Intended flow Memory error

  12. Code reuse attacks x0fo86 x0e58b Control Flow Graph Intended flow Memory error Attacker

  13. Code reuse attacks x0fo86 x0e58b x0e58b x0fo86 Control Flow Graph Intended flow Memory error Attacker

  14. Code reuse attacks x0fo86 x0e58b x0e58b Code reuse G G x0fo86 Control Flow Graph Intended flow Memory error G Gadget Actual flow Attacker

  15. Code reuse attacks x0fo86 x0e58b x0e58b Code reuse G ASLR Kernel ASLR G → Statistical x0fo86 Control Flow Graph Intended flow Memory error G Gadget Actual flow Attacker

  16. Code reuse attacks x0fo86 x0e58b x0e58b Code reuse G ASLR Kernel ASLR G → Statistical x0fo86 Control Flow Integrity (CFI) Control Flow Graph Intended flow Memory error G Gadget Actual flow Attacker

  17. Control-Flow Integrity (CFI) Abadi et al. CCS’05

  18. Control-Flow Integrity (CFI) Abadi et al. CCS’05 1 - Offline: CFG computation

  19. Control-Flow Integrity (CFI) Abadi et al. CCS’05 1 - Offline: CFG computation

  20. Control-Flow Integrity (CFI) Abadi et al. CCS’05 1 2 3 4 5 6 7 Control Flow Graph (CFG) 1 - Offline: CFG computation

  21. Control-Flow Integrity (CFI) Abadi et al. CCS’05 1 2 3 4 5 6 7 Control Flow Graph (CFG) 2 - Runtime: CFG enforcement 1 - Offline: CFG computation

  22. Control-Flow Integrity (CFI) Abadi et al. CCS’05 1 1 → {2, 3} 2 → {4, 5} 2 3 3 → {6} 4 → {2} 5 → {7} 4 5 6 6 → {7} 7 → { ∅ } 7 Control Flow Graph (CFG) Enforced CFG 2 - Runtime: CFG enforcement 1 - Offline: CFG computation

  23. Control-Flow Integrity (CFI) Abadi et al. CCS’05 1 1 3 1 → {2, 3} 2 → {4, 5} 2 3 3 → {6} 4 → {2} 6 Execution 1 5 → {7} 4 5 6 6 → {7} 7 7 → { ∅ } 7 Control Flow Graph (CFG) Enforced CFG 2 - Runtime: CFG enforcement 1 - Offline: CFG computation

  24. Control-Flow Integrity (CFI) Abadi et al. CCS’05 1 1 3 1 → {2, 3} 2 → {4, 5} 2 3 3 → {6} 4 → {2} 6 Execution 1 5 → {7} 4 5 6 6 → {7} 7 7 → { ∅ } 7 Control Flow Graph (CFG) Enforced CFG 2 - Runtime: CFG enforcement 1 - Offline: CFG computation

  25. Control-Flow Integrity (CFI) Abadi et al. CCS’05 1 1 3 1 → {2, 3} 2 → {4, 5} 2 3 3 → {6} 4 → {2} 6 Execution 1 5 → {7} 4 5 6 6 → {7} 7 7 → { ∅ } 7 1 Control Flow Graph (CFG) Enforced CFG 2 Execution 2 5 2 - Runtime: CFG enforcement 1 - Offline: CFG computation

  26. Control-Flow Integrity (CFI) Abadi et al. CCS’05 1 1 3 1 → {2, 3} 2 → {4, 5} 2 3 3 → {6} 4 → {2} 6 Execution 1 5 → {7} 4 5 6 6 → {7} 7 7 → { ∅ } 7 1 Control Flow Graph (CFG) Enforced CFG 2 Execution 2 5 2 - Runtime: CFG enforcement 1 - Offline: CFG computation

  27. Control-Flow Integrity (CFI) Abadi et al. CCS’05 1 1 3 1 → {2, 3} 2 → {4, 5} 2 3 3 → {6} 4 → {2} 6 Execution 1 5 → {7} 4 5 6 6 → {7} 7 7 → { ∅ } 7 1 Control Flow Graph (CFG) Enforced CFG 2 Execution 2 5 2 - Runtime: CFG enforcement 1 - Offline: CFG computation

  28. Control-Flow Integrity (CFI) - II x0fo86 x0e58b x0e58b Code reuse G G x0fo86 Attacker’s goal execution Original CFG Intended flow Memory error Gadget G Actual flow Attacker

  29. Control-Flow Integrity (CFI) - II x0e58b G G x0fo86 Original CFG Intended flow Memory error Gadget G Actual flow Attacker

  30. Control-Flow Integrity (CFI) - II x0fo86 x0e58b x0e58b Code reuse G G x0fo86 Abort execution Original CFG Intended flow Memory error Gadget G Actual flow Attacker

  31. CFI Internals

  32. CFI Internals Computation phase Flow sensitive VS flow insensitive

  33. CFI Internals Computation phase Flow sensitive VS flow insensitive 1 | obj = &x; 2 | 3 | obj = &y;

  34. CFI Internals Computation phase Flow sensitive VS flow insensitive obj at 1 → {x} obj → {x, y} 1 | obj = &x; obj at 2→ {y} 2 | 3 | obj = &y; Insensitive Sensitive

  35. CFI Internals Computation phase Flow sensitive VS flow insensitive obj at 1 → {x} obj → {x, y} 1 | obj = &x; obj at 2→ {y} 2 | 3 | obj = &y; Insensitive Sensitive Context sensitive VS context insensitive

  36. CFI Internals Computation phase Flow sensitive VS flow insensitive obj at 1 → {x} obj → {x, y} 1 | obj = &x; obj at 2→ {y} 2 | 3 | obj = &y; Insensitive Sensitive Context sensitive VS context insensitive A B C D E Where can we return to from function C?

  37. CFI Internals Computation phase Flow sensitive VS flow insensitive obj at 1 → {x} obj → {x, y} 1 | obj = &x; obj at 2→ {y} 2 | 3 | obj = &y; Insensitive Sensitive Context sensitive VS context insensitive → B & E A B C Insensitive → B if called from B, D E E if called from E: Sensitive Where can we return to from function C?

  38. CFI Internals Computation phase Enforcement phase Flow sensitive VS flow insensitive Forward vs backward control-flow transfers obj at 1 → {x} obj → {x, y} 1 | obj = &x; obj at 2→ {y} 2 | 3 | obj = &y; Insensitive Sensitive Context sensitive VS context insensitive → B & E A B C Insensitive → B if called from B, D E E if called from E: Sensitive Where can we return to from function C?

  39. CFI Internals Computation phase Enforcement phase Flow sensitive VS flow insensitive Forward vs backward control-flow transfers obj at 1 → {x} obj → {x, y} 1 | obj = &x; Forward Backward obj at 2→ {y} 2 | 3 | obj = &y; A B A B Insensitive Sensitive Both Context sensitive VS context insensitive A B → B & E A B C Insensitive → B if called from B, D E E if called from E: Sensitive Where can we return to from function C?

  40. CFI Internals Computation phase Enforcement phase Flow sensitive VS flow insensitive Forward vs backward control-flow transfers obj at 1 → {x} obj → {x, y} 1 | obj = &x; Forward Backward obj at 2→ {y} 2 | 3 | obj = &y; A B A B Insensitive Sensitive Both Context sensitive VS context insensitive A B → B & E A B C Insensitive Which control-flow → B if called from B, D E transfers do we E if called from E: take into account? Sensitive Where can we return to from function C?

  41. Comparison fields

  42. Comparison fields Control Flow Transfers Less secure Backward Forward More secure

  43. Comparison fields Control Flow Transfers Less secure Backward Forward ∅ Every control flow transfer is allowed More secure

  44. Comparison fields Control Flow Transfers Less secure Backward Forward ∅ Every control flow transfer is allowed Makes the assumption that two destinations Equivalent classes are equivalent if they come from the same source More secure

  45. Comparison fields Control Flow Transfers Less secure Backward Forward ∅ Every control flow transfer is allowed Makes the assumption that two destinations Equivalent classes are equivalent if they come from the same source May or may not work on specially crafted Heuristics cases More secure

  46. Comparison fields Control Flow Transfers Less secure Backward Forward ∅ Every control flow transfer is allowed Makes the assumption that two destinations Equivalent classes are equivalent if they come from the same source May or may not work on specially crafted Heuristics cases More secure

  47. Comparison fields Control Flow Transfers Less secure Backward Forward ∅ Every control flow transfer is allowed Makes the assumption that two destinations Equivalent classes are equivalent if they come from the same source May or may not work on specially crafted Heuristics cases ( Hardware) Limited There is some restriction on full CS Context Sensitivity More secure

  48. Comparison fields Control Flow Transfers Less secure Backward Forward ∅ Every control flow transfer is allowed Makes the assumption that two destinations Equivalent classes are equivalent if they come from the same source May or may not work on specially crafted Heuristics cases (Hardware) Limited There is some restriction on full CS Context Sensitivity Context Sensitive More secure

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