Code Caving PE Files
Code Caving is a Very easy topic to work on
PE (Portable Execuatble) has different section to store data. ".text" section contains the assembly code that is going to be executade by the CPU. Find a space in the .text file which has null spaces.
JMP instruction to the freespace available. from the start of the programs. also copy the Call for the main funciton
Save the state of the registers by using pushad, pushfd
add the shell code after that.
Find the exit call and JMP to the New function call
POP the registers vale at that point by popfd,popad
Then Add the main PE function call so that the program runs currectly.
Last updated