detonators

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatCommand

func FormatCommand(rawCommand string, detonationUuid string) string

Types

type AWSCLIDetonator added in v1.2.0

type AWSCLIDetonator struct {
	Script string
}

AWSCLIDetonator allows to execute arbitrary AWS CLI commands, pre-configured to inject the detonation UUID in the user-agent.

func NewAWSCLIDetonator added in v1.2.0

func NewAWSCLIDetonator(script string) *AWSCLIDetonator

func (*AWSCLIDetonator) Detonate added in v1.2.0

func (m *AWSCLIDetonator) Detonate() (string, error)

type AWSDetonator

type AWSDetonator struct {
	DetonationFunc func(awsConfig aws.Config, detonationUuid uuid.UUID) error
}

The AWS Detonator allows to send arbitrary requests using the AWS SDK, pre-configured to inject the detonation UUID in the user-agent.

func NewAWSDetonator

func NewAWSDetonator(DetonationFunc func(aws.Config, uuid.UUID) error) *AWSDetonator

func (*AWSDetonator) Detonate

func (m *AWSDetonator) Detonate() (string, error)

type CommandDetonator

type CommandDetonator interface {
	RunCommand(command string) (string, error)
}

type CommandDetonatorImpl

type CommandDetonatorImpl struct {
	Detonator CommandDetonator
	Technique *OSLayerAttackTechnique
}

func NewCommandDetonator

func NewCommandDetonator(detonator CommandDetonator, command string) *CommandDetonatorImpl

func (*CommandDetonatorImpl) Detonate

func (m *CommandDetonatorImpl) Detonate() (string, error)

type Detonator

type Detonator interface {
	Detonate() (string, error)
}

type LocalCommandExecutor

type LocalCommandExecutor struct{}

func (*LocalCommandExecutor) RunCommand

func (m *LocalCommandExecutor) RunCommand(command string) (string, error)

type OSLayerAttackTechnique

type OSLayerAttackTechnique struct {
	Command string
}

TODO probably not a full struct needed

type SSHCommandExecutor

type SSHCommandExecutor struct {
	SSHHostname   string
	SSHUsername   string
	SSHKeyFile    string
	SSHConnection *ssh.Client
	// contains filtered or unexported fields
}

func NewSSHCommandExecutor

func NewSSHCommandExecutor(hostname string, username string, keyFile string) (*SSHCommandExecutor, error)

func (*SSHCommandExecutor) RunCommand

func (m *SSHCommandExecutor) RunCommand(command string) (string, error)

type StratusRedTeamDetonator

type StratusRedTeamDetonator struct {
	Technique *stratus.AttackTechnique
}

func StratusRedTeamTechnique

func StratusRedTeamTechnique(ttp string) *StratusRedTeamDetonator

func (*StratusRedTeamDetonator) Detonate

func (m *StratusRedTeamDetonator) Detonate() (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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