Documentation ¶
Index ¶
- Variables
- func RegisterC2Server(s grpc.ServiceRegistrar, srv C2Server)
- type Agent
- type Beacon
- func (*Beacon) Descriptor() ([]byte, []int)deprecated
- func (x *Beacon) GetAgent() *Agent
- func (x *Beacon) GetHost() *Host
- func (x *Beacon) GetIdentifier() string
- func (x *Beacon) GetInterval() uint64
- func (x *Beacon) GetPrincipal() string
- func (*Beacon) ProtoMessage()
- func (x *Beacon) ProtoReflect() protoreflect.Message
- func (x *Beacon) Reset()
- func (x *Beacon) String() string
- type C2Client
- type C2Server
- type ClaimTasksRequest
- type ClaimTasksResponse
- func (*ClaimTasksResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ClaimTasksResponse) GetTasks() []*Task
- func (*ClaimTasksResponse) ProtoMessage()
- func (x *ClaimTasksResponse) ProtoReflect() protoreflect.Message
- func (x *ClaimTasksResponse) Reset()
- func (x *ClaimTasksResponse) String() string
- type Host
- func (*Host) Descriptor() ([]byte, []int)deprecated
- func (x *Host) GetIdentifier() string
- func (x *Host) GetName() string
- func (x *Host) GetPlatform() Host_Platform
- func (x *Host) GetPrimaryIp() string
- func (*Host) ProtoMessage()
- func (x *Host) ProtoReflect() protoreflect.Message
- func (x *Host) Reset()
- func (x *Host) String() string
- type Host_Platform
- func (Host_Platform) Descriptor() protoreflect.EnumDescriptor
- func (x Host_Platform) Enum() *Host_Platform
- func (Host_Platform) EnumDescriptor() ([]byte, []int)deprecated
- func (x Host_Platform) Number() protoreflect.EnumNumber
- func (x Host_Platform) String() string
- func (Host_Platform) Type() protoreflect.EnumType
- type ReportTaskOutputRequest
- func (*ReportTaskOutputRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReportTaskOutputRequest) GetOutput() *TaskOutput
- func (*ReportTaskOutputRequest) ProtoMessage()
- func (x *ReportTaskOutputRequest) ProtoReflect() protoreflect.Message
- func (x *ReportTaskOutputRequest) Reset()
- func (x *ReportTaskOutputRequest) String() string
- type ReportTaskOutputResponse
- type Task
- type TaskError
- type TaskOutput
- func (*TaskOutput) Descriptor() ([]byte, []int)deprecated
- func (x *TaskOutput) GetError() *TaskError
- func (x *TaskOutput) GetExecFinishedAt() *timestamp.Timestamp
- func (x *TaskOutput) GetExecStartedAt() *timestamp.Timestamp
- func (x *TaskOutput) GetId() int64
- func (x *TaskOutput) GetOutput() string
- func (*TaskOutput) ProtoMessage()
- func (x *TaskOutput) ProtoReflect() protoreflect.Message
- func (x *TaskOutput) Reset()
- func (x *TaskOutput) String() string
- type UnimplementedC2Server
- type UnsafeC2Server
Constants ¶
This section is empty.
Variables ¶
var ( Host_Platform_name = map[int32]string{ 0: "PLATFORM_UNSPECIFIED", 1: "PLATFORM_WINDOWS", 2: "PLATFORM_LINUX", 3: "PLATFORM_MACOS", 4: "PLATFORM_BSD", } Host_Platform_value = map[string]int32{ "PLATFORM_UNSPECIFIED": 0, "PLATFORM_WINDOWS": 1, "PLATFORM_LINUX": 2, "PLATFORM_MACOS": 3, "PLATFORM_BSD": 4, } )
Enum value maps for Host_Platform.
var C2_ServiceDesc = grpc.ServiceDesc{ ServiceName: "c2.C2", HandlerType: (*C2Server)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ClaimTasks", Handler: _C2_ClaimTasks_Handler, }, { MethodName: "ReportTaskOutput", Handler: _C2_ReportTaskOutput_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "c2.proto", }
C2_ServiceDesc is the grpc.ServiceDesc for C2 service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_c2_proto protoreflect.FileDescriptor
Functions ¶
func RegisterC2Server ¶
func RegisterC2Server(s grpc.ServiceRegistrar, srv C2Server)
Types ¶
type Agent ¶
type Agent struct { Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` // contains filtered or unexported fields }
Agent information to identify the type of beacon.
func (*Agent) Descriptor
deprecated
func (*Agent) GetIdentifier ¶
func (*Agent) ProtoMessage ¶
func (*Agent) ProtoMessage()
func (*Agent) ProtoReflect ¶
func (x *Agent) ProtoReflect() protoreflect.Message
type Beacon ¶
type Beacon struct { Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` Principal string `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"` Host *Host `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"` Agent *Agent `protobuf:"bytes,4,opt,name=agent,proto3" json:"agent,omitempty"` Interval uint64 `protobuf:"varint,5,opt,name=interval,proto3" json:"interval,omitempty"` // Duration until next callback, in seconds. // contains filtered or unexported fields }
Beacon information that is unique to the current running beacon.
func (*Beacon) Descriptor
deprecated
func (*Beacon) GetIdentifier ¶
func (*Beacon) GetInterval ¶
func (*Beacon) GetPrincipal ¶
func (*Beacon) ProtoMessage ¶
func (*Beacon) ProtoMessage()
func (*Beacon) ProtoReflect ¶
func (x *Beacon) ProtoReflect() protoreflect.Message
type C2Client ¶
type C2Client interface { ClaimTasks(ctx context.Context, in *ClaimTasksRequest, opts ...grpc.CallOption) (*ClaimTasksResponse, error) ReportTaskOutput(ctx context.Context, in *ReportTaskOutputRequest, opts ...grpc.CallOption) (*ReportTaskOutputResponse, error) }
C2Client is the client API for C2 service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewC2Client ¶
func NewC2Client(cc grpc.ClientConnInterface) C2Client
type C2Server ¶
type C2Server interface { ClaimTasks(context.Context, *ClaimTasksRequest) (*ClaimTasksResponse, error) ReportTaskOutput(context.Context, *ReportTaskOutputRequest) (*ReportTaskOutputResponse, error) // contains filtered or unexported methods }
C2Server is the server API for C2 service. All implementations must embed UnimplementedC2Server for forward compatibility
type ClaimTasksRequest ¶
type ClaimTasksRequest struct { Beacon *Beacon `protobuf:"bytes,1,opt,name=beacon,proto3" json:"beacon,omitempty"` // contains filtered or unexported fields }
RPC Messages
func (*ClaimTasksRequest) Descriptor
deprecated
func (*ClaimTasksRequest) Descriptor() ([]byte, []int)
Deprecated: Use ClaimTasksRequest.ProtoReflect.Descriptor instead.
func (*ClaimTasksRequest) GetBeacon ¶
func (x *ClaimTasksRequest) GetBeacon() *Beacon
func (*ClaimTasksRequest) ProtoMessage ¶
func (*ClaimTasksRequest) ProtoMessage()
func (*ClaimTasksRequest) ProtoReflect ¶
func (x *ClaimTasksRequest) ProtoReflect() protoreflect.Message
func (*ClaimTasksRequest) Reset ¶
func (x *ClaimTasksRequest) Reset()
func (*ClaimTasksRequest) String ¶
func (x *ClaimTasksRequest) String() string
type ClaimTasksResponse ¶
type ClaimTasksResponse struct { Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` // contains filtered or unexported fields }
func (*ClaimTasksResponse) Descriptor
deprecated
func (*ClaimTasksResponse) Descriptor() ([]byte, []int)
Deprecated: Use ClaimTasksResponse.ProtoReflect.Descriptor instead.
func (*ClaimTasksResponse) GetTasks ¶
func (x *ClaimTasksResponse) GetTasks() []*Task
func (*ClaimTasksResponse) ProtoMessage ¶
func (*ClaimTasksResponse) ProtoMessage()
func (*ClaimTasksResponse) ProtoReflect ¶
func (x *ClaimTasksResponse) ProtoReflect() protoreflect.Message
func (*ClaimTasksResponse) Reset ¶
func (x *ClaimTasksResponse) Reset()
func (*ClaimTasksResponse) String ¶
func (x *ClaimTasksResponse) String() string
type Host ¶
type Host struct { Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Platform Host_Platform `protobuf:"varint,3,opt,name=platform,proto3,enum=c2.Host_Platform" json:"platform,omitempty"` PrimaryIp string `protobuf:"bytes,4,opt,name=primary_ip,json=primaryIp,proto3" json:"primary_ip,omitempty"` // contains filtered or unexported fields }
Host information for the system a beacon is running on.
func (*Host) Descriptor
deprecated
func (*Host) GetIdentifier ¶
func (*Host) GetPlatform ¶
func (x *Host) GetPlatform() Host_Platform
func (*Host) GetPrimaryIp ¶
func (*Host) ProtoMessage ¶
func (*Host) ProtoMessage()
func (*Host) ProtoReflect ¶
func (x *Host) ProtoReflect() protoreflect.Message
type Host_Platform ¶
type Host_Platform int32
const ( Host_PLATFORM_UNSPECIFIED Host_Platform = 0 Host_PLATFORM_WINDOWS Host_Platform = 1 Host_PLATFORM_LINUX Host_Platform = 2 Host_PLATFORM_MACOS Host_Platform = 3 Host_PLATFORM_BSD Host_Platform = 4 )
func (Host_Platform) Descriptor ¶
func (Host_Platform) Descriptor() protoreflect.EnumDescriptor
func (Host_Platform) Enum ¶
func (x Host_Platform) Enum() *Host_Platform
func (Host_Platform) EnumDescriptor
deprecated
func (Host_Platform) EnumDescriptor() ([]byte, []int)
Deprecated: Use Host_Platform.Descriptor instead.
func (Host_Platform) Number ¶
func (x Host_Platform) Number() protoreflect.EnumNumber
func (Host_Platform) String ¶
func (x Host_Platform) String() string
func (Host_Platform) Type ¶
func (Host_Platform) Type() protoreflect.EnumType
type ReportTaskOutputRequest ¶
type ReportTaskOutputRequest struct { Output *TaskOutput `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"` // contains filtered or unexported fields }
func (*ReportTaskOutputRequest) Descriptor
deprecated
func (*ReportTaskOutputRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReportTaskOutputRequest.ProtoReflect.Descriptor instead.
func (*ReportTaskOutputRequest) GetOutput ¶
func (x *ReportTaskOutputRequest) GetOutput() *TaskOutput
func (*ReportTaskOutputRequest) ProtoMessage ¶
func (*ReportTaskOutputRequest) ProtoMessage()
func (*ReportTaskOutputRequest) ProtoReflect ¶
func (x *ReportTaskOutputRequest) ProtoReflect() protoreflect.Message
func (*ReportTaskOutputRequest) Reset ¶
func (x *ReportTaskOutputRequest) Reset()
func (*ReportTaskOutputRequest) String ¶
func (x *ReportTaskOutputRequest) String() string
type ReportTaskOutputResponse ¶
type ReportTaskOutputResponse struct {
// contains filtered or unexported fields
}
func (*ReportTaskOutputResponse) Descriptor
deprecated
func (*ReportTaskOutputResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReportTaskOutputResponse.ProtoReflect.Descriptor instead.
func (*ReportTaskOutputResponse) ProtoMessage ¶
func (*ReportTaskOutputResponse) ProtoMessage()
func (*ReportTaskOutputResponse) ProtoReflect ¶
func (x *ReportTaskOutputResponse) ProtoReflect() protoreflect.Message
func (*ReportTaskOutputResponse) Reset ¶
func (x *ReportTaskOutputResponse) Reset()
func (*ReportTaskOutputResponse) String ¶
func (x *ReportTaskOutputResponse) String() string
type Task ¶
type Task struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Eldritch string `protobuf:"bytes,2,opt,name=eldritch,proto3" json:"eldritch,omitempty"` Parameters map[string]string `` /* 161-byte string literal not displayed */ // contains filtered or unexported fields }
Task instructions for the beacon to execute.
func (*Task) Descriptor
deprecated
func (*Task) GetEldritch ¶
func (*Task) GetParameters ¶
func (*Task) ProtoMessage ¶
func (*Task) ProtoMessage()
func (*Task) ProtoReflect ¶
func (x *Task) ProtoReflect() protoreflect.Message
type TaskError ¶
type TaskError struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
TaskError provides information when task execution fails.
func (*TaskError) Descriptor
deprecated
func (*TaskError) ProtoMessage ¶
func (*TaskError) ProtoMessage()
func (*TaskError) ProtoReflect ¶
func (x *TaskError) ProtoReflect() protoreflect.Message
type TaskOutput ¶
type TaskOutput struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Output string `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` Error *TaskError `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` // Indicates the UTC timestamp task execution began, set only in the first message for reporting. ExecStartedAt *timestamp.Timestamp `protobuf:"bytes,4,opt,name=exec_started_at,json=execStartedAt,proto3" json:"exec_started_at,omitempty"` // Indicates the UTC timestamp task execution completed, set only in last message for reporting. ExecFinishedAt *timestamp.Timestamp `protobuf:"bytes,5,opt,name=exec_finished_at,json=execFinishedAt,proto3" json:"exec_finished_at,omitempty"` // contains filtered or unexported fields }
TaskOutput provides information about a running task.
func (*TaskOutput) Descriptor
deprecated
func (*TaskOutput) Descriptor() ([]byte, []int)
Deprecated: Use TaskOutput.ProtoReflect.Descriptor instead.
func (*TaskOutput) GetError ¶
func (x *TaskOutput) GetError() *TaskError
func (*TaskOutput) GetExecFinishedAt ¶
func (x *TaskOutput) GetExecFinishedAt() *timestamp.Timestamp
func (*TaskOutput) GetExecStartedAt ¶
func (x *TaskOutput) GetExecStartedAt() *timestamp.Timestamp
func (*TaskOutput) GetId ¶
func (x *TaskOutput) GetId() int64
func (*TaskOutput) GetOutput ¶
func (x *TaskOutput) GetOutput() string
func (*TaskOutput) ProtoMessage ¶
func (*TaskOutput) ProtoMessage()
func (*TaskOutput) ProtoReflect ¶
func (x *TaskOutput) ProtoReflect() protoreflect.Message
func (*TaskOutput) Reset ¶
func (x *TaskOutput) Reset()
func (*TaskOutput) String ¶
func (x *TaskOutput) String() string
type UnimplementedC2Server ¶
type UnimplementedC2Server struct { }
UnimplementedC2Server must be embedded to have forward compatible implementations.
func (UnimplementedC2Server) ClaimTasks ¶
func (UnimplementedC2Server) ClaimTasks(context.Context, *ClaimTasksRequest) (*ClaimTasksResponse, error)
func (UnimplementedC2Server) ReportTaskOutput ¶
func (UnimplementedC2Server) ReportTaskOutput(context.Context, *ReportTaskOutputRequest) (*ReportTaskOutputResponse, error)
type UnsafeC2Server ¶
type UnsafeC2Server interface {
// contains filtered or unexported methods
}
UnsafeC2Server may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to C2Server will result in compilation errors.