7SIMPLE CODE INJECTION TECHNIQUES FOR ELF
In this chapter, you’ll learn several techniques for injecting code into an existing ELF binary, allowing you to modify or augment the binary’s behavior. Although the techniques discussed in this chapter are convenient for making small modifications, they’re not very flexible. This chapter will demonstrate their limitations so you can understand the need for more comprehensive code modification techniques, which you’ll learn in Chapter 9.
7.1 Bare-Metal Binary Modification Using Hex Editing
The most straightforward way to modify an existing binary is by directly editing it using a hex editor, which is a program that represents the bytes of a binary file in hexadecimal format and allows you to edit these ...