Portable executable analysis
Any UNIX or Windows binary executable file will have a header to describe its structure. This includes the base address of its code, data sections, and a list of functions that can be exported from the executable. When an executable file is executed by the operating system, first of all the operating system reads its header information and then loads the binary data from the binary file to populate the contents of the code and data sections of the address for the corresponding process.
A Portable Executable (PE) file is the file type that a Windows operating system can execute or run. The files that we run on Windows systems are Windows PE files; these can have EXE, DLL (Dynamic Link Library), and SYS (Device Driver) extensions. Also, they contain the PE file format.
Binary executable files on Windows have the following structure:
DOS Header (64 bytes)
PE Header
Sections (code and data)
We will now examine each of them in detail.
DOS header
The DOS Header starts with...