models

package
v1.4.18 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2021 License: GPL-3.0 Imports: 4 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CanaryDomain

type CanaryDomain struct {
	ID              uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
	ImplantConfigID uuid.UUID
	CreatedAt       time.Time `gorm:"->;<-:create;"`

	Domain string
}

CanaryDomain - Canary domain, belongs to ImplantConfig

func (*CanaryDomain) BeforeCreate

func (c *CanaryDomain) BeforeCreate(tx *gorm.DB) (err error)

BeforeCreate - GORM hook

type Certificate

type Certificate struct {
	ID             uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
	CreatedAt      time.Time `gorm:"->;<-:create;"`
	CommonName     string
	CAType         string
	KeyType        string
	CertificatePEM string
	PrivateKeyPEM  string
}

Certificate - Certificate database model

func (*Certificate) BeforeCreate

func (c *Certificate) BeforeCreate(tx *gorm.DB) (err error)

BeforeCreate - GORM hook to automatically set values

type DNSCanary

type DNSCanary struct {
	ID        uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
	CreatedAt time.Time `gorm:"->;<-:create;"`

	ImplantName   string
	Domain        string
	Triggered     bool
	FirstTrigger  time.Time
	LatestTrigger time.Time
	Count         uint32
}

DNSCanary - Colletions of content to serve from HTTP(S)

func (*DNSCanary) BeforeCreate

func (c *DNSCanary) BeforeCreate(tx *gorm.DB) (err error)

BeforeCreate - GORM hook

func (*DNSCanary) ToProtobuf

func (c *DNSCanary) ToProtobuf() *clientpb.DNSCanary

ToProtobuf - Converts to protobuf object

type ImplantBuild

type ImplantBuild struct {
	ID        uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
	CreatedAt time.Time `gorm:"->;<-:create;"`

	Name string `gorm:"unique;"`
	// Checksum stores the MD5 sum of an implant binary
	Checksum string
	// Burned indicates whether the implant
	// has been seen on threat intel platforms
	Burned bool

	ImplantConfig ImplantConfig
}

ImplantBuild - Represents an implant

func (*ImplantBuild) BeforeCreate

func (ib *ImplantBuild) BeforeCreate(tx *gorm.DB) (err error)

BeforeCreate - GORM hook

type ImplantC2

type ImplantC2 struct {
	ID              uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
	ImplantConfigID uuid.UUID
	CreatedAt       time.Time `gorm:"->;<-:create;"`

	Priority uint32
	URL      string
	Options  string
}

ImplantC2 - C2 struct

func (*ImplantC2) BeforeCreate

func (c2 *ImplantC2) BeforeCreate(tx *gorm.DB) (err error)

BeforeCreate - GORM hook

func (*ImplantC2) String

func (c2 *ImplantC2) String() string

func (*ImplantC2) ToProtobuf

func (c2 *ImplantC2) ToProtobuf() *clientpb.ImplantC2

ToProtobuf - Convert to protobuf version

type ImplantConfig

type ImplantConfig struct {
	ID               uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
	ImplantBuildID   uuid.UUID
	ImplantProfileID uuid.UUID

	CreatedAt time.Time `gorm:"->;<-:create;"`

	// Go
	GOOS   string
	GOARCH string

	// Standard
	// Name                string
	CACert              string
	Cert                string
	Key                 string
	Debug               bool
	Evasion             bool
	ObfuscateSymbols    bool
	ReconnectInterval   uint32
	PollInterval        uint32
	MaxConnectionErrors uint32

	WGImplantPrivKey  string
	WGServerPubKey    string
	WGPeerTunIP       string
	WGKeyExchangePort uint32
	WGTcpCommsPort    uint32

	C2 []ImplantC2

	MTLSc2Enabled bool
	WGc2Enabled   bool
	HTTPc2Enabled bool
	DNSc2Enabled  bool

	CanaryDomains     []CanaryDomain
	NamePipec2Enabled bool
	TCPPivotc2Enabled bool

	// Limits
	LimitDomainJoined bool
	LimitHostname     string
	LimitUsername     string
	LimitDatetime     string
	LimitFileExists   string

	// Output Format
	Format clientpb.OutputFormat

	// For 	IsSharedLib bool
	IsSharedLib bool
	IsService   bool
	IsShellcode bool

	FileName string
}

ImplantConfig - An implant build configuration

func (*ImplantConfig) BeforeCreate

func (ic *ImplantConfig) BeforeCreate(tx *gorm.DB) (err error)

BeforeCreate - GORM hook

func (*ImplantConfig) CanaryDomainsList

func (ic *ImplantConfig) CanaryDomainsList() []string

CanaryDomainsList - Get string slice of canary domains

func (*ImplantConfig) ToProtobuf

func (ic *ImplantConfig) ToProtobuf() *clientpb.ImplantConfig

ToProtobuf - Convert ImplantConfig to protobuf equiv

type ImplantProfile

type ImplantProfile struct {
	ID        uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
	CreatedAt time.Time `gorm:"->;<-:create;"`

	Name          string `gorm:"unique;"`
	ImplantConfig *ImplantConfig
}

ImplantProfile - An implant build configuration

func (*ImplantProfile) BeforeCreate

func (ip *ImplantProfile) BeforeCreate(tx *gorm.DB) (err error)

BeforeCreate - GORM hook

type Loot added in v1.4.18

type Loot struct {
	ID        uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
	CreatedAt time.Time `gorm:"->;<-:create;"`

	Type           int
	FileType       int
	CredentialType int
	Name           string
}

Loot - Represents a piece of loot

func (*Loot) BeforeCreate added in v1.4.18

func (l *Loot) BeforeCreate(tx *gorm.DB) (err error)

BeforeCreate - GORM hook

type WGKeys added in v1.4.9

type WGKeys struct {
	// gorm.Model
	ID        uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
	CreatedAt time.Time `gorm:"->;<-:create;"`
	PrivKey   string
	PubKey    string
}

WGKeys - WGKeys database model

func (*WGKeys) BeforeCreate added in v1.4.9

func (c *WGKeys) BeforeCreate(tx *gorm.DB) (err error)

BeforeCreate - GORM hook to automatically set values

type WGPeer added in v1.4.9

type WGPeer struct {
	// gorm.Model
	ID        uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
	CreatedAt time.Time `gorm:"->;<-:create;"`
	PrivKey   string
	PubKey    string
	TunIP     string
}

func (*WGPeer) BeforeCreate added in v1.4.9

func (c *WGPeer) BeforeCreate(tx *gorm.DB) (err error)

BeforeCreate - GORM hook to automatically set values

type WebContent

type WebContent struct {
	ID        uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
	WebsiteID uuid.UUID

	Path        string `gorm:"primaryKey"`
	Size        int
	ContentType string
}

WebContent - One piece of content mapped to a path

func (*WebContent) BeforeCreate

func (wc *WebContent) BeforeCreate(tx *gorm.DB) (err error)

BeforeCreate - GORM hook to automatically set values

func (*WebContent) ToProtobuf

func (wc *WebContent) ToProtobuf(content []byte) *clientpb.WebContent

ToProtobuf - Converts to protobuf object

type Website

type Website struct {
	ID        uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
	CreatedAt time.Time `gorm:"->;<-:create;"`

	Name string `gorm:"unique;"` // Website Name

	WebContents []WebContent
}

Website - Colletions of content to serve from HTTP(S)

func (*Website) BeforeCreate

func (w *Website) BeforeCreate(tx *gorm.DB) (err error)

BeforeCreate - GORM hook

func (*Website) ToProtobuf

func (w *Website) ToProtobuf() *clientpb.Website

ToProtobuf - Converts to protobuf object

Jump to

Keyboard shortcuts

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