Key Points for _PEB Flashcards

1
Q

_PEB - BeingDebugged

A

Tells you whether the process is currently being debugged. We’ve seen malware that attaches to itself(by calling DebugActiveProcess). Because only one debugger at a time can attach to a target process, it served as anti-debugging protection. Thus, there is a red glad if this value is set to true, but there are no legitimate debuggers running.

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

_PEB - ImageBaseAddress

A

The address in process memory where the main executable (.exe) is loaded. Before volatility’s procdump plugin carves an executable from memory, it reads the value so it knows where to look.

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

_PEB - Ldr

A

Points to a _PEB_LDR_DATA structure, which contains details about the DLLs loaded in a process.

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

_PEB - ProcessParameters

A

Points to a _RTL_PROCESS_PARAMETERS structure.

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

_PEB - ProcessHeap

A

Primary heap for the process, which is created automatically when the process is initialized.

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

_PEB - NumberOfHeaps

A

Number of heaps in a process. By default, a process has only one heap, but it can create others by calling HeapCreate.

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

_PEB - ProcessHeaps

A

An array of pointers to process heaps. The first entry in this list always points to the same location as ProcessHeap because it is the primary.

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

_PEB.ProcessParameters.Environment

A

A process’ environment variables are pointed to be _PEB.ProcessParameters.Environment. The variables are organized as multiple NULL-terminated strings. If an attacker manipulates these variables, they can cause the target application to unexpectedly execute malicious code. Some malware marks its presence by creating environmental variables rather than mutexes.

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

Attacks on Environmental Variables

A

The two most common attacks on environmental variables include changing the PATH and PATHEXT variables. Modifying these values has an effect similar to search-order hijacking. (Kind of like changing the boot order in BIOS)

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