volatility3.plugins.windows.direct_system_calls module
- class DirectSystemCalls(*args, **kwargs)[source]
Bases:
PluginInterface
Detects the Direct System Call technique used to bypass EDRs
- Parameters:
context – The context that the plugin will operate within
config_path – The path to configuration data within the context configuration data
progress_callback – 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:
- 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 get_disasm_function(architecture)[source]
Returns the disassembly handler for the given architecture .detail is used to get full instruction information
- classmethod get_range_path(ranges, address)[source]
Returns the path for the range holding address, if found
- classmethod get_requirements()[source]
Returns a list of Requirement objects for this plugin.
- Return type:
- classmethod get_tasks_to_scan(context, layer_name, symbol_table_name)[source]
Gathers active processes with the extra information needed to detect malicious syscall instructions
- classmethod get_vad_maps(task)[source]
Creates a map of start/end addresses within a virtual address descriptor tree.
- 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
- 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:
- valid_syscall_handlers = ('ntdll.dll', 'win32u.dll')
- version = (1, 0, 1)
- class syscall_finder_type(get_syscall_target_address, wants_syscall_inst, rule_str, invalid_ops, termination_ops)
Bases:
tuple
This type is used to specify how malicious system call invocations should be found.
get_syscall_target_address is optionally used to extract the address containing the malicious ‘syscall’ instruction wants_syscall_inst whether or not this method expects the ‘syscall’ instrunction directly within the malicious code block rule the opcode string to search for the malicious syscall instructions invalid_ops instructions that only appear in invalid code blocks. Stops processing of the code block when encountered. termination_ops instructions that are expected to be present in the code block and that stop processing
Create new instance of syscall_finder_type(get_syscall_target_address, wants_syscall_inst, rule_str, invalid_ops, termination_ops)
- count(value, /)
Return number of occurrences of value.
- get_syscall_target_address
Alias for field number 0
- index(value, start=0, stop=9223372036854775807, /)
Return first index of value.
Raises ValueError if the value is not present.
- invalid_ops
Alias for field number 3
- rule_str
Alias for field number 2
- termination_ops
Alias for field number 4
- wants_syscall_inst
Alias for field number 1