API Documentation

Namespace

All functions and types are contained within the Styx namespace.


Types

  • u64: Unsigned 64-bit integer

  • guest_virt_t: Guest virtual address (64-bit)

  • guest_phys_t: Guest physical address (64-bit)

  • vmxroot_error_t: Enumeration of possible error codes


Structures

PhysicalMemoryPage

struct PhysicalMemoryPage
{
    uint8_t type;
    uint8_t shareDisposition;
    uint16_t flags;
    uint64_t pBegin;
    uint32_t sizeButNotExactly;
    uint32_t pad;

    static constexpr uint16_t cm_resource_memory_large_40{ 0x200 };
    static constexpr uint16_t cm_resource_memory_large_48{ 0x400 };
    static constexpr uint16_t cm_resource_memory_large_64{ 0x800 };

    uint64_t size() const noexcept;
};

Functions Overview

Hypervisor and Memory Management

This section covers functions and utilities for interacting with the hypervisor and managing system memory. It includes operations for reading and writing memory, translating addresses, and manipulating page tables.

Process and Module Information

Here you'll find functions for gathering information about running processes and kernel modules. This includes retrieving process IDs, enumerating modules, and accessing process-specific memory regions.

Shadow EPT Management

This section provides a set of functions that allow for stealthy memory hooking by creating separate mappings for execute and read/write operations. The core concept revolves around splitting larger pages (2MB) into smaller 4KB pages when needed.

Utility Functions

This section contains various helper functions that simplify common tasks when working with the Styx API. These may include string manipulation, data conversion, and other general-purpose utilities.

Templates

The Templates section provides generic functions and classes that can be used with different data types. This includes type-safe memory reading and writing operations that can work with various data structures.

Error Handling & Global Variables

This part of the documentation covers the error handling mechanisms used in Styx, including error codes and how to interpret them. It also describes global variables that are accessible throughout the API.

Example

The Example section provides a practical code sample demonstrating how to use various parts of the Styx API.

Last updated