Generated from Manticore v1.1.5 • 201 packages. View on pkg.go.dev

mgmt

import "github.com/TheManticoreProject/Manticore/network/dcerpc/v4/interfaces/mgmt"

Package mgmt implements a client for the DCE/RPC remote management (mgmt) interface over the connectionless (v4) transport ([C706] Appendix Q).

The mgmt interface is a standard, well-known interface every RPC server exposes, which makes it a useful reconnaissance and liveness target: inq_if_ids enumerates the interfaces a server has registered, and is_server_listening probes whether the server is accepting calls. Both operations take only the binding handle as input (so the request stub is empty) and differ only in how their response is decoded, which makes them a clean demonstration of the connectionless binding pattern.

References:

Index

Constants

const (
    // InterfaceMajorVersion is the mgmt interface major version (1.0).
    InterfaceMajorVersion = 1
    // InterfaceMinorVersion is the mgmt interface minor version.
    InterfaceMinorVersion = 0

    // OpnumInqIfIds is rpc__mgmt_inq_if_ids.
    OpnumInqIfIds = 0
    // OpnumIsServerListening is rpc__mgmt_is_server_listening.
    OpnumIsServerListening = 2
)

Variables

Remote management (mgmt) interface identity ([C706] Appendix Q).

var (
    // Interface is the mgmt interface UUID, afa8bd80-7d8a-11c9-bef4-08002b102989.
    Interface = guid.GUID{A: 0xafa8bd80, B: 0x7d8a, C: 0x11c9, D: 0xbef4, E: 0x08002b102989}
)

type Client

Client invokes the mgmt interface over a connectionless RPC client.

type Client struct {
    // contains filtered or unexported fields
}

func New

func New(rpc *client.Client) *Client

New returns a mgmt client bound over rpc, which should target the server’s mgmt endpoint (the well-known RPC endpoint, or one resolved via the endpoint mapper).

func (*Client) InqIfIds

func (c *Client) InqIfIds() ([]IfID, error)

InqIfIds calls rpc__mgmt_inq_if_ids and returns the interface identifiers the server has registered.

func (*Client) IsServerListening

func (c *Client) IsServerListening() (bool, error)

IsServerListening calls rpc__mgmt_is_server_listening and reports whether the server is listening. A non-zero comm status from the operation is returned as an error.

type IfID

IfID is an interface identifier returned by inq_if_ids: an interface UUID and its major/minor version (rpc_if_id_t).

type IfID struct {
    UUID         guid.GUID
    VersionMajor uint16
    VersionMinor uint16
}

func (IfID) String

func (id IfID) String() string

String renders the interface id as uuid vMAJOR.MINOR.