structs

package
v0.0.0-...-75a46ef Latest Latest
Warning

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

Go to latest
Published: May 11, 2021 License: BSD-3-Clause, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckInMessage

type CheckInMessage struct {
	Action         string `json:"action"`
	IP             string `json:"ip"`
	OS             string `json:"os"`
	User           string `json:"user"`
	Host           string `json:"host"`
	Pid            int    `json:"pid"`
	UUID           string `json:"uuid"`
	Architecture   string `json:"architecture"`
	Domain         string `json:"domain"`
	IntegrityLevel int    `json:"integrity_level"`
	ExternalIP     string `json:"external_ip"`
	EncryptionKey  string `json:"encryption_key"`
	DecryptionKey  string `json:"decryption_key"`
}

Struct definition for CheckIn messages

type CheckInMessageResponse

type CheckInMessageResponse struct {
	Action string `json:"action"`
	ID     string `json:"id"`
	Status string `json:"status"`
}

type CheckInStruct

type CheckInStruct struct {
	User           string `json:"user"`
	Host           string `json:"host"`
	Pid            int    `json:"pid"`
	IP             string `json:"ip"`
	UUID           string `json:"uuid"`
	IntegrityLevel int    `json:"integrity_level"`
}

CheckInStruct used for Checkin messages to Apfell

type Defaultconfig

type Defaultconfig struct {
	KEYX          string `json:"keyx"`
	Key           string `json:"key"`
	BaseURL       string `json:"baseurl"`
	PostURI       string `json:"post_uri"`
	GetURI        string `json:"get_uri"`
	QueryPathName string `json:"query_path_name"`
	ProxyURL      string `json:"proxy_url"`
	ProxyUser     string `json:"proxy_user"`
	ProxyPass     string `json:"proxy_pass"`
	UserAgent     string `json:"useragent"`
	Sleep         int    `json:"sleep"`
	HostHeader    string `json:"hostheader"`
	Jitter        int    `json:"jitter"`
}

Defaultconfig - C2 Profile configuration for the default profile

type DirectoryEntries

type DirectoryEntries struct {
	Files        []FileData     `json:"files"`
	IsFile       bool           `json:"is_file"`
	Permissions  PermissionJSON `json:"permissions"`
	Filename     string         `json:"name"`
	ParentPath   string         `json:"parent_path"`
	Success      bool           `json:"success"`
	FileSize     int64          `json:"size"`
	LastModified string         `json:"modify_time"`
	LastAccess   string         `json:"access_time"`
}

type EkeKeyExchangeMessage

type EkeKeyExchangeMessage struct {
	Action    string `json:"action"`
	PubKey    string `json:"pub_key"`
	SessionID string `json:"session_id"`
}

type EkeKeyExchangeMessageResponse

type EkeKeyExchangeMessageResponse struct {
	Action     string `json:"action"`
	UUID       string `json:"uuid"`
	SessionKey string `json:"session_key"`
	SessionId  string `json:"session_id"`
}

type FileChunk

type FileChunk struct {
	ChunkNumber int    `json:"chunk_num"`
	ChunkData   string `json:"chunk_data"`
	FileID      string `json:"file_id"`
}

FileChunk used to send a file download chunk to apfell

type FileChunkResponse

type FileChunkResponse struct {
	Status string `json:"status"`
}

FileChunkResponse used to handle the FileChunk response from Apfell

type FileData

type FileData struct {
	IsFile       bool           `json:"is_file"`
	Permissions  PermissionJSON `json:"permissions"`
	Filename     string         `json:"name"`
	FileSize     int64          `json:"size"`
	LastModified string         `json:"modify_time"`
	LastAccess   string         `json:"access_time"`
}

type FileDownloadChunkMessage

type FileDownloadChunkMessage struct {
	ChunkNum  int    `json:"chunk_num"`
	FileID    string `json:"file_id"`
	ChunkData string `json:"chunk_data"`
	TaskID    string `json:"task_id"`
}

type FileDownloadInitialMessage

type FileDownloadInitialMessage struct {
	NumChunks    int    `json:"total_chunks"`
	TaskID       string `json:"task_id"`
	FullPath     string `json:"full_path"`
	IsScreenshot bool   `json:"is_screenshot"`
}

Struct definitions for file downloads and uploads

type FileDownloadInitialMessageResponse

type FileDownloadInitialMessageResponse struct {
	Status string `json:"status"`
	FileID string `json:"file_id"`
}

type FileRegisterRequest

type FileRegisterRequest struct {
	Chunks int    `json:"total_chunks"`
	Task   string `json:"task"`
}

FileRegisterRequest used to register a file download

type FileRegisterResponse

type FileRegisterResponse struct {
	Status string `json:"status"`
	FileID string `json:"file_id"`
}

FileRegisterResponse used for holding the response after file registration

type FileUploadChunkMessage

type FileUploadChunkMessage struct {
	Action    string `json:"action"`
	ChunkSize int    `json:"chunk_size"`
	FileID    string `json:"file_id"`
	ChunkNum  int    `json:"chunk_num"`
	FullPath  string `json:"full_path"`
	TaskID    string `json:"task_id"`
}

type FileUploadChunkMessageResponse

type FileUploadChunkMessageResponse struct {
	Action      string `json:"action"`
	TotalChunks int    `json:"total_chunks"`
	ChunkNum    int    `json:"chunk_num"`
	ChunkData   string `json:"chunk_data"`
	FileID      string `json:"file_id"`
}

type FileUploadParams

type FileUploadParams struct {
	FileID     string `json:"file_id"`
	RemotePath string `json:"remote_path"`
}

FileUploadParams - handle parameters for the file upload response

type Job

type Job struct {
	KillChannel chan (int)
	Stop        *int
	Monitoring  bool
}

func (*Job) MonitorStop

func (j *Job) MonitorStop()

MonitorStop tells the job that it needs to wait for a kill signal. The individual module is required to listen for the job.Stop variable to be > 0, and take requisite actions to tear-down.

func (*Job) SendKill

func (j *Job) SendKill()

SendKill sends a kill message to the channel.

type Message

type Message struct {
	Tag    string `json:"tag"`
	Client bool   `json:"client"`
	Data   string `json:"data"`
}

Message - struct definition for external C2 messages

type NestedApfellTaskResponse

type NestedApfellTaskResponse struct {
	Status    string `json:"status"`
	Timestamp string `json:"timestamp"`
	Command   string `json:"command"`
	Params    string `json:"params"`
	AttackID  int    `json:"attack_id"`
	Callback  int    `json:"callback"`
	Operator  string `json:"operator"`
}

NestedApfellTaskResponse used to hold the task response field

type PermissionJSON

type PermissionJSON struct {
	Permissions string `json:"permissions"`
}

type Response

type Response struct {
	TaskID       string           `json:"task_id"`
	UserOutput   string           `json:"user_output"`
	Completed    bool             `json:"completed"`
	Status       string           `json:"status"`
	FileBrowser  DirectoryEntries `json:"file_browser"`
	RemovedFiles []RmFiles        `json:"removed_files,omitempty"`
}

type RmFiles

type RmFiles struct {
	Path string `json:"path"`
	Host string `json:"host"`
}

type ServerResponse

type ServerResponse struct {
	TaskID string `json:"uuid"`
	Status string `json:"status"`
	Error  string `json:"error"`
}

type Slackconfig

type Slackconfig struct {
	KEYX      string `json:"keyx"`
	Key       string `json:"key"`
	Sleep     int    `json:"sleep"`
	Jitter    int    `json:"jitter"`
	ApiKey    string `json:"apikey"`
	ChannelID string `json:"channelid"`
}

Slackconfig - C2 Profile configuration for the slack profile

type SocksMsg

type SocksMsg struct {
	ServerId int32  `json:"server_id"`
	Data     string `json:"data"`
}

Struct for dealing with Socks messages

type Task

type Task struct {
	Command   string  `json:"command"`
	Params    string  `json:"parameters"`
	Timestamp float64 `json:"timestamp"`
	TaskID    string  `json:"id"`
	Job       *Job
}

func (*Task) ToStub

func (t *Task) ToStub() TaskStub

ToStub converts a Task item to a TaskStub that's easily transportable between client and server.

type TaskRequestMessage

type TaskRequestMessage struct {
	Action      string             `json:"action"`
	TaskingSize int                `json:"tasking_size"`
	Delegates   []*json.RawMessage `json:"delegates"`
}

type TaskRequestMessageResponse

type TaskRequestMessageResponse struct {
	Action    string             `json:"action"`
	Tasks     []Task             `json:"tasks"`
	Delegates []*json.RawMessage `json:"delegates"`
	Socks     []SocksMsg         `json:"socks"`
}

type TaskResponseMessage

type TaskResponseMessage struct {
	Action    string            `json:"action"`
	Responses []json.RawMessage `json:"responses"`
	Delegates []json.RawMessage `json:"delegates"`
	Socks     []SocksMsg        `json:"socks"`
}

Struct definitions for TaskResponse Messages

type TaskResponseMessageResponse

type TaskResponseMessageResponse struct {
	Action    string            `json:"action"`
	Responses []json.RawMessage `json:"responses"`
	Delegates []json.RawMessage `json:"delegates"`
}

type TaskStub

type TaskStub struct {
	Command string `json:"command"`
	Params  string `json:"params"`
	ID      string `json:"id"`
}

TaskStub to post list of currently processing tasks.

type ThreadMsg

type ThreadMsg struct {
	TaskItem   Task
	TaskResult []byte
	Error      bool
	Completed  bool
}

ThreadMsg used to send task results back to the receiving channel

type UserOutput

type UserOutput struct {
	Output []byte `json:"user_output"`
}

type Websocketconfig

type Websocketconfig struct {
	KEYX       string `json:"keyx"`
	Key        string `json:"key"`
	BaseURL    string `json:"baseurl"`
	UserAgent  string `json:"useragent"`
	Sleep      int    `json:"sleep"`
	HostHeader string `json:"hostheader"`
	Jitter     int    `json:"jitter"`
	Endpoint   string `json:"endpoint"`
}

Websocketconfig - C2 Profile configuration for the websocket profile

Jump to

Keyboard shortcuts

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