9BINARY INSTRUMENTATION

In Chapter 7, you learned several techniques for modifying and augmenting binary programs. While relatively simple to use, those techniques are limited in the amount of new code you can insert into the binary and where you can insert it. In this chapter, you’ll learn about a technique called binary instrumentation that allows you to insert a practically unlimited amount of code at any location in a binary to observe or modify that binary’s behavior.

After a brief overview of binary instrumentation, I’ll discuss how to implement static binary instrumentation (SBI) and dynamic binary instrumentation (DBI), two types of binary instrumentation with different trade-offs. Finally, you’ll learn how to build your own binary instrumentation ...

Get Practical Binary Analysis 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.