Windows Memory Layout Flashcards

Understand Windows Memory Layout, DLL, heap, stack etc

1
Q

This portion of memory is reserved by the OS for device drivers, system cache, paged/non-paged pool, HAL, etc. There is no user access to this portion of memory.

A

Kernel Land

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a DLL.

A

Windows programs take advantage of shared code libraries called Dynamic Link Libraries (DLLs) which allows for efficient code reuse and memory allocation. These DLLs (also known as modules or executable modules) occupy a portion of the memory space. There are OS/system modules (ntdll, user32, etc) as well as application-specific modules and the latter are often useful in crafting overflow exploits.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

__ portion of memory is where the executable resides. This includes the .text section (containing the executable code/CPU instructions) the .data section (containing the program’s global data) and the .rsrc section (contains non-executable resources, including icons, images, and strings).

A

Program Image

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Describe what the Heap is.

A

The heap is the dynamically allocated (e.g. malloc( )) portion of memory a program uses to store global variables. Unlike the stack, heap memory allocation must be managed by the application. In other words, that memory will remain allocated until it is freed by the program or the program itself terminates.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Describe the Stack

A

The stack is used to allocate short-term storage for local (function/method) variables in an ordered manner and that memory is subsequently freed at the termination of the given function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly