agent

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2023 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEBUG = uint8(iota)
	INFO
	WARN
	ERR
	FATAL
)

loglevel constants

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent added in v0.1.0

type Agent struct {
	CommandTimeout   time.Duration
	PrivateKeyBase36 string

	ServerAddress         string
	ServerPublicKeyBase36 string

	DNSSuffix string
	// contains filtered or unexported fields
}

Agent is a DNS C2 client. It tries to connect to the C2 either directly or by having one or more recursive DNS servers between the two. The only authentication between the two is a set of public keys and private keys.

func (*Agent) Run added in v0.1.0

func (a *Agent) Run(serverIo IO)

Run starts an Agent instance given the IO interface.

func (*Agent) SendMessageToServer added in v0.1.0

func (a *Agent) SendMessageToServer(msg string)

SendMessageToServer is the mirror of SendMessageToAgent on agent's side. it allows the agent to send arbitrary messeges to the server. At the moment this will not disrupt the flow of healthcheck messages coming from the agent and those message should be dismissed on the server side during this transmission

type IO added in v0.1.0

type IO interface {
	Logger(level uint8, format string, args ...interface{})
	GetInputFeed() chan string
	GetOutputFeed() chan string
}

IO is designed to decouple inputs and outputs of agents from the underlying logic this way web interfaces, TUI and CLI development is possible. it also enables dnspot to become easy to embed in larger frameworks

Jump to

Keyboard shortcuts

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