smt in reverse engineering for dummies
play

SMT in reverse engineering, for dummies Carl Svensson September 4, - PowerPoint PPT Presentation

SMT in reverse engineering, for dummies Carl Svensson September 4, 2016 SEC-T 2016 About me Carl Svensson, 25 MSc in Computer Science, KTH IT Security consultant, Bitsec AB CTF-player, HackingForSoju


  1. SMT in reverse engineering, for dummies Carl Svensson September 4, 2016 SEC-T 2016

  2. About me ∙ Carl Svensson, 25 ∙ MSc in Computer Science, KTH ∙ IT Security consultant, Bitsec AB ∙ CTF-player, HackingForSoju ∙  calle.svensson@zeta-two.com ∙  @zetatwo ∙  https://zeta-two.com 1

  3. Reverse engineering in 15 seconds? ∙ Take stuff, e.g. software, apart ∙ Understand how it works ∙ Many possible goals ∙ How can I reach a specific state? 2

  4. What is SMT? ∙ Satisfiability modulo theories, SMT ∙ A bunch of variables ∙ A bunch of theories ∙ Theory = A bunch of rules ∙ A bunch of formulas ∙ Can we find values for all values s.t. all formulas are satisifed? 3

  5. SMT: Example 1 4 x + 13 = 37

  6. SMT: Example 2 5 x + y + 13 = 37 − z x − 2 · y + 10 = 10 · z 4 · x − z + 13 = 37 + y

  7. SMT: Example 3 6

  8. Microsoft to the rescue ∙ Can we automate? Yes! ∙ Microsoft Research ∙ Z3 Theorem Prover ∙ General purpose ∙ Own language ∙ Bindings for several languages ∙ Open source & cross platform 7

  9. Using Z3 in RE Throwback Thursday: Starcraft 8

  10. Throwback Thursday: Starcraft ∙ Commercial software ∙ Released in 1998 ∙ Simple protections ∙ Good starting point ∙ Requires a serial key ∙ Can we create our own? 9

  11. Getting to the core: Installer 10

  12. Getting to the core: Serial key input 11

  13. Getting to the core: Resource strings 12

  14. Getting to the core: Decompilation 13

  15. Getting to the core: Call graph 14

  16. Getting to the core: Call graph 15

  17. Getting to the core: Decompilation 16

  18. Z3: Formulating formulas 17

  19. Z3: Formulating formulas 18

  20. Once again, with fee... angr ∙ ”python framework for analyzing binaries” ∙ ”both static and dynamic symbolic (concolic)” ∙ Computer Security Lab at UC Santa Barbara ∙ Uses Z3 internally 19

  21. Angr management: Extracting the code 20

  22. Angr management: Minimizing the code 21

  23. Angr management: Writing the explorer 22

  24. Thanks for listening! 23

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