The depthcharge.executor module provides Operation implementations responsible for executing code. Currently, this is limited to the use of the go console command by way of the GoExecutor implementation.

However, this module is intended of accommodate future additions, such as:

  • Support for automatically wrapping payloads with image headers and executing them with boot* family of console commands.

  • Memory corruption exploitation and shellcode helper functions.

    • Given that custom vendor/oem commands will vary wildly, these would be more valuable as generic building blocks, rather than a collection of device-specific payloads.

    • Executor implementations pertaining to upstream vulnerabilites (e.g. NFS RCEs) may however, be more practical to readily integrate.

  • Similar to the above, integrating support for upstream and silicon-specific secure boot bypasses may also be reasonable additions.

Base Class

class depthcharge.executor.Executor(ctx, **_kwargs)

Abstract base class for Operation implementations that facilitate arbitrary code execution on the target device.

execute_at(address: int, *args, **kwargs)

Instruct the target to execute instructions at the specified address.

Any additional positional and keyword arguments are passed to the underlying Executor implementation.

Note: This method does not perform any pre-requisite validation before attempting to begin execution. Use the Depthcharge.execute_payload() method when executing built-in payloads.


class depthcharge.executor.GoExecutor(ctx, **_kwargs)

This class implements the Executor interface atop of U-Boot’s builtin functionality for executing U-Boot standalone programs via the go console command.