Fixing the call instruction

All that is left to do is to fix the call gets() instruction so that it would point to our new code. We use the same binary string 0xE8 0xF3 0xFA 0xFF 0xFF 0x83 0xC4 0x04 in order to locate the call we are interested in and replace the 0xF3 0xFA 0xFF 0xFF bytes with 0x0F 0xC8 0x00 0x00, which is the exact offset from the instruction following the call to our new section. The following screenshot illustrates precisely this:

At last, save the file and try to launch it. If the patching has been done correctly, then you will see the same result as with the previous approach.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset