Documentation
¶
Index ¶
- Constants
- func ChromeVer(baseVer int32) string
- func GenerateOperatorToken() string
- func GenerateUserAgent(goos string, goarch string, userAgent string, baseVer int32, macOsVer string) string
- func IsC2Enabled(schemes []string, c2s []*clientpb.ImplantC2) bool
- func MacOSVer(MacOSVersion string) string
- func RandomFiles(httpC2PathSegments []*clientpb.HTTPC2PathSegment, MinFileGen int32, ...) []*clientpb.HTTPC2PathSegment
- func RandomPathSegments(h *clientpb.HTTPC2ImplantConfig) []*clientpb.HTTPC2PathSegment
- func RandomPaths(httpC2PathSegments []*clientpb.HTTPC2PathSegment, minPaths int32, ...) []*clientpb.HTTPC2PathSegment
- func RandomizeImplantConfig(h *clientpb.HTTPC2ImplantConfig, goos string, goarch string) *clientpb.HTTPC2ImplantConfig
- type Beacon
- type BeaconTask
- type Benchmark
- type CanaryDomain
- type Certificate
- type CrackCommand
- type CrackFile
- type CrackFileChunk
- type CrackJob
- type CrackTask
- type Crackstation
- type Credential
- type DNSCanary
- type DNSListener
- type DnsDomain
- type EncoderAsset
- type ExtensionData
- type HTTPListener
- type Host
- type HttpC2Config
- type HttpC2Cookie
- type HttpC2Header
- type HttpC2ImplantConfig
- type HttpC2PathSegment
- type HttpC2ServerConfig
- type HttpC2URLParameter
- type IOC
- type ImplantBuild
- type ImplantC2
- type ImplantConfig
- type ImplantProfile
- type KeyExHistory
- type KeyValue
- type ListenerJob
- type Loot
- type MonitoringProvider
- type MtlsListener
- type MultiplayerListener
- type Operator
- type ResourceID
- type WGKeys
- type WGListener
- type WGPeer
- type WebContent
- type Website
Constants ¶
const ( PENDING = "pending" SENT = "sent" COMPLETED = "completed" CANCELED = "canceled" )
BeaconTask - Represents a host machine
const ( DefaultChromeBaseVer = 106 DefaultMacOSVer = "10_15_7" )
Variables ¶
This section is empty.
Functions ¶
func GenerateOperatorToken ¶
func GenerateOperatorToken() string
GenerateOperatorToken - Generate a new operator auth token
func GenerateUserAgent ¶
func GenerateUserAgent(goos string, goarch string, userAgent string, baseVer int32, macOsVer string) string
GenerateUserAgent - Generate a user-agent depending on OS/Arch
func RandomFiles ¶
func RandomFiles(httpC2PathSegments []*clientpb.HTTPC2PathSegment, MinFileGen int32, MaxFileGen int32) []*clientpb.HTTPC2PathSegment
func RandomPathSegments ¶
func RandomPathSegments(h *clientpb.HTTPC2ImplantConfig) []*clientpb.HTTPC2PathSegment
func RandomPaths ¶
func RandomPaths(httpC2PathSegments []*clientpb.HTTPC2PathSegment, minPaths int32, maxPaths int32) []*clientpb.HTTPC2PathSegment
func RandomizeImplantConfig ¶
func RandomizeImplantConfig(h *clientpb.HTTPC2ImplantConfig, goos string, goarch string) *clientpb.HTTPC2ImplantConfig
RandomImplantConfig - Randomly generate a new implant config from the parent config, this is the primary configuration used by the implant generation.
Types ¶
type Beacon ¶
type Beacon struct {
CreatedAt time.Time `gorm:"->;<-:create;"`
ID uuid.UUID `gorm:"type:uuid;"`
Name string
Hostname string
UUID uuid.UUID `gorm:"type:uuid;"` // Host UUID
Username string
UID string
GID string
OS string
Arch string
Transport string
RemoteAddress string
PID int32
Filename string
LastCheckin time.Time
Version string
ReconnectInterval int64
ActiveC2 string
ProxyURL string
Locale string
Integrity string
ImplantBuildID uuid.UUID `gorm:"type:uuid;"`
Interval int64
Jitter int64
NextCheckin int64
Tasks []BeaconTask
}
Beacon - Represents a host machine
func (*Beacon) BeforeCreate ¶
BeforeCreate - GORM hook
func (*Beacon) ToProtobuf ¶
type BeaconTask ¶
type BeaconTask struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
EnvelopeID int64 `gorm:"uniqueIndex"`
BeaconID uuid.UUID `gorm:"type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
State string
SentAt int64
CompletedAt int64
Description string
Request []byte // *sliverpb.Envelope
Response []byte // *sliverpb.Envelope
}
func (*BeaconTask) BeforeCreate ¶
func (b *BeaconTask) BeforeCreate(tx *gorm.DB) (err error)
BeforeCreate - GORM hook
func (*BeaconTask) ToProtobuf ¶
func (b *BeaconTask) ToProtobuf(content bool) *clientpb.BeaconTask
type Benchmark ¶
type Benchmark struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
CrackstationID uuid.UUID `gorm:"type:uuid;"`
HashType int32
PerSecondRate uint64
}
Benchmark - Performance information about the crackstation
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 CrackCommand ¶
type CrackCommand struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
CrackTaskID uuid.UUID `gorm:"type:uuid;"`
// FLAGS
AttackMode int32
HashType int32
Hashes []string `gorm:"type:text"`
Quiet bool
HexCharset bool
HexSalt bool
HexWordlist bool
Force bool
DeprecatedCheckDisable bool
Status bool
StatusJSON bool
StatusTimer uint32
StdinTimeoutAbort uint32
MachineReadable bool
KeepGuessing bool
SelfTestDisable bool
Loopback bool
// MarkovHcstat2 []byte
MarkovDisable bool
MarkovClassic bool
MarkovInverse bool
MarkovThreshold uint32
Runtime uint32
Session string
Restore bool
RestoreDisable bool
// RestoreFile []byte
// --outfile FILE (28)
OutfileFormat []int32 `gorm:"type:integer[]"`
OutfileAutohexDisable bool
OutfileCheckTimer uint32
WordlistAutohexDisable bool
Separator string
Stdout bool
Show bool
Left bool
Username bool
Remove bool
RemoveTimer uint32
PotfileDisable bool
// Potfile []byte
EncodingFrom int32
EncodingTo int32
DebugMode uint32
// --debug-file FILE (45)
// --induction-dir DIR (46)
// --outfile-check-dir DIR (47)
LogfileDisable bool
HccapxMessagePair uint32
NonceErrorCorrections uint32
// KeyboardLayoutMapping []byte
// --truecrypt-keyfiles FILE (52)
// --veracrypt-keyfiles FILE (53)
// --veracrypt-pim-start PIM (54)
// --veracrypt-pim-stop PIM (55)
Benchmark bool
BenchmarkAll bool
SpeedOnly bool
ProgressOnly bool
SegmentSize uint32
BitmapMin uint32
BitmapMax uint32
CPUAffinity []uint32 `gorm:"type:integer[]"`
HookThreads uint32
HashInfo bool
// --example-hashes (66)
BackendIgnoreCUDA bool
BackendIgnoreHip bool
BackendIgnoreMetal bool
BackendIgnoreOpenCL bool
BackendInfo bool
BackendDevices []uint32 `gorm:"type:integer[]"`
OpenCLDeviceTypes []uint32 `gorm:"type:integer[]"`
OptimizedKernelEnable bool
MultiplyAccelDisabled bool
WorkloadProfile int32
KernelAccel uint32
KernelLoops uint32
KernelThreads uint32
BackendVectorWidth uint32
SpinDamp uint32
HwmonDisable bool
HwmonTempAbort uint32
ScryptTMTO uint32
Skip uint64
Limit uint64
Keyspace bool
// --rule-left (88)
// --rule-right (89)
// RulesFile []byte
GenerateRules uint32
GenerateRulesFunMin uint32
GenerateRulesFunMax uint32
GenerateRulesFuncSel string
GenerateRulesSeed int32
CustomCharset1 string
CustomCharset2 string
CustomCharset3 string
CustomCharset4 string
Identify string
Increment bool
IncrementMin uint32
IncrementMax uint32
SlowCandidates bool
BrainServer bool
BrainServerTimer uint32
BrainClient bool
BrainClientFeatures string
BrainHost string
BrainPort uint32
BrainPassword string
BrainSession string
BrainSessionWhitelist string
}
func (*CrackCommand) BeforeCreate ¶
func (c *CrackCommand) BeforeCreate(tx *gorm.DB) (err error)
BeforeCreate - GORM hook
func (CrackCommand) FromProtobuf ¶
func (CrackCommand) FromProtobuf(c *clientpb.CrackCommand) *CrackCommand
func (*CrackCommand) ToProtobuf ¶
func (c *CrackCommand) ToProtobuf() *clientpb.CrackCommand
type CrackFile ¶
type CrackFile struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
LastModified time.Time
Name string
UncompressedSize int64
Sha2_256 string
Type int32
IsCompressed bool
IsComplete bool
Chunks []CrackFileChunk
}
CrackFile - Performance information about the crackstation
func (*CrackFile) BeforeCreate ¶
BeforeCreate - GORM hook
func (*CrackFile) ToProtobuf ¶
type CrackFileChunk ¶
type CrackFileChunk struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CrackFileID uuid.UUID `gorm:"type:uuid;"`
N uint32
}
CrackFileChunk - Performance information about the crackstation
func (*CrackFileChunk) BeforeCreate ¶
func (c *CrackFileChunk) BeforeCreate(tx *gorm.DB) (err error)
BeforeCreate - GORM hook
func (*CrackFileChunk) ToProtobuf ¶
func (c *CrackFileChunk) ToProtobuf() *clientpb.CrackFileChunk
type CrackJob ¶
type CrackJob struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
CompletedAt time.Time
Tasks []CrackTask
Command CrackCommand // Parent command
}
CrackJob - A crack job is a collection of one or more crack tasks, the crack job contains the parent command, whose keyspace may get broken up into multiple crack tasks and distributed to multiple crackstations
func (*CrackJob) Status ¶
func (c *CrackJob) Status() clientpb.CrackJobStatus
type CrackTask ¶
type CrackTask struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CrackstationID uuid.UUID `gorm:"type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
StartedAt time.Time
CompletedAt time.Time
Command CrackCommand
}
CrackTask - An individual chunk of a job sent to a specific crackstation
func (*CrackTask) BeforeCreate ¶
BeforeCreate - GORM hook
func (*CrackTask) ToProtobuf ¶
type Crackstation ¶
type Crackstation struct {
// ID = crackstation name
ID uuid.UUID `gorm:"primaryKey;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
Tasks []CrackTask
Benchmarks []Benchmark
}
Crackstation - History of crackstation jobs
func (*Crackstation) BeforeCreate ¶
func (c *Crackstation) BeforeCreate(tx *gorm.DB) (err error)
BeforeCreate - GORM hook
type Credential ¶
type Credential struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
OriginHostUUID uuid.UUID `gorm:"type:uuid;"`
Collection string
Username string
Plaintext string
Hash string // https://hashcat.net/wiki/doku.php?id=example_hashes
HashType int32
IsCracked bool
}
Credential - Represents a piece of loot
func (*Credential) BeforeCreate ¶
func (c *Credential) BeforeCreate(tx *gorm.DB) (err error)
BeforeCreate - GORM hook
func (*Credential) ToProtobuf ¶
func (c *Credential) ToProtobuf() *clientpb.Credential
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 DNSCanaryFromProtobuf ¶
convert from protobuf
func (*DNSCanary) BeforeCreate ¶
BeforeCreate - GORM hook
func (*DNSCanary) ToProtobuf ¶
ToProtobuf - Converts to protobuf object
type DNSListener ¶
type DNSListener struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
ListenerJobID uuid.UUID `gorm:"type:uuid;"`
Domains []DnsDomain
Canaries bool
Host string
Port uint32
EnforceOtp bool
}
func (*DNSListener) BeforeCreate ¶
func (j *DNSListener) BeforeCreate(tx *gorm.DB) (err error)
func (*DNSListener) ToProtobuf ¶
func (j *DNSListener) ToProtobuf() *clientpb.DNSListenerReq
type EncoderAsset ¶
type EncoderAsset struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
ImplantConfigID uuid.UUID
Name string
}
EncoderAsset - Tracks which assets were embedded into the implant but we currently don't keep a copy of the actual data
func (*EncoderAsset) ToProtobuf ¶
func (t *EncoderAsset) ToProtobuf() *commonpb.File
type ExtensionData ¶
type ExtensionData struct {
gorm.Model
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
HostID uuid.UUID `gorm:"type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
Name string
Output string
}
ExtensionData - Represents an indicator of compromise, generally a file we've uploaded to a remote system.
func (*ExtensionData) BeforeCreate ¶
func (e *ExtensionData) BeforeCreate(tx *gorm.DB) (err error)
BeforeCreate - GORM hook
type HTTPListener ¶
type HTTPListener struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
ListenerJobID uuid.UUID `gorm:"type:uuid;"`
Domain string
Host string
Port uint32
Secure bool
Website string
Cert []byte
Key []byte
Acme bool
EnforceOtp bool
LongPollTimeout int64
LongPollJitter int64
RandomizeJarm bool
Staging bool
}
func (*HTTPListener) BeforeCreate ¶
func (j *HTTPListener) BeforeCreate(tx *gorm.DB) (err error)
func (*HTTPListener) ToProtobuf ¶
func (j *HTTPListener) ToProtobuf() *clientpb.HTTPListenerReq
type Host ¶
type Host struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
HostUUID uuid.UUID `gorm:"type:uuid;unique"`
CreatedAt time.Time `gorm:"->;<-:create;"`
Hostname string
OSVersion string // Verbose OS version
Locale string // Detected language code
IOCs []IOC `gorm:"foreignKey:HostID;references:HostUUID"`
ExtensionData []ExtensionData `gorm:"foreignKey:HostID;references:HostUUID"`
}
Host - Represents a host machine
func (*Host) BeforeCreate ¶
BeforeCreate - GORM hook
func (*Host) ToProtobuf ¶
type HttpC2Config ¶
type HttpC2Config struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
Name string `gorm:"unique;"`
ServerConfig HttpC2ServerConfig
ImplantConfig HttpC2ImplantConfig
}
HttpC2Config -
func HTTPC2ConfigFromProtobuf ¶
func HTTPC2ConfigFromProtobuf(pbHttpC2Config *clientpb.HTTPC2Config) *HttpC2Config
HTTPC2ConfigFromProtobuf - Create a native config struct from Protobuf
func (*HttpC2Config) BeforeCreate ¶
func (h *HttpC2Config) BeforeCreate(tx *gorm.DB) (err error)
func (*HttpC2Config) ToProtobuf ¶
func (h *HttpC2Config) ToProtobuf() *clientpb.HTTPC2Config
type HttpC2Cookie ¶
type HttpC2Cookie struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
HttpC2ServerConfigID uuid.UUID `gorm:"type:uuid;"`
Name string
}
HttpC2Cookie - HTTP C2 Cookie (server only)
func (*HttpC2Cookie) BeforeCreate ¶
func (h *HttpC2Cookie) BeforeCreate(tx *gorm.DB) (err error)
func (*HttpC2Cookie) ToProtobuf ¶
func (h *HttpC2Cookie) ToProtobuf() *clientpb.HTTPC2Cookie
type HttpC2Header ¶
type HttpC2Header struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
HttpC2ServerConfigID *uuid.UUID `gorm:"type:uuid;"`
HttpC2ImplantConfigID *uuid.UUID `gorm:"type:uuid;"`
Method string
Name string
Value string
Probability int32
}
HttpC2Header - HTTP C2 Header (server and implant)
func (*HttpC2Header) BeforeCreate ¶
func (h *HttpC2Header) BeforeCreate(tx *gorm.DB) (err error)
func (*HttpC2Header) ToProtobuf ¶
func (h *HttpC2Header) ToProtobuf() *clientpb.HTTPC2Header
type HttpC2ImplantConfig ¶
type HttpC2ImplantConfig struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
HttpC2ConfigID uuid.UUID `gorm:"type:uuid;"`
UserAgent string
ChromeBaseVersion int32
MacOSVersion string
NonceQueryArgChars string
ExtraURLParameters []HttpC2URLParameter
Headers []HttpC2Header
// File/Path Generation subset size of the http config to select during generation
// see randomSample function
MaxFileGen int32
MinFileGen int32
MaxPathGen int32
MinPathGen int32
// implant configuration for path length
MaxPathLength int32
MinPathLength int32
// gorm doesn not support string arrays apparently
Extensions string
PathSegments []HttpC2PathSegment
NonceQueryLength int32
NonceMode string
}
HttpC2ImplantConfig - HTTP C2 Implant Configuration
func (*HttpC2ImplantConfig) BeforeCreate ¶
func (h *HttpC2ImplantConfig) BeforeCreate(tx *gorm.DB) (err error)
func (*HttpC2ImplantConfig) ToProtobuf ¶
func (h *HttpC2ImplantConfig) ToProtobuf() *clientpb.HTTPC2ImplantConfig
type HttpC2PathSegment ¶
type HttpC2PathSegment struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
HttpC2ImplantConfigID uuid.UUID `gorm:"type:uuid;"`
IsFile bool
SegmentType int32 // Poll, Session, Close
Value string
}
HttpC2PathSegment - Represents a list of file/path URL segments (implant only)
func (*HttpC2PathSegment) BeforeCreate ¶
func (h *HttpC2PathSegment) BeforeCreate(tx *gorm.DB) (err error)
func (*HttpC2PathSegment) ToProtobuf ¶
func (h *HttpC2PathSegment) ToProtobuf() *clientpb.HTTPC2PathSegment
type HttpC2ServerConfig ¶
type HttpC2ServerConfig struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
HttpC2ConfigID uuid.UUID `gorm:"type:uuid;"`
RandomVersionHeaders bool
Headers []HttpC2Header
Cookies []HttpC2Cookie
}
HttpC2ServerConfig - HTTP C2 Server Configuration
func (*HttpC2ServerConfig) BeforeCreate ¶
func (h *HttpC2ServerConfig) BeforeCreate(tx *gorm.DB) (err error)
func (*HttpC2ServerConfig) ToProtobuf ¶
func (h *HttpC2ServerConfig) ToProtobuf() *clientpb.HTTPC2ServerConfig
type HttpC2URLParameter ¶
type HttpC2URLParameter struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
HttpC2ImplantConfigID uuid.UUID `gorm:"type:uuid;"`
Method string // HTTP Method
Name string // Name of URL parameter, must be 3+ characters
Value string // Value of the URL parameter
Probability int32 // 0 - 100
}
HttpC2URLParameter - Extra URL parameters (implant only)
func (*HttpC2URLParameter) BeforeCreate ¶
func (h *HttpC2URLParameter) BeforeCreate(tx *gorm.DB) (err error)
func (*HttpC2URLParameter) ToProtobuf ¶
func (h *HttpC2URLParameter) ToProtobuf() *clientpb.HTTPC2URLParameter
type IOC ¶
type IOC struct {
gorm.Model
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
HostID uuid.UUID `gorm:"type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
Path string
FileHash string
}
IOC - Represents an indicator of compromise, generally a file we've uploaded to a remote system.
func (*IOC) BeforeCreate ¶
BeforeCreate - GORM hook
func (*IOC) ToProtobuf ¶
type ImplantBuild ¶
type ImplantBuild struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
Name string `gorm:"unique;"`
// Checksums stores of the implant binary
MD5 string
SHA1 string
SHA256 string
// Burned indicates whether the implant
// has been seen on threat intel platforms
Burned bool
// Resource ID referencing build
ImplantID uint64
ImplantConfigID uuid.UUID
// ECC
PeerPublicKey string
PeerPublicKeyDigest string
PeerPrivateKey string
PeerPublicKeySignature string
AgeServerPublicKey string
MinisignServerPublicKey string
// MTLS
MtlsCACert string
MtlsCert string
MtlsKey string
// WireGuard
WGImplantPrivKey string
WGServerPubKey string
Stage bool
}
ImplantBuild - Represents an implant
func ImplantBuildFromProtobuf ¶
func ImplantBuildFromProtobuf(ib *clientpb.ImplantBuild) *ImplantBuild
func (*ImplantBuild) BeforeCreate ¶
func (ib *ImplantBuild) BeforeCreate(tx *gorm.DB) (err error)
BeforeCreate - GORM hook
func (*ImplantBuild) ToProtobuf ¶
func (ib *ImplantBuild) ToProtobuf() *clientpb.ImplantBuild
Convert ImplantBuild To Protobuf
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 ¶
BeforeCreate - GORM hook
func (*ImplantC2) ToProtobuf ¶
ToProtobuf - Convert to protobuf version
type ImplantConfig ¶
type ImplantConfig struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
ImplantProfileID *uuid.UUID
ImplantBuilds []ImplantBuild
CreatedAt time.Time `gorm:"->;<-:create;"`
// Go
GOOS string
GOARCH string
TemplateName string
IsBeacon bool
BeaconInterval int64
BeaconJitter int64
Debug bool
DebugFile string
Evasion bool
ObfuscateSymbols bool
ReconnectInterval int64
PollTimeout int64
MaxConnectionErrors uint32
ConnectionStrategy string
SGNEnabled bool
Exports string
// WireGuard
WGPeerTunIP string
WGKeyExchangePort uint32
WGTcpCommsPort uint32
C2 []ImplantC2
IncludeMTLS bool
IncludeWG bool
IncludeHTTP bool
IncludeDNS bool
CanaryDomains []CanaryDomain
IncludeNamePipe bool
IncludeTCP bool
// Limits
LimitDomainJoined bool
LimitHostname string
LimitUsername string
LimitDatetime string
LimitFileExists string
LimitLocale string
// Output Format
Format clientpb.OutputFormat
// For IsSharedLib bool
IsService bool
IsShellcode bool
RunAtLoad bool
HttpC2ConfigName string
NetGoEnabled bool
TrafficEncodersEnabled bool
Assets []EncoderAsset
Extension string
}
ImplantConfig - An implant build configuration
func ImplantConfigFromProtobuf ¶
func ImplantConfigFromProtobuf(pbConfig *clientpb.ImplantConfig) *ImplantConfig
ImplantConfigFromProtobuf - Create a native config struct from Protobuf
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 ImplantProfileFromProtobuf ¶
func ImplantProfileFromProtobuf(pbProfile *clientpb.ImplantProfile) *ImplantProfile
ImplantProfileFromProtobuf - Create a native profile struct from Protobuf
func (*ImplantProfile) BeforeCreate ¶
func (ip *ImplantProfile) BeforeCreate(tx *gorm.DB) (err error)
BeforeCreate - GORM hook
func (*ImplantProfile) ToProtobuf ¶
func (ip *ImplantProfile) ToProtobuf() *clientpb.ImplantProfile
ToProtobuf - Convert ImplantProfile to protobuf equiv
type KeyExHistory ¶
type KeyExHistory struct {
Sha256 string `gorm:"primaryKey;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
}
KeyExHistory - Represents an implant
func (*KeyExHistory) BeforeCreate ¶
func (k *KeyExHistory) BeforeCreate(tx *gorm.DB) (err error)
BeforeCreate - GORM hook
type KeyValue ¶
type KeyValue struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
Key string `gorm:"unique;"`
Value string
}
KeyValue - Represents an implant
type ListenerJob ¶
type ListenerJob struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
JobID uint32 `gorm:"unique;"`
Type string
HttpListener HTTPListener
MtlsListener MtlsListener
DnsListener DNSListener
WgListener WGListener
MultiplayerListener MultiplayerListener
}
func ListenerJobFromProtobuf ¶
func ListenerJobFromProtobuf(pbListenerJob *clientpb.ListenerJob) *ListenerJob
to model
func (*ListenerJob) BeforeCreate ¶
func (j *ListenerJob) BeforeCreate(tx *gorm.DB) (err error)
orm hooks
func (*ListenerJob) ToProtobuf ¶
func (j *ListenerJob) ToProtobuf() *clientpb.ListenerJob
To Protobuf
type Loot ¶
type Loot struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
FileType int
Name string
Size int64
OriginHostID uuid.UUID `gorm:"type:uuid;"`
}
Loot - Represents a piece of loot
func (*Loot) BeforeCreate ¶
BeforeCreate - GORM hook
func (*Loot) ToProtobuf ¶
type MonitoringProvider ¶
type MonitoringProvider struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
Type string // currently vt or xforce
APIKey string
APIPassword string
}
func MonitorFromProtobuf ¶
func MonitorFromProtobuf(m *clientpb.MonitoringProvider) MonitoringProvider
convert from protobuf
func (*MonitoringProvider) BeforeCreate ¶
func (m *MonitoringProvider) BeforeCreate(tx *gorm.DB) (err error)
func (*MonitoringProvider) ToProtobuf ¶
func (m *MonitoringProvider) ToProtobuf() *clientpb.MonitoringProvider
convert to protobuf
type MtlsListener ¶
type MtlsListener struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
ListenerJobID uuid.UUID `gorm:"type:uuid;"`
Host string
Port uint32
}
func (*MtlsListener) BeforeCreate ¶
func (j *MtlsListener) BeforeCreate(tx *gorm.DB) (err error)
func (*MtlsListener) ToProtobuf ¶
func (j *MtlsListener) ToProtobuf() *clientpb.MTLSListenerReq
type MultiplayerListener ¶
type MultiplayerListener struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
ListenerJobID uuid.UUID `gorm:"type:uuid;"`
Host string
Port uint32
}
func (*MultiplayerListener) ToProtobuf ¶
func (j *MultiplayerListener) ToProtobuf() *clientpb.MultiplayerListenerReq
type Operator ¶
type Operator struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
Name string
Token string `gorm:"uniqueIndex"` // NOTE: This is the SHA256 of the token
PermissionAll bool `gorm:"default:false"` // Access all gRPC APIs
PermissionBuilder bool `gorm:"default:false"` // Access Builder gRPC APIs
PermissionCrackstation bool `gorm:"default:false"` // Access Crackstation gRPC APIs
}
Operator - Collections of content to serve from HTTP(S)
type ResourceID ¶
type ResourceID struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
Type string // encoder or stager
Name string
Value uint64 // prime number used to reference resource in requests
}
Host - Represents a host machine
func (*ResourceID) BeforeCreate ¶
func (h *ResourceID) BeforeCreate(tx *gorm.DB) (err error)
BeforeCreate - GORM hook
func (*ResourceID) ToProtobuf ¶
func (rid *ResourceID) ToProtobuf() *clientpb.ResourceID
ToProtobuf - Converts to protobuf object
type WGKeys ¶
type WGKeys struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
PrivKey string
PubKey string
}
WGKeys - WGKeys database model
type WGListener ¶
type WGListener struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
ListenerJobID uuid.UUID `gorm:"type:uuid;"`
Host string
Port uint32
NPort uint32
KeyPort uint32
TunIP string
}
func (*WGListener) BeforeCreate ¶
func (j *WGListener) BeforeCreate(tx *gorm.DB) (err error)
func (*WGListener) ToProtobuf ¶
func (j *WGListener) ToProtobuf() *clientpb.WGListenerReq
type WGPeer ¶
type WGPeer struct {
// gorm.Model
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
PrivKey string
PubKey string
TunIP string
}
WGPeer- WGPeer database model
type WebContent ¶
type WebContent struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
WebsiteID uuid.UUID `gorm:"type:uuid;"`
Path string `gorm:"primaryKey"`
Size uint64
ContentType string
}
WebContent - One piece of content mapped to a path
func WebContentFromProtobuf ¶
func WebContentFromProtobuf(pbWebContent *clientpb.WebContent) WebContent
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 ¶
BeforeCreate - GORM hook