exfil

package
v0.12.4 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(ciphertext, key []byte) ([]byte, error)

Decrypt decrypts data using AES-256-GCM.

func Encrypt

func Encrypt(plaintext, key []byte) ([]byte, error)

Encrypt encrypts data using AES-256-GCM.

func LoadEncryptionKey

func LoadEncryptionKey(keySource string) ([]byte, error)

LoadEncryptionKey loads an encryption key from various sources.

func Register

func Register(typ string, factory Factory)

Register registers an exfiltrator factory for a given type.

func SerializeFindings

func SerializeFindings(findings []pillager.Finding) ([]byte, error)

SerializeFindings serializes findings to JSON.

Types

type Config

type Config struct {
	Type          string
	EncryptionKey string
	Compress      bool
	S3            *S3Options
	Webhook       *WebhookOptions
	Sliver        *SliverOptions
}

Config holds configuration for an exfiltrator instance.

type Exfiltrator

type Exfiltrator interface {
	Exfiltrate(ctx context.Context, findings []pillager.Finding) error
	Close() error
}

Exfiltrator defines the interface for exfiltrating findings to external destinations.

func Create

func Create(config Config) (Exfiltrator, error)

Create creates an exfiltrator instance for the given configuration.

type Factory

type Factory func(config Config) (Exfiltrator, error)

Factory creates exfiltrator instances.

type Metadata

type Metadata struct {
	Hostname     string    `json:"hostname,omitempty"`
	Timestamp    time.Time `json:"timestamp"`
	Version      string    `json:"version"`
	FindingCount int       `json:"finding_count"`
}

Metadata holds metadata about exfiltrated findings.

type Package

type Package struct {
	Metadata Metadata           `json:"metadata"`
	Findings []pillager.Finding `json:"findings"`
}

Package holds findings with metadata for exfiltration.

func CreatePackage

func CreatePackage(findings []pillager.Finding) Package

CreatePackage creates a package with metadata for exfiltration.

type S3Options

type S3Options struct {
	Bucket    string
	Region    *string
	Endpoint  *string
	Prefix    *string
	AccessKey *string
	SecretKey *string
}

S3Options holds S3-specific exfiltration configuration.

type SliverOptions

type SliverOptions struct {
	ConfigPath       string
	LootName         *string
	LootType         *string
	ParseCredentials *bool
}

SliverOptions holds Sliver C2-specific exfiltration configuration.

type WebhookOptions

type WebhookOptions struct {
	URL     string
	Headers map[string]string
	Timeout *time.Duration
}

WebhookOptions holds webhook-specific exfiltration configuration.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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