Environment module

Simulation of the external environment in which a process is run.

❱   Namespaces

namespace maat::env::abi
Util classes and methods to handle various calling conventions.

namespace maat::env::emulated
Namespace containing all emulated external functions, data, libraries, and syscalls.

❱   Classes

class maat::env::EnvEmulator
Main class emulating a process environment.

class maat::env::LinuxEmulator
Specialisation of 'EnvEmulator' for the Linux operating system.

class maat::env::FileAccessor

class maat::env::PhysicalFile

class maat::env::FunctionCallback
A C/C++ or Python callback emulating an imported function.

class maat::env::abi::ABI
Abstract interface for different ABIs.

class maat::env::abi::X86_CDECL
X86 CDECL ABI.

class maat::env::abi::X86_STDCALL
X86 STDCALL ABI.

class maat::env::abi::X86_LINUX_INT80
X86 Linux INT 0x80 ABI.

class maat::env::abi::X86_LINUX_SYSENTER
X86 Linux SYSENTER ABI.

class maat::env::abi::X64_SYSTEM_V
X64 SYSTEM V ABI.

class maat::env::abi::X64_LINUX_SYSCALL
X64 Linux SYSCALL ABI.

class maat::env::Function
Emulated function.

class maat::env::Data
Emulated external data (in a library)

class maat::env::Library
Emulated external library.

❱   Enums

enum class FileSystemAction: uint8_t { CREATE_FILE, DELETE_FILE, CREATE_DIR, DELETE_DIR }
Actions modifying the filesystem layout.

enum class Action { CONTINUE, ERROR }
Action returned by emulated function callbacks.

enum class Type { X86_CDECL, X86_STDCALL, X86_FASTCALL, X86_THISCALL_GCC, X86_THISCALL_MS, X86_LINUX_SYSENTER, X86_LINUX_INT80, X64_MS, X64_SYSTEM_V, X64_LINUX_SYSCALL, ARM64, X86_LINUX_CUSTOM_SYSCALL, X64_LINUX_CUSTOM_SYSCALL, NONE }
ABI types.

enum class OS { LINUX, WINDOWS, NONE }
Emulated operating system.

❱   Typedefs

using filehandle_t = int
Opaque handle to a file (equivalent of file descriptors on Linux)

using fspath_t = std::vector<std::string>
Absolute path to a file or directory node in the virtual file system.

using args_spec_t = std::vector<size_t>
List of function arguments sizes. A size of zero means the current architecture address size.

❱   Variables

static size_t auto_argsize constexpr
Value to use in args_spec_t for arguments whose size must be equal to the architecture default address size.

❱   Enum documentation

enum class FileSystemAction: uint8_t

Actions modifying the filesystem layout.

Enumerators
CREATE_FILE

Creating a new physical file.

DELETE_FILE

Deleting a physical file.

CREATE_DIR

Creating a new directory.

DELETE_DIR

Deleting a directory.

enum class Action

Action returned by emulated function callbacks.

Enumerators
CONTINUE

Continue execution.

ERROR

An error occured within the callback.

enum class OS

Emulated operating system.

Enumerators
LINUX

Linux.

WINDOWS

Windows.

NONE