volatility3.plugins.windows.poolscanner module

class PoolConstraint(tag, type_name, object_type=None, page_type=None, size=None, index=None, alignment=1, skip_type_test=False)[source]

Bases: object

Class to maintain tag/size/index/type information about Pool header tags.

class PoolHeaderScanner(module, constraint_lookup, alignment)[source]

Bases: volatility3.framework.interfaces.layers.ScannerInterface

property context
Return type

Optional[ContextInterface]

property layer_name
Return type

Optional[str]

thread_safe = False
version = (0, 0, 0)
class PoolScanner(context, config_path, progress_callback=None)[source]

Bases: volatility3.framework.interfaces.plugins.PluginInterface

A generic pool scanner plugin.

Parameters
  • context (ContextInterface) – The context that the plugin will operate within

  • config_path (str) – The path to configuration data within the context configuration data

  • progress_callback (Optional[Callable[[float, str], None]]) – A callable that can provide feedback at progress points

build_configuration()

Constructs a HierarchicalDictionary of all the options required to build this component in the current context.

Ensures that if the class has been created, it can be recreated using the configuration built Inheriting classes must override this to ensure any dependent classes update their configurations too

Return type

HierarchicalDict

static builtin_constraints(symbol_table, tags_filter=None)[source]

Get built-in PoolConstraints given a list of pool tags.

The tags_filter is a list of pool tags, and the associated PoolConstraints are returned. If tags_filter is empty or not supplied, then all builtin constraints are returned.

Parameters
  • symbol_table (str) – The name of the symbol table to prepend to the types used

  • tags_filter (Optional[List[bytes]]) – List of tags to return or None to return all

Return type

List[PoolConstraint]

Returns

A list of well-known constructed PoolConstraints that match the provided tags

property config

The Hierarchical configuration Dictionary for this Configurable object.

Return type

HierarchicalDict

property config_path

The configuration path on which this configurable lives.

Return type

str

property context

The context object that this configurable belongs to/configuration is stored in.

Return type

ContextInterface

classmethod generate_pool_scan(context, layer_name, symbol_table, constraints)[source]
Parameters
  • context (ContextInterface) – The context to retrieve required elements (layers, symbol tables) from

  • layer_name (str) – The name of the layer on which to operate

  • symbol_table (str) – The name of the table containing the kernel symbols

  • constraints (List[PoolConstraint]) – List of pool constraints used to limit the scan results

Return type

Generator[Tuple[PoolConstraint, ObjectInterface, ObjectInterface], None, None]

Returns

Iterable of tuples, containing the constraint that matched, the object from memory, the object header used to determine the object

classmethod get_pool_header_table(context, symbol_table)[source]

Returns the appropriate symbol_table containing a _POOL_HEADER type, even if the original symbol table doesn’t contain one.

Parameters
  • context (ContextInterface) – The context that the symbol tables does (or will) reside in

  • symbol_table (str) – The expected symbol_table to contain the _POOL_HEADER type

Return type

str

classmethod get_requirements()[source]

Returns a list of Requirement objects for this plugin.

Return type

List[RequirementInterface]

classmethod make_subconfig(context, base_config_path, **kwargs)

Convenience function to allow constructing a new randomly generated sub-configuration path, containing each element from kwargs.

Parameters
  • context (ContextInterface) – The context in which to store the new configuration

  • base_config_path (str) – The base configuration path on which to build the new configuration

  • kwargs – Keyword arguments that are used to populate the new configuration path

Returns

The newly generated full configuration path

Return type

str

property open

Returns a context manager and thus can be called like open

classmethod pool_scan(context, layer_name, symbol_table, pool_constraints, alignment=8, progress_callback=None)[source]

Returns the _POOL_HEADER object (based on the symbol_table template) after scanning through layer_name returning all headers that match any of the constraints provided. Only one constraint can be provided per tag.

Parameters
  • context (ContextInterface) – The context to retrieve required elements (layers, symbol tables) from

  • layer_name (str) – The name of the layer on which to operate

  • symbol_table (str) – The name of the table containing the kernel symbols

  • pool_constraints (List[PoolConstraint]) – List of pool constraints used to limit the scan results

  • alignment (int) – An optional value that all pool headers will be aligned to

  • progress_callback (Optional[Callable[[float, str], None]]) – An optional function to provide progress feedback whilst scanning

Return type

Generator[Tuple[PoolConstraint, ObjectInterface], None, None]

Returns

An Iterable of pool constraints and the pool headers associated with them

run()[source]

Executes the functionality of the code.

Note

This method expects self.validate to have been called to ensure all necessary options have been provided

Return type

TreeGrid

Returns

A TreeGrid object that can then be passed to a Renderer.

set_open_method(handler)

Sets the file handler to be used by this plugin.

Return type

None

classmethod unsatisfied(context, config_path)

Returns a list of the names of all unsatisfied requirements.

Since a satisfied set of requirements will return [], it can be used in tests as follows:

unmet = configurable.unsatisfied(context, config_path)
if unmet:
    raise RuntimeError("Unsatisfied requirements: {}".format(unmet)
Return type

Dict[str, RequirementInterface]

version = (1, 0, 0)
class PoolType(value)[source]

Bases: enum.IntEnum

Class to maintain the different possible PoolTypes The values must be integer powers of 2.

FREE = 4
NONPAGED = 2
PAGED = 1