Reader small image

You're reading from  Windows APT Warfare

Product typeBook
Published inMar 2023
Reading LevelIntermediate
PublisherPackt
ISBN-139781804618110
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Sheng-Hao Ma
Sheng-Hao Ma
author image
Sheng-Hao Ma

Sheng-Hao Ma is currently working as a threat researcher at TXOne Networks, specializing in Windows reverse engineering analysis for over 10 years. In addition, he is currently a member of CHROOT, an information security community in Taiwan. He has served as a speaker and instructor for various international conferences and organizations such as Black Hat USA, DEFCON, CODE BLUE, HITB, VXCON, HITCON, ROOTCON, Ministry of National Defense, and Ministry of Education.
Read more about Sheng-Hao Ma

Right arrow

Dynamic file mapping

In this section, we will discuss how the PE static file is created as a new process and how the program file is mapped and mounted into its dynamic memory. Figure 2.6 shows a simplified process for mapping a static PE program into memory:

Figure 2.6 – File mapping process

Figure 2.6 – File mapping process

The left-hand side of Figure 2.6 shows a container for memory contents, while the right-hand side shows a static PE file that has not been executed yet and is located in a disk. The following is a systematic explanation of the process by which the operating system mounts its static files into dynamic ones:

  1. First, the system checks the ImageBase address of the Optional Header entry in NT Headers (currently 0x400000), which is the address expected to be sprayed in the dynamic during compiling a program. Note that if ASLR protection and the relocation function are enabled at the same time, it may be a random ImageBase.
  2. Next, the system checks SizeOfImage...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Windows APT Warfare
Published in: Mar 2023Publisher: PacktISBN-13: 9781804618110

Author (1)

author image
Sheng-Hao Ma

Sheng-Hao Ma is currently working as a threat researcher at TXOne Networks, specializing in Windows reverse engineering analysis for over 10 years. In addition, he is currently a member of CHROOT, an information security community in Taiwan. He has served as a speaker and instructor for various international conferences and organizations such as Black Hat USA, DEFCON, CODE BLUE, HITB, VXCON, HITCON, ROOTCON, Ministry of National Defense, and Ministry of Education.
Read more about Sheng-Hao Ma