
Figure 11.9 Fake Chunk
Also keep in mind that bk + 8 will be overwritten with the address of “return loca-
tion – 12”. If shellcode is to be placed in this location, you must have a jump instruction
at “return address” to get past the bad instruction found at return address + 8. What
usually is done is simply a jmp 10 with nop padding. After the overflow occurs with the
fake chunk, the two chunks should look like that shown in Figure 11.10.
Figure 11.10 Overwritten Chunk
Upon the second free in our example vulnerable program, the overwritten chunk is
unlinked and the pointer overwriting occurs. If shellcode is placed in the address speci-
fied in the bk ...