Documentation
¶
Index ¶
- func FromRegister(register *implantpb.Register) string
- func ToEncryptionProtobuf(encryption *EncryptionConfig) *clientpb.Encryption
- func ToPipelinePB(pipeline Pipeline) *clientpb.Pipeline
- func ToRegister(context string) *implantpb.Register
- func ToTlsProtobuf(tls *TlsConfig) *clientpb.TLS
- type Builder
- type Certificate
- type EncryptionConfig
- type File
- type FileDescription
- type Operator
- type Os
- type Pipeline
- type Process
- type Profile
- type Session
- type Task
- type Timer
- type TlsConfig
- type WebsiteContent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromRegister ¶ added in v0.0.3
FromRegister - convert session to context json string
func ToEncryptionProtobuf ¶ added in v0.0.3
func ToEncryptionProtobuf(encryption *EncryptionConfig) *clientpb.Encryption
func ToPipelinePB ¶ added in v0.0.3
func ToRegister ¶ added in v0.0.3
func ToTlsProtobuf ¶ added in v0.0.2
Types ¶
type Builder ¶ added in v0.0.3
type Builder struct {
ID uint32 `gorm:"primaryKey;autoIncrement"`
Name string `gorm:"unique"`
ProfileName string `gorm:"index;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;foreignKey:ProfileName;references:Name"` // 将 ProfileName 设置为外键
CreatedAt time.Time `gorm:"->;<-:create;"`
Target string // build target, like win64, win32, linux64
Type string // build type, pe, dll, shellcode
Stager string // shellcode prelude beacon bind
Modules string // default modules, comma split, e.g. "execute_exe,execute_dll"
ParamsJson string
CA string // ca file , ca file content
Path string
Profile Profile `gorm:"foreignKey:ProfileName;references:Name;"`
Os string
Arch string
Log string
}
func (*Builder) BeforeCreate ¶ added in v0.0.3
func (*Builder) FromProtobuf ¶ added in v0.0.3
type Certificate ¶
type Certificate struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
CommonName string
CAType int
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 EncryptionConfig ¶ added in v0.0.2
type EncryptionConfig struct {
Enable bool `gorm:"column:enable"`
Type string `gorm:"column:type"`
Key string `gorm:"column:key"`
}
func ToEncryptionDB ¶ added in v0.0.3
func ToEncryptionDB(encryption *clientpb.Encryption) EncryptionConfig
type File ¶ added in v0.0.3
type File struct {
ID string `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
Type string
SessionID string
Session Session `gorm:"foreignKey:SessionID"`
Cur int
Total int
Description string
}
func (*File) BeforeCreate ¶ added in v0.0.3
BeforeCreate - GORM hook
func (*File) ToFileProtobuf ¶ added in v0.0.3
func (*File) ToProtobuf ¶ added in v0.0.3
type FileDescription ¶
type FileDescription struct {
Name string `json:"name"`
NickName string `json:"nick_name"`
Path string `json:"path"`
Size int64 `json:"size"`
Command string `json:"command"`
}
func (*FileDescription) ToJsonString ¶ added in v0.0.2
func (td *FileDescription) ToJsonString() (string, error)
type Operator ¶
type Operator struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
Name string `gorm:"uniqueIndex"`
Remote string `gorm:"type:string;"`
Type string `gorm:"type:string;"`
}
Operator - Colletions of content to serve from HTTP(S)
type Os ¶
type Os struct {
Name string `gorm:"type:varchar(255)" json:"name"`
Version string `gorm:"type:varchar(255)" json:"version"`
Arch string `gorm:"type:varchar(255)" json:"arch"`
Username string `gorm:"type:varchar(255)" json:"username"`
Hostname string `gorm:"type:varchar(255)" json:"hostname"`
Locale string `gorm:"type:varchar(255)" json:"locale"`
}
type Pipeline ¶ added in v0.0.2
type Pipeline struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
ListenerID string `gorm:"type:string;"`
Name string `gorm:"unique,type:string"`
WebPath string `gorm:"type:string;default:''"`
IP string `gorm:"type:string;default:''"`
Host string `config:"host"`
Port uint16 `config:"port"`
Type string `gorm:"type:string;"`
Parser string `gorm:"type:string;"`
Enable bool `gorm:"type:boolean;"`
Tls TlsConfig `gorm:"embedded;embeddedPrefix:tls_"`
Encryption EncryptionConfig `gorm:"embedded;embeddedPrefix:encryption_"`
}
Pipeline
func FromPipelinePb ¶ added in v0.0.3
type Process ¶
type Process struct {
Name string `gorm:"type:varchar(255)" json:"name"`
Pid int32 `json:"pid"`
Ppid int32 `json:"ppid"`
Owner string `gorm:"type:varchar(255)" json:"owner"`
Arch string `gorm:"type:varchar(255)" json:"arch"`
Path string `gorm:"type:varchar(255)" json:"path"`
Args string `gorm:"type:varchar(255)" json:"args"`
}
func FromProcessPb ¶ added in v0.0.3
type Profile ¶ added in v0.0.3
type Profile struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
// build
Name string `gorm:"unique"` // Ensuring Name is unique
Target string // build target win64,win32,linux64
// build type
Type string
// shellcode prelude beacon bind
Stager string
Proxy string // not impl
Obfuscate string // not impl, obf llvm plug ,
Modules string // default modules, comma split, e.g. "execute_exe,execute_dll"
CA string // ca file , ca file content
Raw []byte
// params
Params *types.ProfileParams `gorm:"-"` // Ignored by GORM
ParamsJson string `gorm:"type:text"` // Used for storing serialized params
PipelineID string `gorm:"type:string;index;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;"`
Pipeline *Pipeline `gorm:"foreignKey:PipelineID;references:Name;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
// contains filtered or unexported fields
}
func (*Profile) BeforeCreate ¶ added in v0.0.3
func (*Profile) DeserializeImplantConfig ¶ added in v0.0.3
Deserialize implantConfig (JSON string) to a struct or map
func (*Profile) ToProtobuf ¶ added in v0.0.3
type Session ¶
type Session struct {
SessionID string `gorm:"primaryKey;->;<-:create;type:uuid;"`
RawID uint32
CreatedAt time.Time `gorm:"->;<-:create;"`
Note string
GroupName string
Target string
Initialized bool
Type string
IsPrivilege bool
PipelineID string
IsAlive bool
Context string
LastCheckin int64
Interval uint64
Jitter float64
IsRemoved bool `gorm:"default:false"`
Os *Os `gorm:"embedded"`
Process *Process `gorm:"embedded"`
}
func (*Session) ToProtobuf ¶ added in v0.0.3
type Task ¶
type Task struct {
ID string `gorm:"primaryKey;->;<-:create;type:uuid;"`
Created time.Time `gorm:"->;<-:create;"`
Deadline time.Time
CallBy string
Seq int
Type string
SessionID string
Session Session `gorm:"foreignKey:SessionID"`
Cur int
Total int
Description string
ClientName string
}
func (*Task) ToProtobuf ¶
type Timer ¶
func FromTimePb ¶ added in v0.0.3
type TlsConfig ¶ added in v0.0.2
type WebsiteContent ¶ added in v0.0.3
type WebsiteContent struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
Name string `gorm:""`
Path string `gorm:""`
Size uint64 `gorm:""`
ContentType string `gorm:""`
Type string `gorm:""`
Parser string `gorm:""`
}
WebsiteContent - Single table that combines Website and WebContent
func WebsiteContentFromProtobuf ¶ added in v0.0.3
func WebsiteContentFromProtobuf(pbWebContent *clientpb.WebContent) WebsiteContent
FromProtobuf - Converts from protobuf object to WebsiteContent
func (*WebsiteContent) BeforeCreate ¶ added in v0.0.3
func (wc *WebsiteContent) BeforeCreate(tx *gorm.DB) (err error)
BeforeCreate - GORM hook to automatically set values
func (*WebsiteContent) ToProtobuf ¶ added in v0.0.3
func (wc *WebsiteContent) ToProtobuf(webContentDir string) *clientpb.Website
ToProtobuf - Converts to protobuf object
Click to show internal directories.
Click to hide internal directories.