messages

package
v1.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2023 License: GPL-3.0 Imports: 4 Imported by: 10

Documentation

Index

Constants

View Source
const (

	// CHECKIN is used by the Agent to identify that it is checking in with the server
	CHECKIN = 1 // StatusCheckIn
	// OPAQUE is used to denote that embedded message contains an opaque structure
	OPAQUE = 2
	// JOBS is used to denote that the embedded message contains a list of job structures
	JOBS = 3
	// KEYEXCHANGE is used to denote that embedded message contains a key exchange structure
	KEYEXCHANGE = 4

	// IDLE is used to notify the Agent that server has no tasks and that the Agent should idle
	IDLE = 10
)

Variables

This section is empty.

Functions

func String added in v1.0.0

func String(messageType int) string

String returns the text representation of a message constant

Types

type AgentInfo

type AgentInfo struct {
	Version       string  `json:"version,omitempty"`
	Build         string  `json:"build,omitempty"`
	WaitTime      string  `json:"waittime,omitempty"`
	PaddingMax    int     `json:"paddingmax,omitempty"`
	MaxRetry      int     `json:"maxretry,omitempty"`
	FailedCheckin int     `json:"failedcheckin,omitempty"`
	Skew          int64   `json:"skew,omitempty"`
	Proto         string  `json:"proto,omitempty"`
	SysInfo       SysInfo `json:"sysinfo,omitempty"`
	KillDate      int64   `json:"killdate,omitempty"`
	JA3           string  `json:"ja3,omitempty"`
}

AgentInfo is a JSON payload containing information about the agent and its configuration

type Base

type Base struct {
	Version float32     `json:"version"`
	ID      uuid.UUID   `json:"id"`
	Type    int         `json:"type"`
	Payload interface{} `json:"payload,omitempty"`
	Padding string      `json:"padding"`
	Token   string      `json:"token,omitempty"`
}

Base is the base JSON Object for HTTP POST payloads

type KeyExchange added in v0.8.0

type KeyExchange struct {
	PublicKey rsa.PublicKey `json:"publickey"`
}

KeyExchange is a JSON payload used to exchange public keys for encryption

type SysInfo

type SysInfo struct {
	Platform     string   `json:"platform,omitempty"`
	Architecture string   `json:"architecture,omitempty"`
	UserName     string   `json:"username,omitempty"`
	UserGUID     string   `json:"userguid,omitempty"`
	Integrity    int      `json:"integrity,omitempty"`
	HostName     string   `json:"hostname,omitempty"`
	Process      string   `json:"process,omitempty"`
	Pid          int      `json:"pid,omitempty"`
	Ips          []string `json:"ips,omitempty"`
	Domain       string   `json:"domain,omitempty"`
}

SysInfo is a JSON payload containing information about the system where the agent is running

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL