Documentation
¶
Index ¶
- Variables
- func DefaultDeleteAgent(ctx context.Context, in *Agent, db *gorm.DB) error
- func DefaultDeleteAgentSet(ctx context.Context, in []*Agent, db *gorm.DB) error
- func DefaultDeleteChannel(ctx context.Context, in *Channel, db *gorm.DB) error
- func DefaultDeleteChannelSet(ctx context.Context, in []*Channel, db *gorm.DB) error
- func DefaultDeleteTask(ctx context.Context, in *Task, db *gorm.DB) error
- func DefaultDeleteTaskSet(ctx context.Context, in []*Task, db *gorm.DB) error
- type Agent
- func DefaultApplyFieldMaskAgent(ctx context.Context, patchee *Agent, patcher *Agent, ...) (*Agent, error)
- func DefaultCreateAgent(ctx context.Context, in *Agent, db *gorm.DB) (*Agent, error)
- func DefaultListAgent(ctx context.Context, db *gorm.DB) ([]*Agent, error)
- func DefaultPatchAgent(ctx context.Context, in *Agent, updateMask *field_mask.FieldMask, db *gorm.DB) (*Agent, error)
- func DefaultPatchSetAgent(ctx context.Context, objects []*Agent, updateMasks []*field_mask.FieldMask, ...) ([]*Agent, error)
- func DefaultReadAgent(ctx context.Context, in *Agent, db *gorm.DB) (*Agent, error)
- func DefaultStrictUpdateAgent(ctx context.Context, in *Agent, db *gorm.DB) (*Agent, error)
- func (*Agent) Descriptor() ([]byte, []int)deprecated
- func (x *Agent) GetArch() string
- func (x *Agent) GetBurned() bool
- func (x *Agent) GetChannels() []*Channel
- func (x *Agent) GetCreatedAt() *timestamppb.Timestamp
- func (x *Agent) GetFilename() string
- func (x *Agent) GetFirstContact() int64
- func (x *Agent) GetHost() *pb.Host
- func (x *Agent) GetId() string
- func (x *Agent) GetIsDead() bool
- func (x *Agent) GetLastCheckin() int64
- func (x *Agent) GetLocale() string
- func (x *Agent) GetName() string
- func (x *Agent) GetNextCheckin() int64
- func (x *Agent) GetProcess() *pb.Process
- func (x *Agent) GetRuntime() string
- func (x *Agent) GetSource() *pb1.Source
- func (x *Agent) GetTasks() []*Task
- func (x *Agent) GetTasksCount() int64
- func (x *Agent) GetTasksCountCompleted() int64
- func (x *Agent) GetTool() string
- func (x *Agent) GetUpdatedAt() *timestamppb.Timestamp
- func (x *Agent) GetUser() *pb.User
- func (x *Agent) GetWorkingDirectory() string
- func (*Agent) ProtoMessage()
- func (x *Agent) ProtoReflect() protoreflect.Message
- func (x *Agent) Reset()
- func (x *Agent) String() string
- func (m *Agent) ToORM(ctx context.Context) (AgentORM, error)
- type AgentORM
- type AgentORMWithAfterCreate_
- type AgentORMWithAfterDeleteSet
- type AgentORMWithAfterDelete_
- type AgentORMWithAfterListFind
- type AgentORMWithAfterReadFind
- type AgentORMWithAfterStrictUpdateSave
- type AgentORMWithBeforeCreate_
- type AgentORMWithBeforeDeleteSet
- type AgentORMWithBeforeDelete_
- type AgentORMWithBeforeListApplyQuery
- type AgentORMWithBeforeListFind
- type AgentORMWithBeforeReadApplyQuery
- type AgentORMWithBeforeReadFind
- type AgentORMWithBeforeStrictUpdateCleanup
- type AgentORMWithBeforeStrictUpdateSave
- type AgentWithAfterPatchSave
- type AgentWithAfterToORM
- type AgentWithAfterToPB
- type AgentWithBeforePatchApplyFieldMask
- type AgentWithBeforePatchRead
- type AgentWithBeforePatchSave
- type AgentWithBeforeToORM
- type AgentWithBeforeToPB
- type Channel
- func DefaultApplyFieldMaskChannel(ctx context.Context, patchee *Channel, patcher *Channel, ...) (*Channel, error)
- func DefaultCreateChannel(ctx context.Context, in *Channel, db *gorm.DB) (*Channel, error)
- func DefaultListChannel(ctx context.Context, db *gorm.DB) ([]*Channel, error)
- func DefaultPatchChannel(ctx context.Context, in *Channel, updateMask *field_mask.FieldMask, ...) (*Channel, error)
- func DefaultPatchSetChannel(ctx context.Context, objects []*Channel, updateMasks []*field_mask.FieldMask, ...) ([]*Channel, error)
- func DefaultReadChannel(ctx context.Context, in *Channel, db *gorm.DB) (*Channel, error)
- func DefaultStrictUpdateChannel(ctx context.Context, in *Channel, db *gorm.DB) (*Channel, error)
- func (*Channel) Descriptor() ([]byte, []int)deprecated
- func (x *Channel) GetAttempts() int32
- func (x *Channel) GetCreatedAt() *timestamppb.Timestamp
- func (x *Channel) GetDirection() string
- func (x *Channel) GetFailures() int32
- func (x *Channel) GetId() string
- func (x *Channel) GetInterval() int64
- func (x *Channel) GetJitter() int64
- func (x *Channel) GetLastCheckin() int64
- func (x *Channel) GetLocalAddress() string
- func (x *Channel) GetNextCheckin() int64
- func (x *Channel) GetOrder() int32
- func (x *Channel) GetPeerID() string
- func (x *Channel) GetProtocol() string
- func (x *Channel) GetProxyURL() string
- func (x *Channel) GetRawData() string
- func (x *Channel) GetReconnectInterval() int64
- func (x *Channel) GetRemoteAddress() string
- func (x *Channel) GetRunning() bool
- func (x *Channel) GetType() string
- func (x *Channel) GetUpdatedAt() *timestamppb.Timestamp
- func (*Channel) ProtoMessage()
- func (x *Channel) ProtoReflect() protoreflect.Message
- func (x *Channel) Reset()
- func (x *Channel) String() string
- func (m *Channel) ToORM(ctx context.Context) (ChannelORM, error)
- type ChannelORM
- type ChannelORMWithAfterCreate_
- type ChannelORMWithAfterDeleteSet
- type ChannelORMWithAfterDelete_
- type ChannelORMWithAfterListFind
- type ChannelORMWithAfterReadFind
- type ChannelORMWithAfterStrictUpdateSave
- type ChannelORMWithBeforeCreate_
- type ChannelORMWithBeforeDeleteSet
- type ChannelORMWithBeforeDelete_
- type ChannelORMWithBeforeListApplyQuery
- type ChannelORMWithBeforeListFind
- type ChannelORMWithBeforeReadApplyQuery
- type ChannelORMWithBeforeReadFind
- type ChannelORMWithBeforeStrictUpdateCleanup
- type ChannelORMWithBeforeStrictUpdateSave
- type ChannelWithAfterPatchSave
- type ChannelWithAfterToORM
- type ChannelWithAfterToPB
- type ChannelWithBeforePatchApplyFieldMask
- type ChannelWithBeforePatchRead
- type ChannelWithBeforePatchSave
- type ChannelWithBeforeToORM
- type ChannelWithBeforeToPB
- type Task
- func DefaultApplyFieldMaskTask(ctx context.Context, patchee *Task, patcher *Task, ...) (*Task, error)
- func DefaultCreateTask(ctx context.Context, in *Task, db *gorm.DB) (*Task, error)
- func DefaultListTask(ctx context.Context, db *gorm.DB) ([]*Task, error)
- func DefaultPatchSetTask(ctx context.Context, objects []*Task, updateMasks []*field_mask.FieldMask, ...) ([]*Task, error)
- func DefaultPatchTask(ctx context.Context, in *Task, updateMask *field_mask.FieldMask, db *gorm.DB) (*Task, error)
- func DefaultReadTask(ctx context.Context, in *Task, db *gorm.DB) (*Task, error)
- func DefaultStrictUpdateTask(ctx context.Context, in *Task, db *gorm.DB) (*Task, error)
- func (*Task) Descriptor() ([]byte, []int)deprecated
- func (x *Task) GetCompletedAt() *timestamppb.Timestamp
- func (x *Task) GetCreatedAt() *timestamppb.Timestamp
- func (x *Task) GetDescription() string
- func (x *Task) GetId() string
- func (x *Task) GetRequest() string
- func (x *Task) GetResponse() string
- func (x *Task) GetSentAt() *timestamppb.Timestamp
- func (x *Task) GetState() string
- func (x *Task) GetUpdatedAt() *timestamppb.Timestamp
- func (*Task) ProtoMessage()
- func (x *Task) ProtoReflect() protoreflect.Message
- func (x *Task) Reset()
- func (x *Task) String() string
- func (m *Task) ToORM(ctx context.Context) (TaskORM, error)
- type TaskORM
- type TaskORMWithAfterCreate_
- type TaskORMWithAfterDeleteSet
- type TaskORMWithAfterDelete_
- type TaskORMWithAfterListFind
- type TaskORMWithAfterReadFind
- type TaskORMWithAfterStrictUpdateSave
- type TaskORMWithBeforeCreate_
- type TaskORMWithBeforeDeleteSet
- type TaskORMWithBeforeDelete_
- type TaskORMWithBeforeListApplyQuery
- type TaskORMWithBeforeListFind
- type TaskORMWithBeforeReadApplyQuery
- type TaskORMWithBeforeReadFind
- type TaskORMWithBeforeStrictUpdateCleanup
- type TaskORMWithBeforeStrictUpdateSave
- type TaskWithAfterPatchSave
- type TaskWithAfterToORM
- type TaskWithAfterToPB
- type TaskWithBeforePatchApplyFieldMask
- type TaskWithBeforePatchRead
- type TaskWithBeforePatchSave
- type TaskWithBeforeToORM
- type TaskWithBeforeToPB
Constants ¶
This section is empty.
Variables ¶
var File_c2_pb_agent_proto protoreflect.FileDescriptor
var File_c2_pb_channel_proto protoreflect.FileDescriptor
Functions ¶
func DefaultDeleteAgent ¶
func DefaultDeleteAgentSet ¶
func DefaultDeleteChannel ¶
func DefaultDeleteChannelSet ¶
Types ¶
type Agent ¶
type Agent struct {
// @gotags: display:"ID" readonly:"true" strict:"yes"
Id string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty" display:"ID" readonly:"true" strict:"yes"`
// @gotags: display:"Created at" readonly:"true" xml:"-"
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty" display:"Created at" readonly:"true" xml:"-"`
// @gotags: display:"Updated at" readonly:"true" xml:"-"
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty" display:"Updated at" readonly:"true" xml:"-"`
// Core
Host *pb.Host `protobuf:"bytes,9,opt,name=Host,proto3" json:"Host,omitempty"`
Name string `protobuf:"bytes,10,opt,name=Name,proto3" json:"Name,omitempty"`
Runtime string `protobuf:"bytes,11,opt,name=Runtime,proto3" json:"Runtime,omitempty"`
Tool string `protobuf:"bytes,12,opt,name=Tool,proto3" json:"Tool,omitempty"`
Burned bool `protobuf:"varint,13,opt,name=Burned,proto3" json:"Burned,omitempty"`
IsDead bool `protobuf:"varint,14,opt,name=IsDead,proto3" json:"IsDead,omitempty"`
Arch string `protobuf:"bytes,15,opt,name=Arch,proto3" json:"Arch,omitempty"`
// Source - The provenance record for this agent (Tool=<C2 framework>, Type=C2). Stamped
// onto the host/user/process objects the agent contributes.
Source *pb1.Source `protobuf:"bytes,16,opt,name=Source,proto3" json:"Source,omitempty"`
// System
Locale string `protobuf:"bytes,30,opt,name=Locale,proto3" json:"Locale,omitempty"`
Filename string `protobuf:"bytes,31,opt,name=Filename,proto3" json:"Filename,omitempty"` // Argv[0]
User *pb.User `protobuf:"bytes,32,opt,name=User,proto3" json:"User,omitempty"`
Process *pb.Process `protobuf:"bytes,34,opt,name=Process,proto3" json:"Process,omitempty"`
// Communications
FirstContact int64 `protobuf:"varint,50,opt,name=FirstContact,proto3" json:"FirstContact,omitempty"`
LastCheckin int64 `protobuf:"varint,51,opt,name=LastCheckin,proto3" json:"LastCheckin,omitempty"`
NextCheckin int64 `protobuf:"varint,52,opt,name=NextCheckin,proto3" json:"NextCheckin,omitempty"`
Channels []*Channel `protobuf:"bytes,53,rep,name=Channels,proto3" json:"Channels,omitempty"`
// Others
Tasks []*Task `protobuf:"bytes,90,rep,name=Tasks,proto3" json:"Tasks,omitempty"`
TasksCount int64 `protobuf:"varint,91,opt,name=TasksCount,proto3" json:"TasksCount,omitempty"`
TasksCountCompleted int64 `protobuf:"varint,92,opt,name=TasksCountCompleted,proto3" json:"TasksCountCompleted,omitempty"`
WorkingDirectory string `protobuf:"bytes,93,opt,name=WorkingDirectory,proto3" json:"WorkingDirectory,omitempty"`
// contains filtered or unexported fields
}
Agent represents a C2 agent/implant program, irrespective of the communication channels and behavior it makes use of.
func DefaultApplyFieldMaskAgent ¶
func DefaultApplyFieldMaskAgent(ctx context.Context, patchee *Agent, patcher *Agent, updateMask *field_mask.FieldMask, prefix string, db *gorm.DB) (*Agent, error)
DefaultApplyFieldMaskAgent patches an pbObject with patcher according to a field mask.
func DefaultCreateAgent ¶
DefaultCreateAgent executes a basic gorm create call
func DefaultListAgent ¶
DefaultListAgent executes a gorm list call
func DefaultPatchAgent ¶
func DefaultPatchAgent(ctx context.Context, in *Agent, updateMask *field_mask.FieldMask, db *gorm.DB) (*Agent, error)
DefaultPatchAgent executes a basic gorm update call with patch behavior
func DefaultPatchSetAgent ¶
func DefaultPatchSetAgent(ctx context.Context, objects []*Agent, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*Agent, error)
DefaultPatchSetAgent executes a bulk gorm update call with patch behavior
func DefaultReadAgent ¶
func DefaultStrictUpdateAgent ¶
DefaultStrictUpdateAgent clears / replaces / appends first level 1:many children and then executes a gorm update call
func (*Agent) Descriptor
deprecated
func (*Agent) GetChannels ¶
func (*Agent) GetCreatedAt ¶
func (x *Agent) GetCreatedAt() *timestamppb.Timestamp
func (*Agent) GetFilename ¶
func (*Agent) GetFirstContact ¶
func (*Agent) GetLastCheckin ¶
func (*Agent) GetNextCheckin ¶
func (*Agent) GetProcess ¶
func (*Agent) GetRuntime ¶
func (*Agent) GetTasksCount ¶
func (*Agent) GetTasksCountCompleted ¶
func (*Agent) GetUpdatedAt ¶
func (x *Agent) GetUpdatedAt() *timestamppb.Timestamp
func (*Agent) GetWorkingDirectory ¶
func (*Agent) ProtoMessage ¶
func (*Agent) ProtoMessage()
func (*Agent) ProtoReflect ¶
func (x *Agent) ProtoReflect() protoreflect.Message
type AgentORM ¶
type AgentORM struct {
Arch string
Burned bool
Channels []*ChannelORM `gorm:"foreignKey:AgentId;references:Id"`
CreatedAt *time.Time
Filename string
FirstContact int64
Host *pb.HostORM `gorm:"foreignKey:HostId;references:Id"`
HostId *string
Id string `gorm:"type:uuid;primaryKey"`
IsDead bool
LastCheckin int64
Locale string
Name string
NextCheckin int64
Process *pb.ProcessORM `gorm:"foreignKey:ProcessId;references:Id"`
ProcessId *string
Runtime string
Source *pb1.SourceORM `gorm:"foreignKey:SourceId;references:Id"`
SourceId *string
Tasks []*TaskORM `gorm:"foreignKey:AgentId;references:Id"`
TasksCount int64
TasksCountCompleted int64
Tool string
UpdatedAt *time.Time
User *pb.UserORM `gorm:"foreignKey:UserId;references:Id"`
UserId *string
WorkingDirectory string
}
func (*AgentORM) BeforeCreate ¶
BeforeCreate - GORM-specific autogenerated helpers.
type AgentWithAfterPatchSave ¶
type AgentWithAfterToORM ¶
AgentAfterToORM called after default ToORM code
type AgentWithAfterToPB ¶
AgentAfterToPB called after default ToPB code
type AgentWithBeforeToORM ¶
AgentBeforeToORM called before default ToORM code
type AgentWithBeforeToPB ¶
AgentBeforeToPB called before default ToPB code
type Channel ¶
type Channel struct {
// @gotags: display:"ID" readonly:"true" strict:"yes"
Id string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty" display:"ID" readonly:"true" strict:"yes"`
// @gotags: display:"Created at" readonly:"true" xml:"-"
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty" display:"Created at" readonly:"true" xml:"-"`
// @gotags: display:"Updated at" readonly:"true" xml:"-"
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty" display:"Updated at" readonly:"true" xml:"-"`
// Base
Type string `protobuf:"bytes,9,opt,name=Type,proto3" json:"Type,omitempty"`
Direction string `protobuf:"bytes,10,opt,name=Direction,proto3" json:"Direction,omitempty"`
PeerID string `protobuf:"bytes,11,opt,name=PeerID,proto3" json:"PeerID,omitempty"`
Order int32 `protobuf:"varint,12,opt,name=Order,proto3" json:"Order,omitempty"`
Running bool `protobuf:"varint,13,opt,name=Running,proto3" json:"Running,omitempty"`
Protocol string `protobuf:"bytes,14,opt,name=Protocol,proto3" json:"Protocol,omitempty"`
RemoteAddress string `protobuf:"bytes,15,opt,name=RemoteAddress,proto3" json:"RemoteAddress,omitempty"`
LocalAddress string `protobuf:"bytes,16,opt,name=LocalAddress,proto3" json:"LocalAddress,omitempty"` // Filled by the Connection type
ProxyURL string `protobuf:"bytes,17,opt,name=ProxyURL,proto3" json:"ProxyURL,omitempty"`
// Malleable Profile = 13;
// Also add a simpler field for querying URI/remotes.
RawData string `protobuf:"bytes,18,opt,name=RawData,proto3" json:"RawData,omitempty"`
ReconnectInterval int64 `protobuf:"varint,21,opt,name=ReconnectInterval,proto3" json:"ReconnectInterval,omitempty"`
Interval int64 `protobuf:"varint,22,opt,name=Interval,proto3" json:"Interval,omitempty"`
Jitter int64 `protobuf:"varint,23,opt,name=Jitter,proto3" json:"Jitter,omitempty"`
// Live
Attempts int32 `protobuf:"varint,30,opt,name=Attempts,proto3" json:"Attempts,omitempty"`
Failures int32 `protobuf:"varint,31,opt,name=Failures,proto3" json:"Failures,omitempty"`
LastCheckin int64 `protobuf:"varint,32,opt,name=LastCheckin,proto3" json:"LastCheckin,omitempty"`
NextCheckin int64 `protobuf:"varint,33,opt,name=NextCheckin,proto3" json:"NextCheckin,omitempty"`
// contains filtered or unexported fields
}
Channel represents an active C2 communication channel between an Agent and an arbitrary counterpart (a server, a pivot agent, etc). This channel might not be active in the sense that communication is established, and might be simply "available" to an agent without it running and using it already.
func DefaultApplyFieldMaskChannel ¶
func DefaultApplyFieldMaskChannel(ctx context.Context, patchee *Channel, patcher *Channel, updateMask *field_mask.FieldMask, prefix string, db *gorm.DB) (*Channel, error)
DefaultApplyFieldMaskChannel patches an pbObject with patcher according to a field mask.
func DefaultCreateChannel ¶
DefaultCreateChannel executes a basic gorm create call
func DefaultListChannel ¶
DefaultListChannel executes a gorm list call
func DefaultPatchChannel ¶
func DefaultPatchChannel(ctx context.Context, in *Channel, updateMask *field_mask.FieldMask, db *gorm.DB) (*Channel, error)
DefaultPatchChannel executes a basic gorm update call with patch behavior
func DefaultPatchSetChannel ¶
func DefaultPatchSetChannel(ctx context.Context, objects []*Channel, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*Channel, error)
DefaultPatchSetChannel executes a bulk gorm update call with patch behavior
func DefaultReadChannel ¶
func DefaultStrictUpdateChannel ¶
DefaultStrictUpdateChannel clears / replaces / appends first level 1:many children and then executes a gorm update call
func (*Channel) Descriptor
deprecated
func (*Channel) GetAttempts ¶
func (*Channel) GetCreatedAt ¶
func (x *Channel) GetCreatedAt() *timestamppb.Timestamp
func (*Channel) GetDirection ¶
func (*Channel) GetFailures ¶
func (*Channel) GetInterval ¶
func (*Channel) GetLastCheckin ¶
func (*Channel) GetLocalAddress ¶
func (*Channel) GetNextCheckin ¶
func (*Channel) GetProtocol ¶
func (*Channel) GetProxyURL ¶
func (*Channel) GetRawData ¶
func (*Channel) GetReconnectInterval ¶
func (*Channel) GetRemoteAddress ¶
func (*Channel) GetRunning ¶
func (*Channel) GetUpdatedAt ¶
func (x *Channel) GetUpdatedAt() *timestamppb.Timestamp
func (*Channel) ProtoMessage ¶
func (*Channel) ProtoMessage()
func (*Channel) ProtoReflect ¶
func (x *Channel) ProtoReflect() protoreflect.Message
type ChannelORM ¶
type ChannelORM struct {
AgentId *string
Attempts int32
CreatedAt *time.Time
Direction string
Failures int32
Id string `gorm:"type:uuid;primaryKey"`
Interval int64
Jitter int64
LastCheckin int64
LocalAddress string
NextCheckin int64
Order int32
PeerID string
Protocol string
ProxyURL string
RawData string
ReconnectInterval int64
RemoteAddress string
Running bool
Type string
UpdatedAt *time.Time
}
func (*ChannelORM) BeforeCreate ¶
func (channel *ChannelORM) BeforeCreate(tx *gorm.DB) (err error)
BeforeCreate - GORM-specific autogenerated helpers.
func (ChannelORM) TableName ¶
func (ChannelORM) TableName() string
TableName overrides the default tablename generated by GORM
type ChannelWithAfterToORM ¶
type ChannelWithAfterToORM interface {
AfterToORM(context.Context, *ChannelORM) error
}
ChannelAfterToORM called after default ToORM code
type ChannelWithAfterToPB ¶
ChannelAfterToPB called after default ToPB code
type ChannelWithBeforeToORM ¶
type ChannelWithBeforeToORM interface {
BeforeToORM(context.Context, *ChannelORM) error
}
ChannelBeforeToORM called before default ToORM code
type ChannelWithBeforeToPB ¶
ChannelBeforeToPB called before default ToPB code
type Task ¶
type Task struct {
// @gotags: display:"ID" readonly:"true" strict:"yes"
Id string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty" display:"ID" readonly:"true" strict:"yes"`
// @gotags: display:"Created at" readonly:"true" xml:"-"
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty" display:"Created at" readonly:"true" xml:"-"`
// @gotags: display:"Updated at" readonly:"true" xml:"-"
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty" display:"Updated at" readonly:"true" xml:"-"`
// @gotags: display:"Sent at" readonly:"true" xml:"-"
SentAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=SentAt,proto3" json:"SentAt,omitempty" display:"Sent at" readonly:"true" xml:"-"`
// @gotags: display:"Completed at" readonly:"true" xml:"-"
CompletedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=CompletedAt,proto3" json:"CompletedAt,omitempty" display:"Completed at" readonly:"true" xml:"-"`
// string AgentID = 10;
State string `protobuf:"bytes,10,opt,name=State,proto3" json:"State,omitempty"`
Request string `protobuf:"bytes,11,opt,name=Request,proto3" json:"Request,omitempty"` // bytes
Response string `protobuf:"bytes,12,opt,name=Response,proto3" json:"Response,omitempty"` // bytes
Description string `protobuf:"bytes,13,opt,name=Description,proto3" json:"Description,omitempty"`
// contains filtered or unexported fields
}
Task represents a task to run on a target host, irrespective of C2 channel/types through which it's sent and its results received.
func DefaultApplyFieldMaskTask ¶
func DefaultApplyFieldMaskTask(ctx context.Context, patchee *Task, patcher *Task, updateMask *field_mask.FieldMask, prefix string, db *gorm.DB) (*Task, error)
DefaultApplyFieldMaskTask patches an pbObject with patcher according to a field mask.
func DefaultCreateTask ¶
DefaultCreateTask executes a basic gorm create call
func DefaultListTask ¶
DefaultListTask executes a gorm list call
func DefaultPatchSetTask ¶
func DefaultPatchSetTask(ctx context.Context, objects []*Task, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*Task, error)
DefaultPatchSetTask executes a bulk gorm update call with patch behavior
func DefaultPatchTask ¶
func DefaultPatchTask(ctx context.Context, in *Task, updateMask *field_mask.FieldMask, db *gorm.DB) (*Task, error)
DefaultPatchTask executes a basic gorm update call with patch behavior
func DefaultReadTask ¶
func DefaultStrictUpdateTask ¶
DefaultStrictUpdateTask clears / replaces / appends first level 1:many children and then executes a gorm update call
func (*Task) Descriptor
deprecated
func (*Task) GetCompletedAt ¶
func (x *Task) GetCompletedAt() *timestamppb.Timestamp
func (*Task) GetCreatedAt ¶
func (x *Task) GetCreatedAt() *timestamppb.Timestamp
func (*Task) GetDescription ¶
func (*Task) GetRequest ¶
func (*Task) GetResponse ¶
func (*Task) GetSentAt ¶
func (x *Task) GetSentAt() *timestamppb.Timestamp
func (*Task) GetUpdatedAt ¶
func (x *Task) GetUpdatedAt() *timestamppb.Timestamp
func (*Task) ProtoMessage ¶
func (*Task) ProtoMessage()
func (*Task) ProtoReflect ¶
func (x *Task) ProtoReflect() protoreflect.Message
type TaskORM ¶
type TaskORM struct {
AgentId *string
CompletedAt *time.Time
CreatedAt *time.Time
Description string
Id string `gorm:"type:uuid;primaryKey"`
Request string
Response string
SentAt *time.Time
State string
UpdatedAt *time.Time
}
func (*TaskORM) BeforeCreate ¶
BeforeCreate - GORM-specific autogenerated helpers.
type TaskORMWithAfterCreate_ ¶
type TaskORMWithAfterDelete_ ¶
type TaskWithAfterPatchSave ¶
type TaskWithAfterToORM ¶
TaskAfterToORM called after default ToORM code
type TaskWithAfterToPB ¶
TaskAfterToPB called after default ToPB code
type TaskWithBeforePatchRead ¶
type TaskWithBeforePatchSave ¶
type TaskWithBeforeToORM ¶
TaskBeforeToORM called before default ToORM code