heimdall package

Subpackages

Submodules

heimdall.create_client module

heimdall.create_client.create_heimdall_client(vmi: libvmi.Libvmi, profile: Path) HeimdallClient[source]

Factory function to create a HeimdallClient for managing virtual machines.

heimdall.exceptions module

exception heimdall.exceptions.AccessDeniedError[source]

Bases: HeimdallException

Need extra permissions to execute this command.

exception heimdall.exceptions.ConnectionFailedError[source]

Bases: HeimdallException

Raised when a connection to the virtual machine fails.

exception heimdall.exceptions.HeimdallException[source]

Bases: Exception

Base class for all exceptions related to Heimdall.

exception heimdall.exceptions.SymbolsFileFormatError(name='')[source]

Bases: VolatilitySymbols

Raised when a specified symbols file not properly formatted.

exception heimdall.exceptions.SymbolsFileNotFoundError(name='')[source]

Bases: VolatilitySymbols

Raised when a specified symbols file is not found.

exception heimdall.exceptions.SymbolsFileRemoteNotFoundError(name='')[source]

Bases: VolatilitySymbols

Raised when a specified symbols file is not found on the remote repository.

exception heimdall.exceptions.VolatilitySymbols(name='')[source]

Bases: HeimdallException

Base class for exceptions related to profiles.

__init__(name='')[source]

heimdall.heimdall_client module

class heimdall.heimdall_client.ContextPrompt(*args: Any, **kwargs: Any)[source]

Bases: Prompts

Customizes IPython prompts in the Heimdall context.

in_prompt_tokens(cli: Any | None = None) list[tuple[IPython.terminal.prompts.Token, str]][source]
out_prompt_tokens(cli: Any | None = None) list[tuple[IPython.terminal.prompts.Token, str]][source]
class heimdall.heimdall_client.HeimdallClient(vmi: libvmi.Libvmi, os_profile: Path)[source]

Bases: object

__init__(vmi: libvmi.Libvmi, os_profile: Path)[source]

Represents a client for interacting with the Heimdall virtual machine introspection library.

The HeimdallClient class provides methods for initializing the client using a virtual machine name and an OS profile. It supports reading and writing memory, creating contexts for specific processes, and starting an IPython interactive shell for advanced interactions.

Parameters:
  • vmi (Libvmi) – The Libvmi instance for interacting with the VM.

  • os_profile (Path) – The path to the OS profile configuration file.

create_ctx(pid: int, symbols_path: str = None) Context[source]

Create a context for a given PID.

Parameters:
  • pid (int) – The process ID for which to create the context.

  • symbols_path (str, optional) – The path to the symbols file (default is None).

Returns:

A context object for the specified PID.

Return type:

Context

interact(additional_namespace: dict | None = None) None[source]

Start an IPython interactive shell.

Parameters:

additional_namespace (dict, optional) – Additional variables to include in the interactive namespace (default is None).

property kslide: int

Kernel slide.

Returns:

The kernel ASLR slide value.

Return type:

int

abstract property processes

Abstract property for processes.

Module contents