1 / 12

Reverse Engineering

02/09/09. 2. RCE. Reverse (Code) Engineering

libitha
Download Presentation

Reverse Engineering

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    1. Reverse Engineering Ian Kayne

    2. 02/09/09 2 RCE

    3. 02/09/09 3 RCE Required knowledge/skills (x86) Platform knowledge – stack, registers etc “Some” assembly language C/C++ & as many other languages as possible Operating system mechanisms win32api Toolset (debugger, disasm, hex editor…) Mindset (patterns, logic)

    4. 02/09/09 4 RCE Imagine a strong protection mechanism

    5. 02/09/09 5 RCE Reversing demonstration

    6. 02/09/09 6 RCE After the demonstration, recap: Analysed executable Set breakpoints on likely API calls Traced up the call stack Analysed the code Found the good boy/bad boy “switch” Patched the jump “live” to test Converted RVA to file offset, patched file 1 byte patch

    7. 02/09/09 7 Protection Imagine a strong protection mechanism again License key system CRC Anti-debugging techniques Encryption

    8. 02/09/09 8 Protection Encryption for protection Data must be decrypted before use Code must be decrypted before execution UPX (packer), Armadillo, Themida… Can be made very hard, but not impossible Remember the jump loop – EB FE Generics – break one, break all Homebrew is risky – “learn the principles”

    9. 02/09/09 9 Protection Some obfuscation techniques: Encode obvious “beacon” strings Avoid win32api/library functions: bpx MessageboxA Use alternative functions/mechanisms E.g.: SetWindowPos instead of ShowWindow Roll your own api/GUI functions Can’t break on GetWindowText if you don’t use it! Hide code within the executable Self modifying code, PE sections etc

    10. 02/09/09 10 Protection Some anti-debugger techniques Deliberate exceptions (code in SEH) Self-debugging (can’t “stack” debuggers) Timers and counters Alter DR0 – DR7 hardware debug registers IsDebuggerPresent() Check for/attack known debugger processes, windows, services, drivers… (Starforce) http://www.securityfocus.com/infocus/1893

    11. 02/09/09 11 RCE Why are these low-level technical techniques important? “Learn the principles” Your first job: consultant to betting company about to release online gambling game The basics: Internet security Server security Data security But… what about the end-user software?

    12. 02/09/09 12 Review Thank you! Questions Comments Items to review Further study

More Related