agents

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: 15 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Agents = make(map[uuid.UUID]*Agent)

Agents contains all of the instantiated agent object that are accessed by other modules

Functions

func GetAgentFieldValue added in v0.7.0

func GetAgentFieldValue(agentID uuid.UUID, field string) (string, error)

GetAgentFieldValue returns a string value for the field value belonging to the specified Agent

func GetEncryptionKey added in v0.8.0

func GetEncryptionKey(agentID uuid.UUID) ([]byte, error)

GetEncryptionKey retrieves the per-agent payload encryption key used to decrypt messages for any protocol

func GetLifetime added in v0.8.0

func GetLifetime(agentID uuid.UUID) (time.Duration, error)

GetLifetime returns the amount an agent could live without successfully communicating with the server

func GroupAddAgent added in v1.1.0

func GroupAddAgent(agentID uuid.UUID, groupName string) error

GroupAddAgent adds an agent to a group

func GroupListAll added in v1.1.0

func GroupListAll() [][]string

GroupListAll lists groups as a table of {groupName,agentID}

func GroupListNames added in v1.1.0

func GroupListNames() []string

GroupListNames list out just the names of existing groups

func GroupRemoveAgent added in v1.1.0

func GroupRemoveAgent(agentID uuid.UUID, groupName string) error

GroupRemoveAgent removes an agent from a group

func KeyExchange added in v0.8.0

func KeyExchange(m messages.Base) (messages.Base, error)

KeyExchange is used to exchange public keys between the server and agent

func RemoveAgent added in v0.6.0

func RemoveAgent(agentID uuid.UUID) error

RemoveAgent deletes the agent object from Agents map by its ID

func SetAgentNote added in v1.1.0

func SetAgentNote(agentID uuid.UUID, note string) error

SetAgentNote updates the agent's note field

func SetMaxRetry added in v1.0.0

func SetMaxRetry(agentID uuid.UUID, retry string) error

SetMaxRetry updates an Agent's MaxRetry limit

func SetWaitTime added in v1.0.0

func SetWaitTime(agentID uuid.UUID, wait string) error

SetWaitTime updates an Agent's sleep amount or Wait Time

Types

type Agent added in v1.0.0

type Agent struct {
	ID           uuid.UUID
	Platform     string
	Architecture string
	UserName     string
	UserGUID     string
	HostName     string
	Integrity    int
	Ips          []string
	Pid          int
	Process      string

	InitialCheckIn time.Time
	StatusCheckIn  time.Time
	Version        string
	Build          string
	WaitTime       string
	PaddingMax     int
	MaxRetry       int
	FailedCheckin  int
	Skew           int64
	Proto          string
	KillDate       int64
	RSAKeys        *rsa.PrivateKey // RSA Private/Public key pair; Private key used to decrypt messages
	PublicKey      rsa.PublicKey   // Public key used to encrypt messages
	Secret         []byte          // secret is used to perform symmetric encryption operations
	OPAQUE         *opaque.Server  // Holds information about OPAQUE Registration and Authentication
	JA3            string          // The JA3 signature applied to the agent's TLS client
	Note           string          // Operator notes for an agent
	// contains filtered or unexported fields
}

Agent is a server side structure that holds information about a Merlin Agent

func New added in v1.0.0

func New(agentID uuid.UUID) (Agent, error)

New creates a new Agent and returns the object but does not add it to the global agents map

func (*Agent) Log added in v1.0.0

func (a *Agent) Log(logMessage string)

Log is used to write log messages to the agent's log file

func (*Agent) UpdateInfo added in v1.0.0

func (a *Agent) UpdateInfo(info messages.AgentInfo)

UpdateInfo is used to update an agent's information with the passed in message data

Jump to

Keyboard shortcuts

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