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, additional_structures=None)[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: Optional[volatility3.framework.interfaces.context.ContextInterface]¶
- Return type
- 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
- 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
- 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.
- property config: volatility3.framework.interfaces.configuration.HierarchicalDict¶
The Hierarchical configuration Dictionary for this Configurable object.
- Return type
- property context: volatility3.framework.interfaces.context.ContextInterface¶
The context object that this configurable belongs to/configuration is stored in.
- Return type
- classmethod generate_pool_scan(context, layer_name, symbol_table, constraints)[source]¶
- Parameters
context (
ContextInterface
) – The context to retrieve required elements (layers, symbol tables) fromlayer_name (
str
) – The name of the layer on which to operatesymbol_table (
str
) – The name of the table containing the kernel symbolsconstraints (
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 insymbol_table (
str
) – The expected symbol_table to contain the _POOL_HEADER type
- Return type
- classmethod get_requirements()[source]¶
Returns a list of Requirement objects for this plugin.
- Return type
- 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 configurationbase_config_path (
str
) – The base configuration path on which to build the new configurationkwargs – Keyword arguments that are used to populate the new configuration path
- Returns
The newly generated full configuration path
- Return type
- 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) fromlayer_name (
str
) – The name of the layer on which to operatesymbol_table (
str
) – The name of the table containing the kernel symbolspool_constraints (
List
[PoolConstraint
]) – List of pool constraints used to limit the scan resultsalignment (
int
) – An optional value that all pool headers will be aligned toprogress_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
- Returns
A TreeGrid object that can then be passed to a Renderer.
- 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
- version = (1, 0, 0)¶