PE to Shellcode – Transforming PE Files into Shellcode
You now have a solid foundation of knowledge on how to design a minimalist application loader. We can move on to how to convert any executable directly into shellcode without having to write the shellcode. In this chapter, we will introduce how to write a lightweight loader in x86 assembly that can be used to convert any EXE file to shellcode.
In this chapter, we’re going to cover the following main topics:
- Parsing Kernel32’s export table in x86 assembly
- Getting API addresses in x86 assembly
- File mapping and repairing the import table in x86
- Handling relocation in x86
- An example of PE to shellcode