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.
Click to show internal directories.
Click to hide internal directories.