Struct PayloadData

Struct Documentation

struct PayloadData

Helper struct to encapsulate payload data for the builder.

This struct groups a Payload object, associated registers, and an optional offset for the next RIP (Instruction Pointer).

Note

The registers member is stored by value, meaning a copy is made.

Public Functions

inline PayloadData(Payload &payload_ref, const std::vector<Register> &regs = {}, std::optional<size_t> rip_ptr_offset = std::nullopt)

Constructs a PayloadData instance.

Parameters:
  • payload_ref – Reference to the Payload.

  • regs – Optional vector of Registers pointing to this buffer when RIP control is triggered (defaults to empty).

  • rip_ptr_offset – Optional offset of a field containing a function pointer which if overwritten can lead to RIP control. If nullopt, then this payload does not contain such a field.

Public Members

Payload &payload

Reference to the Payload object.

const std::vector<Register> registers

Registers pointing to this buffer when RIP control is triggered.

const std::optional<size_t> rip_ptr_offset

Optional offset of a field containing a function pointer which if overwritten can lead to RIP control. If nullopt, then this payload does not contain such a field.