githubEdit

prealloc (reserve pre-allocated pools)

Description of the 'prealloc' command in HyperDbg.

Command

prealloc

Syntax

prealloc [Type (string)] [Count (hex)]

Description

Reserves a specified number of pre-allocated pools. This command is mainly used to assist in the pre-allocation of pools for instant eventsarrow-up-right.

In some cases, you need to reserve multiple pools to be used in vmx-root mode. This command will allocate these pools in PASSIVE_LEVEL.

circle-info

HyperDbg tries to minimize the request for this command by allocating pools whenever your system is in PASSIVE_LEVEL.

Parameters

[Type (string)]

The type of pool(s) to be reserved.

Type

thread-interception

Used for storing details of processes with thousands of threads

monitor

!monitor command's extra pages

epthook

!ephook command's extra pages

epthook2

!ephook2 command's extra pages

regular-event

regular-safe-buffer

Regular event safe buffers ($bufferarrow-up-right) for instant eventsarrow-up-right

big-safe-buffer

[Count (hex)]

Number of pool(s) to be allocated and reserved.

Examples

Imagine we want to pre-allocate and reserve 0x10 number of pools for the '!monitorarrow-up-right' command. If we're operating in the Debugger Modearrow-up-right, first we need to reserve and allocate pools for a regular eventarrow-up-right, then we need to allocate the same amount of pools for the memory monitor EPT hooks.

Again if we want to pre-allocate and reserve 0x10 number of pools for the '!epthookarrow-up-right' command. If we're operating in the Debugger Modearrow-up-right, first we need to reserve and allocate pools for a regular eventarrow-up-right, then we need to allocate the same amount of pools for the memory epthook EPT hooks.

Assume we need to pre-allocate and reserve a safe bufferarrow-up-right for an event in the Debugger Modearrow-up-right. We can use the following command.

IOCTL

This function works by calling DeviceIoControl with IOCTL = IOCTL_RESERVE_PRE_ALLOCATED_POOLS, you have to send it in the following structure.

You should only fill the Type and Count of the above structure when the IOCTL returns from the kernel, other parts of this structure are filled with appropriate KernelStatus.

The Type can be from the following enum:

Remarks

This command will continue the debuggee for some time (in Debugger Mode). This means that you lose the current context (registers & memory) after executing this command.

Requirements

None

None

Last updated