wraith_module_comosum

package module
v0.0.0-...-419bc47 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: AGPL-3.0 Imports: 19 Imported by: 0

README

wraith_module_comosum

A Wraith communications module based on the Yggdrasil p2p network.

What's with the name?

Chlorophytum comosum is otherwise known as the spider plant - a name I thought fitting for software which combines Yggdrasil (a mythological plant), with Wraith (a creepy software that crawls around finding bugs).

comosum

Documentation

Index

Constants

View Source
const (
	MOD_NAME = "w.comosum"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ModuleComosum

type ModuleComosum struct {

	// This value solely decides who has control over this module. The owner
	// of the matching private key will be able to set up a C2 yggdrasil node.
	AdminPubKey ed25519.PublicKey

	// The private key that should be used for this instance of Comosum on
	// the Yggdrasil network. This MUST NOT be hardcoded and MUST instead
	// be generated at runtime to prevent clashes. The key is an argument
	// to allow for custom generators.
	OwnPrivKey ed25519.PrivateKey

	// How long to wait after the last communication with C2 before sending
	// a heartbeat. We send a heartbeat on startup and C2 should be keeping
	// track of us so this can safely be quite a long time. Making this too
	// long means that, if C2 suffers state loss, it will likely not be able
	// to communicate with this Comosum until this timeout runs out. On the
	// other hand, setting the value too low can make us too chatty and
	// therefore detectable. 24 hours is probably a good choice.
	LonelinessTimeout time.Duration

	// Which addresses (if any) Comosum should listen on for yggdrasil
	// connections. Setting this makes the Wraith more detectable but might
	// improve its chances of successfully connecting to C2.
	Listen []string

	// Whether or not Comosum should use multicast to find other Comosum
	// Wraiths on the local network. Setting this makes the Wraith more detectable
	// but might improve its chances of successfully connecting to C2.
	UseMulticast bool

	// Which yggdrasil peers (if any) Comosum should immediately connect to on
	// startup. Note that leaving this blank makes it very difficult for commands
	// to reach Comosum, and impossible if the listener and multicast options are
	// disabled. On the other hand, more peers means more network traffic
	// and higher chances of detection.
	StaticPeers []string

	// Enable some debugging features like logging and the admin endpoint. DO NOT
	// leave enabled in deployed instances. To disable, use "none".
	Debug string
	// contains filtered or unexported fields
}

A comms module implementation which utilises signed CBOR messages to remotely access the Wraith SHM. This module is meant as a simple default which does a good job in most usecases. The underlying protocol is [TCP / WS / QUIC / ... ] > Yggdrasil > HTTP > CBOR Structs.

func (*ModuleComosum) Mainloop

func (m *ModuleComosum) Mainloop(ctx context.Context, w *libwraith.Wraith)

func (*ModuleComosum) WraithModuleName

func (m *ModuleComosum) WraithModuleName() string

Return the name of this module.

Directories

Path Synopsis
cmd
pc3
internal

Jump to

Keyboard shortcuts

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