Example Scripts

Now let's create some simple scripts that can assist in some of the common tasks you'll encounter when reversing a binary. You can build on many of these scripts for specific reversing scenarios or to create larger, more complex scripts, depending on the reversing task. We'll create some scripts to find cross-references to dangerous function calls, monitor function code coverage using an IDA debugger hook, and calculate the size of stack variables for all functions in a binary.

Finding Dangerous Function Cross-References

When a developer is looking for bugs in software, some common functions can be problematic if they are not used correctly. These include dangerous string-copying functions (strcpy, sprintf) and unchecked memory-copying ...

Get Gray Hat Python 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.