Chapter 6. Debugging and Reverse Engineering

Debuggers are the main tools used for reverse engineering. With debuggers, we can perform analysis at runtime to understand the program. We can identify the call chains and track indirect calls. With debuggers, we can analyze and watch program runtime to guide our reverse engineering. In this chapter, we'll learn how to use debuggers in our scripts.

Topics covered in this chapter are as follows:

  • Portable executable analysis
  • Disassembling with Capstone
  • PEfile with Capstone
  • Debugging using PyDBG

Reverse engineering

There are three main kinds of reverse engineering analysis:

  • Static analysis: Analysis of the contents of a binary file. This helps to determine the structure of the executable portions and print out ...

Get Effective Python Penetration Testing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.