volatility3.framework.layers.intel module
- class Intel(context, config_path, name, metadata=None)[source]
Bases:
LinearlyMappedLayer
Translation Layer for the Intel IA32 memory mapping.
Basic initializer that allows configurables to access their own config settings.
- property address_mask: int
Returns a mask which encapsulates all the active bits of an address for this layer.
- bits_per_register = 32
- 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:
- canonicalize(addr)[source]
Canonicalizes an address by performing an appropiate sign extension on the higher addresses
- Return type:
- property config: HierarchicalDict
The Hierarchical configuration Dictionary for this Configurable object.
- property context: ContextInterface
The context object that this configurable belongs to/configuration is stored in.
- decanonicalize(addr)[source]
Removes canonicalization to ensure an adress fits within the correct range if it has been canonicalized
This will produce an address outside the range if the canonicalization is incorrect
- Return type:
- property dependencies: List[str]
Returns a list of the lower layer names that this layer is dependent upon.
- destroy()
Causes a DataLayer to close any open handles, etc.
Systems that make use of Data Layers should call destroy when they are done with them. This will close all handles, and make the object unreadable (exceptions will be thrown using a DataLayer after destruction)
- Return type:
- classmethod get_requirements()[source]
Returns a list of Requirement objects for this type of layer.
- Return type:
- is_valid(offset, length=1)[source]
Returns whether the address offset can be translated to a valid address.
- 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:
- mapping(offset, length, ignore_errors=False)[source]
Returns a sorted iterable of (offset, sublength, mapped_offset, mapped_length, layer) mappings.
This allows translation layers to provide maps of contiguous regions in one layer
- maximum_address = 4294967295
- minimum_address = 0
- page_mask = -4096
- page_shift = 12
- page_size = 4096
- read(offset, length, pad=False)
Reads an offset for length bytes and returns ‘bytes’ (not ‘str’) of length size.
- Return type:
- scan(context, scanner, progress_callback=None, sections=None)
Scans a Translation layer by chunk.
Note: this will skip missing/unmappable chunks of memory
- Parameters:
context (
ContextInterface
) – The context containing the data layerscanner (
ScannerInterface
) – The constructed Scanner object to be appliedprogress_callback (
Optional
[Callable
[[float
,str
],None
]]) – Method that is called periodically during scanning to update progresssections (
Iterable
[Tuple
[int
,int
]]) – A list of (start, size) tuples defining the portions of the layer to scan
- Return type:
- Returns:
The output iterable from the scanner object having been run against the layer
- structure = [('page directory', 10, False), ('page table', 10, True)]
- 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:
- class Intel32e(context, config_path, name, metadata=None)[source]
Bases:
Intel
Class for handling 64-bit (32-bit extensions) for Intel architectures.
Basic initializer that allows configurables to access their own config settings.
- property address_mask: int
Returns a mask which encapsulates all the active bits of an address for this layer.
- bits_per_register = 64
- 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:
- canonicalize(addr)
Canonicalizes an address by performing an appropiate sign extension on the higher addresses
- Return type:
- property config: HierarchicalDict
The Hierarchical configuration Dictionary for this Configurable object.
- property context: ContextInterface
The context object that this configurable belongs to/configuration is stored in.
- decanonicalize(addr)
Removes canonicalization to ensure an adress fits within the correct range if it has been canonicalized
This will produce an address outside the range if the canonicalization is incorrect
- Return type:
- property dependencies: List[str]
Returns a list of the lower layer names that this layer is dependent upon.
- destroy()
Causes a DataLayer to close any open handles, etc.
Systems that make use of Data Layers should call destroy when they are done with them. This will close all handles, and make the object unreadable (exceptions will be thrown using a DataLayer after destruction)
- Return type:
- classmethod get_requirements()
Returns a list of Requirement objects for this type of layer.
- Return type:
- is_valid(offset, length=1)
Returns whether the address offset can be translated to a valid address.
- 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:
- mapping(offset, length, ignore_errors=False)
Returns a sorted iterable of (offset, sublength, mapped_offset, mapped_length, layer) mappings.
This allows translation layers to provide maps of contiguous regions in one layer
- maximum_address = 281474976710655
- minimum_address = 0
- page_mask = -4096
- page_shift = 12
- page_size = 4096
- read(offset, length, pad=False)
Reads an offset for length bytes and returns ‘bytes’ (not ‘str’) of length size.
- Return type:
- scan(context, scanner, progress_callback=None, sections=None)
Scans a Translation layer by chunk.
Note: this will skip missing/unmappable chunks of memory
- Parameters:
context (
ContextInterface
) – The context containing the data layerscanner (
ScannerInterface
) – The constructed Scanner object to be appliedprogress_callback (
Optional
[Callable
[[float
,str
],None
]]) – Method that is called periodically during scanning to update progresssections (
Iterable
[Tuple
[int
,int
]]) – A list of (start, size) tuples defining the portions of the layer to scan
- Return type:
- Returns:
The output iterable from the scanner object having been run against the layer
- structure = [('page map layer 4', 9, False), ('page directory pointer', 9, True), ('page directory', 9, True), ('page table', 9, True)]
- 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:
- class IntelPAE(context, config_path, name, metadata=None)[source]
Bases:
Intel
Class for handling Physical Address Extensions for Intel architectures.
Basic initializer that allows configurables to access their own config settings.
- property address_mask: int
Returns a mask which encapsulates all the active bits of an address for this layer.
- bits_per_register = 32
- 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:
- canonicalize(addr)
Canonicalizes an address by performing an appropiate sign extension on the higher addresses
- Return type:
- property config: HierarchicalDict
The Hierarchical configuration Dictionary for this Configurable object.
- property context: ContextInterface
The context object that this configurable belongs to/configuration is stored in.
- decanonicalize(addr)
Removes canonicalization to ensure an adress fits within the correct range if it has been canonicalized
This will produce an address outside the range if the canonicalization is incorrect
- Return type:
- property dependencies: List[str]
Returns a list of the lower layer names that this layer is dependent upon.
- destroy()
Causes a DataLayer to close any open handles, etc.
Systems that make use of Data Layers should call destroy when they are done with them. This will close all handles, and make the object unreadable (exceptions will be thrown using a DataLayer after destruction)
- Return type:
- classmethod get_requirements()
Returns a list of Requirement objects for this type of layer.
- Return type:
- is_valid(offset, length=1)
Returns whether the address offset can be translated to a valid address.
- 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:
- mapping(offset, length, ignore_errors=False)
Returns a sorted iterable of (offset, sublength, mapped_offset, mapped_length, layer) mappings.
This allows translation layers to provide maps of contiguous regions in one layer
- maximum_address = 4294967295
- minimum_address = 0
- page_mask = -4096
- page_shift = 12
- page_size = 4096
- read(offset, length, pad=False)
Reads an offset for length bytes and returns ‘bytes’ (not ‘str’) of length size.
- Return type:
- scan(context, scanner, progress_callback=None, sections=None)
Scans a Translation layer by chunk.
Note: this will skip missing/unmappable chunks of memory
- Parameters:
context (
ContextInterface
) – The context containing the data layerscanner (
ScannerInterface
) – The constructed Scanner object to be appliedprogress_callback (
Optional
[Callable
[[float
,str
],None
]]) – Method that is called periodically during scanning to update progresssections (
Iterable
[Tuple
[int
,int
]]) – A list of (start, size) tuples defining the portions of the layer to scan
- Return type:
- Returns:
The output iterable from the scanner object having been run against the layer
- structure = [('page directory pointer', 2, False), ('page directory', 9, True), ('page table', 9, True)]
- 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:
- class WindowsIntel(context, config_path, name, metadata=None)[source]
Bases:
WindowsMixin
,Intel
Basic initializer that allows configurables to access their own config settings.
- property address_mask: int
Returns a mask which encapsulates all the active bits of an address for this layer.
- bits_per_register = 32
- 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:
- canonicalize(addr)
Canonicalizes an address by performing an appropiate sign extension on the higher addresses
- Return type:
- property config: HierarchicalDict
The Hierarchical configuration Dictionary for this Configurable object.
- property context: ContextInterface
The context object that this configurable belongs to/configuration is stored in.
- decanonicalize(addr)
Removes canonicalization to ensure an adress fits within the correct range if it has been canonicalized
This will produce an address outside the range if the canonicalization is incorrect
- Return type:
- property dependencies: List[str]
Returns a list of the lower layer names that this layer is dependent upon.
- destroy()
Causes a DataLayer to close any open handles, etc.
Systems that make use of Data Layers should call destroy when they are done with them. This will close all handles, and make the object unreadable (exceptions will be thrown using a DataLayer after destruction)
- Return type:
- classmethod get_requirements()
Returns a list of Requirement objects for this type of layer.
- Return type:
- is_valid(offset, length=1)
Returns whether the address offset can be translated to a valid address.
- 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:
- mapping(offset, length, ignore_errors=False)
Returns a sorted iterable of (offset, sublength, mapped_offset, mapped_length, layer) mappings.
This allows translation layers to provide maps of contiguous regions in one layer
- maximum_address = 4294967295
- minimum_address = 0
- page_mask = -4096
- page_shift = 12
- page_size = 4096
- read(offset, length, pad=False)
Reads an offset for length bytes and returns ‘bytes’ (not ‘str’) of length size.
- Return type:
- scan(context, scanner, progress_callback=None, sections=None)
Scans a Translation layer by chunk.
Note: this will skip missing/unmappable chunks of memory
- Parameters:
context (
ContextInterface
) – The context containing the data layerscanner (
ScannerInterface
) – The constructed Scanner object to be appliedprogress_callback (
Optional
[Callable
[[float
,str
],None
]]) – Method that is called periodically during scanning to update progresssections (
Iterable
[Tuple
[int
,int
]]) – A list of (start, size) tuples defining the portions of the layer to scan
- Return type:
- Returns:
The output iterable from the scanner object having been run against the layer
- structure = [('page directory', 10, False), ('page table', 10, True)]
- 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:
- class WindowsIntel32e(context, config_path, name, metadata=None)[source]
Bases:
WindowsMixin
,Intel32e
Basic initializer that allows configurables to access their own config settings.
- property address_mask: int
Returns a mask which encapsulates all the active bits of an address for this layer.
- bits_per_register = 64
- 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:
- canonicalize(addr)
Canonicalizes an address by performing an appropiate sign extension on the higher addresses
- Return type:
- property config: HierarchicalDict
The Hierarchical configuration Dictionary for this Configurable object.
- property context: ContextInterface
The context object that this configurable belongs to/configuration is stored in.
- decanonicalize(addr)
Removes canonicalization to ensure an adress fits within the correct range if it has been canonicalized
This will produce an address outside the range if the canonicalization is incorrect
- Return type:
- property dependencies: List[str]
Returns a list of the lower layer names that this layer is dependent upon.
- destroy()
Causes a DataLayer to close any open handles, etc.
Systems that make use of Data Layers should call destroy when they are done with them. This will close all handles, and make the object unreadable (exceptions will be thrown using a DataLayer after destruction)
- Return type:
- classmethod get_requirements()
Returns a list of Requirement objects for this type of layer.
- Return type:
- is_valid(offset, length=1)
Returns whether the address offset can be translated to a valid address.
- 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:
- mapping(offset, length, ignore_errors=False)
Returns a sorted iterable of (offset, sublength, mapped_offset, mapped_length, layer) mappings.
This allows translation layers to provide maps of contiguous regions in one layer
- maximum_address = 281474976710655
- minimum_address = 0
- page_mask = -4096
- page_shift = 12
- page_size = 4096
- read(offset, length, pad=False)
Reads an offset for length bytes and returns ‘bytes’ (not ‘str’) of length size.
- Return type:
- scan(context, scanner, progress_callback=None, sections=None)
Scans a Translation layer by chunk.
Note: this will skip missing/unmappable chunks of memory
- Parameters:
context (
ContextInterface
) – The context containing the data layerscanner (
ScannerInterface
) – The constructed Scanner object to be appliedprogress_callback (
Optional
[Callable
[[float
,str
],None
]]) – Method that is called periodically during scanning to update progresssections (
Iterable
[Tuple
[int
,int
]]) – A list of (start, size) tuples defining the portions of the layer to scan
- Return type:
- Returns:
The output iterable from the scanner object having been run against the layer
- structure = [('page map layer 4', 9, False), ('page directory pointer', 9, True), ('page directory', 9, True), ('page table', 9, True)]
- 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:
- class WindowsIntelPAE(context, config_path, name, metadata=None)[source]
Bases:
WindowsMixin
,IntelPAE
Basic initializer that allows configurables to access their own config settings.
- property address_mask: int
Returns a mask which encapsulates all the active bits of an address for this layer.
- bits_per_register = 32
- 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:
- canonicalize(addr)
Canonicalizes an address by performing an appropiate sign extension on the higher addresses
- Return type:
- property config: HierarchicalDict
The Hierarchical configuration Dictionary for this Configurable object.
- property context: ContextInterface
The context object that this configurable belongs to/configuration is stored in.
- decanonicalize(addr)
Removes canonicalization to ensure an adress fits within the correct range if it has been canonicalized
This will produce an address outside the range if the canonicalization is incorrect
- Return type:
- property dependencies: List[str]
Returns a list of the lower layer names that this layer is dependent upon.
- destroy()
Causes a DataLayer to close any open handles, etc.
Systems that make use of Data Layers should call destroy when they are done with them. This will close all handles, and make the object unreadable (exceptions will be thrown using a DataLayer after destruction)
- Return type:
- classmethod get_requirements()
Returns a list of Requirement objects for this type of layer.
- Return type:
- is_valid(offset, length=1)
Returns whether the address offset can be translated to a valid address.
- 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:
- mapping(offset, length, ignore_errors=False)
Returns a sorted iterable of (offset, sublength, mapped_offset, mapped_length, layer) mappings.
This allows translation layers to provide maps of contiguous regions in one layer
- maximum_address = 4294967295
- minimum_address = 0
- page_mask = -4096
- page_shift = 12
- page_size = 4096
- read(offset, length, pad=False)
Reads an offset for length bytes and returns ‘bytes’ (not ‘str’) of length size.
- Return type:
- scan(context, scanner, progress_callback=None, sections=None)
Scans a Translation layer by chunk.
Note: this will skip missing/unmappable chunks of memory
- Parameters:
context (
ContextInterface
) – The context containing the data layerscanner (
ScannerInterface
) – The constructed Scanner object to be appliedprogress_callback (
Optional
[Callable
[[float
,str
],None
]]) – Method that is called periodically during scanning to update progresssections (
Iterable
[Tuple
[int
,int
]]) – A list of (start, size) tuples defining the portions of the layer to scan
- Return type:
- Returns:
The output iterable from the scanner object having been run against the layer
- structure = [('page directory pointer', 2, False), ('page directory', 9, True), ('page table', 9, True)]
- 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:
- class WindowsMixin(context, config_path, name, metadata=None)[source]
Bases:
Intel
Basic initializer that allows configurables to access their own config settings.
- property address_mask: int
Returns a mask which encapsulates all the active bits of an address for this layer.
- bits_per_register = 32
- 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:
- canonicalize(addr)
Canonicalizes an address by performing an appropiate sign extension on the higher addresses
- Return type:
- property config: HierarchicalDict
The Hierarchical configuration Dictionary for this Configurable object.
- property context: ContextInterface
The context object that this configurable belongs to/configuration is stored in.
- decanonicalize(addr)
Removes canonicalization to ensure an adress fits within the correct range if it has been canonicalized
This will produce an address outside the range if the canonicalization is incorrect
- Return type:
- property dependencies: List[str]
Returns a list of the lower layer names that this layer is dependent upon.
- destroy()
Causes a DataLayer to close any open handles, etc.
Systems that make use of Data Layers should call destroy when they are done with them. This will close all handles, and make the object unreadable (exceptions will be thrown using a DataLayer after destruction)
- Return type:
- classmethod get_requirements()
Returns a list of Requirement objects for this type of layer.
- Return type:
- is_valid(offset, length=1)
Returns whether the address offset can be translated to a valid address.
- 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:
- mapping(offset, length, ignore_errors=False)
Returns a sorted iterable of (offset, sublength, mapped_offset, mapped_length, layer) mappings.
This allows translation layers to provide maps of contiguous regions in one layer
- maximum_address = 4294967295
- minimum_address = 0
- page_mask = -4096
- page_shift = 12
- page_size = 4096
- read(offset, length, pad=False)
Reads an offset for length bytes and returns ‘bytes’ (not ‘str’) of length size.
- Return type:
- scan(context, scanner, progress_callback=None, sections=None)
Scans a Translation layer by chunk.
Note: this will skip missing/unmappable chunks of memory
- Parameters:
context (
ContextInterface
) – The context containing the data layerscanner (
ScannerInterface
) – The constructed Scanner object to be appliedprogress_callback (
Optional
[Callable
[[float
,str
],None
]]) – Method that is called periodically during scanning to update progresssections (
Iterable
[Tuple
[int
,int
]]) – A list of (start, size) tuples defining the portions of the layer to scan
- Return type:
- Returns:
The output iterable from the scanner object having been run against the layer
- structure = [('page directory', 10, False), ('page table', 10, True)]
- 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: