Documentation ¶
Index ¶
Constants ¶
const AgentVersion string = "paragon-v0.1.1"
AgentVersion represents a unique agent version string to identify the agent.
Variables ¶
var ErrNoTransports = fmt.Errorf("all available transports failed to send message")
ErrNoTransports occurs if all transports fail to send a message or if none are available.
Functions ¶
func CollectMetadata ¶
func CollectMetadata(agent *Agent)
CollectMetadata about the system and populate the agent with the gathered information.
Types ¶
type Agent ¶
type Agent struct { Receiver Log *zap.Logger Metadata *c2.AgentMetadata Transports []Transport MaxIdleTime time.Duration // contains filtered or unexported fields }
An Agent communicates with server(s) using the configured transport.
type Message ¶
type Message c2.AgentMessage
Message is an alias for c2.AgentMessage with some extended functionality.
func (*Message) WriteResult ¶
func (msg *Message) WriteResult(result *c2.TaskResult)
WriteResult writes execution output to be included in a message to a server.
type MessageWriter ¶
type MessageWriter interface { io.Writer io.StringWriter WriteResult(*c2.TaskResult) }
MessageWriter is responsible for writing output to be collected as a message from the agent.
type Receiver ¶
type Receiver interface {
Receive(MessageWriter, ServerMessage)
}
A Receiver is responsible for handling messages received from a server.
type Sender ¶
type Sender interface {
Send(ServerMessageWriter, Message) error
}
A Sender is responsible for transporting messages to a server.
type ServerMessage ¶
type ServerMessage c2.ServerMessage
ServerMessage is an alias for c2.ServerMessage with some extended functionality.
func (*ServerMessage) WriteServerMessage ¶
func (msg *ServerMessage) WriteServerMessage(srvMsg *ServerMessage)
WriteServerMessage replaces this message with the provided message.
type ServerMessageWriter ¶
type ServerMessageWriter interface {
WriteServerMessage(*ServerMessage)
}
ServerMessageWriter is responsible for writing output to be collected as a message from the server.