volatility3.framework.symbols.linux package
- class LinuxKernelIntermedSymbols(*args, **kwargs)[source]
Bases:
IntermediateSymbolTable
Instantiates a SymbolTable based on an IntermediateSymbolFormat JSON file. This is validated against the appropriate schema. The validation can be disabled by passing validate = False, but this should almost never be done.
- Parameters:
context – The volatility context for the symbol table
config_path – The configuration path for the symbol table
name – The name for the symbol table (this is used in symbols e.g. table!symbol )
isf_url – The URL pointing to the ISF file location
native_types – The NativeSymbolTable that contains the native types for this symbol table
table_mapping – A dictionary linking names referenced in the file with symbol tables in the context
validate – Determines whether the ISF file will be validated against the appropriate schema
class_types – A dictionary of type names and classes that override StructType when they are instantiated
symbol_mask – An address mask used for all returned symbol offsets from this table (a mask of 0 disables masking)
- 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:
- clear_symbol_cache(*args, **kwargs)
Clears the symbol cache of this symbol table.
- 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.
- classmethod create(context, config_path, sub_path, filename, native_types=None, table_mapping=None, class_types=None, symbol_mask=0)
Takes a context and loads an intermediate symbol table based on a filename.
- Parameters:
context (
ContextInterface
) – The context that the current plugin is being run withinconfig_path (
str
) – The configuration path for reading/storing configuration information this symbol table may usesub_path (
str
) – The path under a suitable symbol path (defaults to volatility3/symbols and volatility3/framework/symbols) to checkfilename (
str
) – Basename of the file to find under the sub_pathnative_types (
Optional
[NativeTableInterface
]) – Set of native types, defaults to native types read from the intermediate symbol format filetable_mapping (
Optional
[Dict
[str
,str
]]) – a dictionary of table names mentioned within the ISF file, and the tables within the context which they map tosymbol_mask (
int
) – An address mask used for all returned symbol offsets from this table (a mask of 0 disables masking)
- Return type:
- Returns:
the name of the added symbol table
- del_type_class(*args, **kwargs)
Removes the associated class override for a specific Symbol type.
- property enumerations
Returns an iterator of the Enumeration names.
- classmethod file_symbol_url(sub_path, filename=None)
Returns an iterator of appropriate file-scheme symbol URLs that can be opened by a ResourceAccessor class.
Filter reduces the number of results returned to only those URLs containing that string
- get_enumeration(*args, **kwargs)
- classmethod get_requirements()
Returns a list of RequirementInterface objects required by this object.
- Return type:
- get_symbol(*args, **kwargs)
Resolves a symbol name into a symbol object.
If the symbol isn’t found, it raises a SymbolError exception
- get_symbol_type(name)
Resolves a symbol name into a symbol and then resolves the symbol’s type.
- get_symbols_by_location(offset, size=0)
Returns the name of all symbols in this table that live at a particular offset.
- get_symbols_by_type(type_name)
Returns the name of all symbols in this table that have type matching type_name.
- get_type(*args, **kwargs)
Resolves a symbol name into an object template.
If the symbol isn’t found it raises a SymbolError exception
- get_type_class(*args, **kwargs)
Returns the class associated with a Symbol 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 metadata
- property natives: NativeTableInterface
Returns None or a NativeTable for handling space specific native types.
- optional_set_type_class(name, clazz)
Calls the set_type_class function but does not throw an exception. Returns whether setting the type class was successful. :type name:
str
:param name: The name of the type to override the class for :type clazz:Type
[ObjectInterface
] :param clazz: The actual class to override for the provided type name- Return type:
- property producer
- provides = {'type': 'interface'}
- set_type_class(*args, **kwargs)
Overrides the object class for a specific Symbol type.
Name must be present in self.types
- Parameters:
name – The name of the type to override the class for
clazz – The actual class to override for the provided type name
- property symbols
Returns an iterator of the Symbol names.
- property types
Returns an iterator of the Symbol type names.
- 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 LinuxUtilities(*args, **kwargs)[source]
Bases:
VersionableInterface
Class with multiple useful linux functions.
- classmethod container_of(addr, type_name, member_name, vmlinux)[source]
Cast a member of a structure out to the containing structure. It mimicks the Linux kernel macro container_of() see include/linux.kernel.h
- Parameters:
addr (
int
) – The pointer to the member.type_name (
str
) – The type of the container struct this is embedded in.member_name (
str
) – The name of the member within the struct.vmlinux (
ModuleInterface
) – The kernel symbols object
- Return type:
- Returns:
The constructed object or None
- classmethod do_get_path(rdentry, rmnt, dentry, vfsmnt)[source]
Returns a pathname of the mount point or file It mimics the Linux kernel prepend_path function.
- Parameters:
rdentry (dentry *) – A pointer to the root dentry
rmnt (vfsmount *) – A pointer to the root vfsmount
dentry (dentry *) – A pointer to the dentry
vfsmnt (vfsmount *) – A pointer to the vfsmount
- Returns:
Pathname of the mount point or file
- Return type:
- classmethod generate_kernel_handler_info(context, kernel_module_name, mods_list)[source]
A helper function that gets the beginning and end address of the kernel module
- classmethod get_module_from_volobj_type(context, volobj)[source]
Get the vmlinux from a vol obj
- Parameters:
context (
ContextInterface
) – The context to retrieve required elements (layers, symbol tables) fromvolobj (vol object) – A vol object
- Raises:
ValueError – If it cannot obtain any module from the symbol table
- Return type:
- Returns:
A kernel object (vmlinux)
- classmethod get_path_mnt(task, mnt)[source]
Returns the mount point pathname relative to the task’s root directory.
- Parameters:
task (task_struct) – A reference task
mnt (vfsmount or mount) – A mounted filesystem or a mount point. - kernels < 3.3.8 type is ‘vfsmount’ - kernels >= 3.3.8 type is ‘mount’
- Returns:
Pathname of the mount point relative to the task’s root directory.
- Return type:
- classmethod lookup_module_address(kernel_module, handlers, target_address)[source]
Searches between the start and end address of the kernel module using target_address. Returns the module and symbol name of the address provided.
- classmethod mask_mods_list(context, layer_name, mods)[source]
A helper function to mask the starting and end address of kernel modules
- classmethod path_for_file(context, task, filp)[source]
Returns a file (or sock pipe) pathname relative to the task’s root directory.
A ‘file’ structure doesn’t have enough information to properly restore its full path we need the root mount information from task_struct to determine this
- Parameters:
context – The context to retrieve required elements (layers, symbol tables) from
task (task_struct) – A reference task
filp (file *) – A pointer to an open file
- Returns:
A file (or sock pipe) pathname relative to the task’s root directory.
- Return type:
- version = (2, 1, 0)
Subpackages
- volatility3.framework.symbols.linux.extensions package
bpf_prog
bt_sock
cred
dentry
files_struct
fs_struct
inet_sock
inet_sock.VolTemplateProxy
inet_sock.cast()
inet_sock.get_dst_addr()
inet_sock.get_dst_port()
inet_sock.get_family()
inet_sock.get_protocol()
inet_sock.get_src_addr()
inet_sock.get_src_port()
inet_sock.get_state()
inet_sock.get_symbol_table_name()
inet_sock.has_member()
inet_sock.has_valid_member()
inet_sock.has_valid_members()
inet_sock.member()
inet_sock.vol
inet_sock.write()
inode
inode.VolTemplateProxy
inode.cast()
inode.get_access_time()
inode.get_change_time()
inode.get_file_mode()
inode.get_inode_type()
inode.get_modification_time()
inode.get_symbol_table_name()
inode.has_member()
inode.has_valid_member()
inode.has_valid_members()
inode.is_block
inode.is_char
inode.is_dir
inode.is_fifo
inode.is_link
inode.is_reg
inode.is_sock
inode.is_sticky
inode.is_valid()
inode.member()
inode.vol
inode.write()
kernel_cap_struct
kernel_cap_struct.VolTemplateProxy
kernel_cap_struct.capabilities_to_string()
kernel_cap_struct.cast()
kernel_cap_struct.enumerate_capabilities()
kernel_cap_struct.get_capabilities()
kernel_cap_struct.get_kernel_cap_full()
kernel_cap_struct.get_last_cap_value()
kernel_cap_struct.get_symbol_table_name()
kernel_cap_struct.has_capability()
kernel_cap_struct.has_member()
kernel_cap_struct.has_valid_member()
kernel_cap_struct.has_valid_members()
kernel_cap_struct.member()
kernel_cap_struct.vol
kernel_cap_struct.write()
kernel_cap_t
kernel_cap_t.VolTemplateProxy
kernel_cap_t.capabilities_to_string()
kernel_cap_t.cast()
kernel_cap_t.enumerate_capabilities()
kernel_cap_t.get_capabilities()
kernel_cap_t.get_kernel_cap_full()
kernel_cap_t.get_last_cap_value()
kernel_cap_t.get_symbol_table_name()
kernel_cap_t.has_capability()
kernel_cap_t.has_member()
kernel_cap_t.has_valid_member()
kernel_cap_t.has_valid_members()
kernel_cap_t.member()
kernel_cap_t.vol
kernel_cap_t.write()
kobject
list_head
maple_tree
maple_tree.MAPLE_ARANGE_64
maple_tree.MAPLE_DENSE
maple_tree.MAPLE_LEAF_64
maple_tree.MAPLE_NODE_POINTER_MASK
maple_tree.MAPLE_NODE_TYPE_MASK
maple_tree.MAPLE_NODE_TYPE_SHIFT
maple_tree.MAPLE_RANGE_64
maple_tree.MT_FLAGS_HEIGHT_MASK
maple_tree.MT_FLAGS_HEIGHT_OFFSET
maple_tree.VolTemplateProxy
maple_tree.cast()
maple_tree.get_slot_iter()
maple_tree.get_symbol_table_name()
maple_tree.has_member()
maple_tree.has_valid_member()
maple_tree.has_valid_members()
maple_tree.member()
maple_tree.vol
maple_tree.write()
mm_struct
mnt_namespace
mnt_namespace.VolTemplateProxy
mnt_namespace.cast()
mnt_namespace.get_inode()
mnt_namespace.get_mount_points()
mnt_namespace.get_symbol_table_name()
mnt_namespace.has_member()
mnt_namespace.has_valid_member()
mnt_namespace.has_valid_members()
mnt_namespace.member()
mnt_namespace.vol
mnt_namespace.write()
module
module.VolTemplateProxy
module.cast()
module.get_core_size()
module.get_elf_table_name()
module.get_init_size()
module.get_module_base()
module.get_module_core()
module.get_module_init()
module.get_name()
module.get_sections()
module.get_symbol()
module.get_symbol_by_address()
module.get_symbol_table_name()
module.get_symbols()
module.get_symbols_names_and_addresses()
module.has_member()
module.has_valid_member()
module.has_valid_members()
module.member()
module.mod_mem_type
module.num_symtab
module.section_strtab
module.section_symtab
module.vol
module.write()
mount
mount.MNT_FLAGS
mount.MNT_NOATIME
mount.MNT_NODEV
mount.MNT_NODIRATIME
mount.MNT_NOEXEC
mount.MNT_NOSUID
mount.MNT_READONLY
mount.MNT_RELATIME
mount.MNT_SHARED
mount.MNT_SHRINKABLE
mount.MNT_UNBINDABLE
mount.MNT_WRITE_HOLD
mount.VolTemplateProxy
mount.cast()
mount.get_dentry_current()
mount.get_dentry_parent()
mount.get_devname()
mount.get_dominating_id()
mount.get_flags_access()
mount.get_flags_opts()
mount.get_mnt_flags()
mount.get_mnt_mountpoint()
mount.get_mnt_parent()
mount.get_mnt_root()
mount.get_mnt_sb()
mount.get_parent_mount()
mount.get_peer_under_root()
mount.get_symbol_table_name()
mount.get_vfsmnt_current()
mount.get_vfsmnt_parent()
mount.has_member()
mount.has_parent()
mount.has_valid_member()
mount.has_valid_members()
mount.is_path_reachable()
mount.is_shared()
mount.is_slave()
mount.is_unbindable()
mount.member()
mount.next_peer()
mount.vol
mount.write()
net
netlink_sock
netlink_sock.VolTemplateProxy
netlink_sock.cast()
netlink_sock.get_dst_portid()
netlink_sock.get_portid()
netlink_sock.get_protocol()
netlink_sock.get_state()
netlink_sock.get_symbol_table_name()
netlink_sock.has_member()
netlink_sock.has_valid_member()
netlink_sock.has_valid_members()
netlink_sock.member()
netlink_sock.vol
netlink_sock.write()
packet_sock
qstr
sock
socket
struct_file
super_block
super_block.MINORBITS
super_block.SB_DIRSYNC
super_block.SB_I_VERSION
super_block.SB_KERNMOUNT
super_block.SB_LAZYTIME
super_block.SB_MANDLOCK
super_block.SB_NOATIME
super_block.SB_NODEV
super_block.SB_NODIRATIME
super_block.SB_NOEXEC
super_block.SB_NOSUID
super_block.SB_OPTS
super_block.SB_POSIXACL
super_block.SB_RDONLY
super_block.SB_SILENT
super_block.SB_SYNCHRONOUS
super_block.VolTemplateProxy
super_block.cast()
super_block.get_flags_access()
super_block.get_flags_opts()
super_block.get_symbol_table_name()
super_block.get_type()
super_block.has_member()
super_block.has_valid_member()
super_block.has_valid_members()
super_block.major
super_block.member()
super_block.minor
super_block.vol
super_block.write()
task_struct
task_struct.VolTemplateProxy
task_struct.add_process_layer()
task_struct.cast()
task_struct.get_process_memory_sections()
task_struct.get_symbol_table_name()
task_struct.get_threads()
task_struct.has_member()
task_struct.has_valid_member()
task_struct.has_valid_members()
task_struct.is_kernel_thread
task_struct.is_thread_group_leader
task_struct.is_user_thread
task_struct.member()
task_struct.vol
task_struct.write()
timespec64
unix_sock
unix_sock.VolTemplateProxy
unix_sock.cast()
unix_sock.get_inode()
unix_sock.get_name()
unix_sock.get_protocol()
unix_sock.get_state()
unix_sock.get_symbol_table_name()
unix_sock.has_member()
unix_sock.has_valid_member()
unix_sock.has_valid_members()
unix_sock.member()
unix_sock.vol
unix_sock.write()
vfsmount
vfsmount.VolTemplateProxy
vfsmount.cast()
vfsmount.get_dentry_current()
vfsmount.get_dentry_parent()
vfsmount.get_devname()
vfsmount.get_flags_access()
vfsmount.get_flags_opts()
vfsmount.get_mnt_flags()
vfsmount.get_mnt_mountpoint()
vfsmount.get_mnt_parent()
vfsmount.get_mnt_root()
vfsmount.get_mnt_sb()
vfsmount.get_symbol_table_name()
vfsmount.get_vfsmnt_current()
vfsmount.get_vfsmnt_parent()
vfsmount.has_member()
vfsmount.has_parent()
vfsmount.has_valid_member()
vfsmount.has_valid_members()
vfsmount.is_equal()
vfsmount.is_shared()
vfsmount.is_slave()
vfsmount.is_unbindable()
vfsmount.is_valid()
vfsmount.member()
vfsmount.vol
vfsmount.write()
vm_area_struct
vm_area_struct.VolTemplateProxy
vm_area_struct.cast()
vm_area_struct.extended_flags
vm_area_struct.get_flags()
vm_area_struct.get_name()
vm_area_struct.get_page_offset()
vm_area_struct.get_protection()
vm_area_struct.get_symbol_table_name()
vm_area_struct.has_member()
vm_area_struct.has_valid_member()
vm_area_struct.has_valid_members()
vm_area_struct.is_suspicious()
vm_area_struct.member()
vm_area_struct.perm_flags
vm_area_struct.vol
vm_area_struct.write()
vsock_sock
xdp_sock
- Submodules
Submodules
- volatility3.framework.symbols.linux.bash module
BashIntermedSymbols
BashIntermedSymbols.build_configuration()
BashIntermedSymbols.clear_symbol_cache()
BashIntermedSymbols.config
BashIntermedSymbols.config_path
BashIntermedSymbols.context
BashIntermedSymbols.create()
BashIntermedSymbols.del_type_class()
BashIntermedSymbols.enumerations
BashIntermedSymbols.file_symbol_url()
BashIntermedSymbols.get_enumeration()
BashIntermedSymbols.get_requirements()
BashIntermedSymbols.get_symbol()
BashIntermedSymbols.get_symbol_type()
BashIntermedSymbols.get_symbols_by_location()
BashIntermedSymbols.get_symbols_by_type()
BashIntermedSymbols.get_type()
BashIntermedSymbols.get_type_class()
BashIntermedSymbols.make_subconfig()
BashIntermedSymbols.metadata
BashIntermedSymbols.natives
BashIntermedSymbols.optional_set_type_class()
BashIntermedSymbols.producer
BashIntermedSymbols.set_type_class()
BashIntermedSymbols.symbols
BashIntermedSymbols.types
BashIntermedSymbols.unsatisfied()