volatility3.plugins.windows.shimcachemem module

class ShimcacheMem(context, config_path, progress_callback=None)[source]

Bases: PluginInterface, TimeLinerInterface

Reads Shimcache entries from the ahcache.sys AVL tree

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

NT_KRNL_MODS = ['ntoskrnl.exe', 'ntkrnlpa.exe', 'ntkrnlmp.exe', 'ntkrpamp.exe']
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

property config: HierarchicalDict

The Hierarchical configuration Dictionary for this Configurable object.

property config_path: str

The configuration path on which this configurable lives.

property context: ContextInterface

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

static create_shimcache_table(context, symbol_table, config_path)[source]

Creates a shimcache symbol table

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

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

  • config_path (str) – The configuration path within the context of the symbol table to create

Return type:

str

Returns:

The name of the constructed shimcache table

classmethod find_shimcache_win_2k3_to_7(context, config_path, kernel_layer_name, nt_symbol_table, shimcache_symbol_table)[source]

Implements the algorithm to search for the shim cache on Windows 2000 (x64) through Windows 7 / 2008 R2. The algorithm consists of the following:

  1. Find the NT kernel module’s .data and PAGE sections

  2. Iterate over every 4/8 bytes (depending on OS bitness) in the .data section and test for the following: a) offset represents a valid RTL_AVL_TABLE object b) RTL_AVL_TABLE is preceeded by an ERESOURCE object c) RTL_AVL_TABLE is followed by the beginning of the SHIM LRU list

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

  • layer_name – The name of the memory layer on which to operate.

  • kernel_symbol_table – The name of an existing symbol table containing the kernel symbols

  • shimcache_symbol_table (str) – The name of a symbol table containing the hand-crafted shimcache symbols

Return type:

Iterator[SHIM_CACHE_ENTRY]

classmethod find_shimcache_win_8_or_later(context, config_path, kernel_layer_name, nt_symbol_table, shimcache_symbol_table)[source]

Attempts to locate and yield shimcache entries from a Windows 8 or later memory image.

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

  • layer_name – The name of the memory layer on which to operate.

  • kernel_symbol_table – The name of an existing symbol table containing the kernel symbols

  • shimcache_symbol_table (str) – The name of a symbol table containing the hand-crafted shimcache symbols

Return type:

Iterator[SHIM_CACHE_ENTRY]

classmethod find_shimcache_win_xp(context, layer_name, kernel_symbol_table, shimcache_symbol_table)[source]

Attempts to find the shimcache in a Windows XP memory image

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

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

  • kernel_symbol_table (str) – The name of an existing symbol table containing the kernel symbols

  • shimcache_symbol_table (str) – The name of a symbol table containing the hand-crafted shimcache symbols

Return type:

Iterator[SHIM_CACHE_ENTRY]

generate_timeline()[source]

Method generates Tuples of (description, timestamp_type, timestamp)

These need not be generated in any particular order, sorting will be done later

Return type:

Iterator[Tuple[str, TimeLinerType, datetime]]

classmethod get_module_section_range(context, config_path, layer_name, symbol_table, module_list, section_name)[source]

Locates the size and offset of the first found module section specified by name from the list of modules.

Parameters:
  • context (ContextInterface) – The context to operate on

  • layer_name (str) – The memory layer to read from

  • module_list (List[str]) – A list of module names to search for the given section

  • section_name (str) – The name of the section to search for.

Return type:

Optional[Tuple[int, int]]

Returns:

The offset and size of the module, if found; Otherwise, returns None

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

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

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 try_get_shim_head_at_offset(context, symbol_table, kernel_symbol_table, layer_name, mod_page_start, mod_page_end, offset)[source]

Attempts to construct a SHIM_CACHE_HEAD within a layer of the given context, using the provided offset within that layer, as well as the start and end offsets of the kernel module’s PAGE section start and end offsets.

If a number of validity checks are passed, this method will return the SHIM_CACHE_HEAD object. Otherwise, None is returned.

Return type:

Optional[SHIM_CACHE_ENTRY]

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 = (0, 0, 0)