loggingstructs

package
v1.0.0-rc12 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOG_TYPE_CALLBACK   LOG_TYPE = "new_callback"
	LOG_TYPE_CREDENTIAL          = "new_credential"
	LOG_TYPE_ARTIFACT            = "new_artifact"
	LOG_TYPE_TASK                = "new_task"
	LOG_TYPE_FILE                = "new_file"
	LOG_TYPE_PAYLOAD             = "new_payload"
	LOG_TYPE_KEYLOG              = "new_keylog"
)
View Source
const EMIT_LOG_ROUTING_KEY_PREFIX = "emit_log"

Variables

View Source
var (
	AllLoggingData containerLoggingData
)

Functions

func GetRoutingKeyFor

func GetRoutingKeyFor(logType string) string

Types

type LOG_TYPE

type LOG_TYPE = string

type LoggingDefinition

type LoggingDefinition struct {
	LogToFilePath         string
	LogLevel              string
	LogMaxSizeInMB        int
	LogMaxBackups         int
	NewCallbackFunction   func(input NewCallbackLog)
	NewCredentialFunction func(input NewCredentialLog)
	NewKeylogFunction     func(input NewKeylogLog)
	NewFileFunction       func(input NewFileLog)
	NewPayloadFunction    func(input NewPayloadLog)
	NewArtifactFunction   func(input NewArtifactLog)
	NewTaskFunction       func(input NewTaskLog)
}

type NewArtifactLog

type NewArtifactLog struct {
	Data NewArtifactLogData `json:"data"`
	// contains filtered or unexported fields
}

type NewArtifactLogData

type NewArtifactLogData struct {
	ID           int       `json:"id"`
	TaskID       *int      `json:"task_id,omitempty"`
	Timestamp    time.Time `json:"timestamp"`
	Artifact     []byte    `json:"artifact"`
	BaseArtifact string    `json:"base_artifact"`
	OperationID  int       `json:"operation_id"`
	Host         string    `json:"host"`
}

type NewCallbackLog

type NewCallbackLog struct {
	Data NewCallbackLogData `json:"data"`
	// contains filtered or unexported fields
}

type NewCallbackLogData

type NewCallbackLogData struct {
	ID                  int       `db:"id" json:"id"`
	DisplayID           int       `db:"display_id" json:"display_id"`
	AgentCallbackID     string    `db:"agent_callback_id" json:"agent_callback_id"`
	InitCallback        time.Time `db:"init_callback" json:"init_callback"`
	LastCheckin         time.Time `db:"last_checkin" json:"last_checkin"`
	User                string    `db:"user" json:"user"`
	Host                string    `db:"host" json:"host"`
	PID                 int       `db:"pid" json:"pid"`
	Ip                  string    `db:"ip" json:"ip"`
	ExternalIp          string    `db:"external_ip" json:"external_ip"`
	ProcessName         string    `db:"process_name" json:"process_name"`
	Description         string    `db:"description" json:"description"`
	OperatorID          int       `db:"operator_id" json:"operator_id"`
	Active              bool      `db:"active" json:"active"`
	RegisteredPayloadID int       `db:"registered_payload_id" json:"registered_payload_id"`
	IntegrityLevel      int       `db:"integrity_level" json:"integrity_level"`
	Locked              bool      `db:"locked" json:"locked"`
	LockedOperatorID    *int      `db:"locked_operator_id" json:"locked_operator_id"`
	OperationID         int       `db:"operation_id" json:"operation_id"`
	CryptoType          string    `db:"crypto_type" json:"crypto_type"`
	DecKey              *[]byte   `db:"dec_key" json:"dec_key"`
	EncKey              *[]byte   `db:"enc_key" json:"enc_key"`
	Os                  string    `db:"os" json:"os"`
	Architecture        string    `db:"architecture" json:"architecture"`
	Domain              string    `db:"domain" json:"domain"`
	ExtraInfo           string    `db:"extra_info" json:"extra_info"`
	SleepInfo           string    `db:"sleep_info" json:"sleep_info"`
	Timestamp           time.Time `db:"timestamp" json:"timestamp"`
}

type NewCredentialLog

type NewCredentialLog struct {
	Data NewCredentialLogData `json:"data"`
	// contains filtered or unexported fields
}

type NewCredentialLogData

type NewCredentialLogData struct {
	ID          int       `json:"id"`
	Type        string    `json:"type"`
	TaskID      *int      `json:"task_id"`
	Account     string    `json:"account"`
	Realm       string    `json:"realm"`
	OperationID int       `json:"operation_id"`
	Timestamp   time.Time `json:"timestamp"`
	Credential  string    `json:"credential"`
	OperatorID  int       `json:"operator_id"`
	Comment     string    `json:"comment"`
	Deleted     bool      `json:"deleted"`
	Metadata    string    `json:"metadata"`
}

type NewFileData

type NewFileData struct {
	ID                  int       `db:"id" json:"id" mapstructure:"id"`
	AgentFileID         string    `db:"agent_file_id" json:"agent_file_id" mapstructure:"agent_file_id"`
	TotalChunks         int       `db:"total_chunks" json:"total_chunks" mapstructure:"total_chunks"`
	ChunksReceived      int       `db:"chunks_received" json:"chunks_received" mapstructure:"chunks_received"`
	ChunkSize           int       `db:"chunk_size" json:"chunk_size" mapstructure:"chunk_size"`
	TaskID              *int      `db:"task_id" json:"task_id" mapstructure:"task_id"`
	Complete            bool      `db:"complete" json:"complete" mapstructure:"complete"`
	Path                string    `db:"path" json:"path" mapstructure:"path"`
	FullRemotePath      []byte    `db:"full_remote_path" json:"full_remote_path" mapstructure:"full_remote_path"`
	Host                string    `db:"host" json:"host" mapstructure:"host"`
	IsPayload           bool      `db:"is_payload" json:"is_payload" mapstructure:"is_payload"`
	IsScreenshot        bool      `db:"is_screenshot" json:"is_screenshot" mapstructure:"is_screenshot"`
	IsDownloadFromAgent bool      `db:"is_download_from_agent" json:"is_download_from_agent" mapstructure:"is_download_from_agent"`
	MythicTreeID        *int      `db:"mythictree_id" json:"mythictree_id" mapstructure:"mythictree_id"`
	Filename            []byte    `db:"filename" json:"filename" mapstructure:"filename"`
	DeleteAfterFetch    bool      `db:"delete_after_fetch" json:"delete_after_fetch" mapstructure:"delete_after_fetch"`
	OperationID         int       `db:"operation_id" json:"operation_id" mapstructure:"operation_id"`
	Timestamp           time.Time `db:"timestamp" json:"timestamp" mapstructure:"timestamp"`
	Deleted             bool      `db:"deleted" json:"deleted" mapstructure:"deleted"`
	OperatorID          int       `db:"operator_id" json:"operator_id" mapstructure:"operator_id"`
	Md5                 string    `db:"md5" json:"md5" mapstructure:"md5"`
	Sha1                string    `db:"sha1" json:"sha1" mapstructure:"sha1"`
	Comment             string    `db:"comment" json:"comment" mapstructure:"comment"`
}

type NewFileLog

type NewFileLog struct {
	Data NewFileData `json:"data"`
	// contains filtered or unexported fields
}

type NewKeylogLog

type NewKeylogLog struct {
	Data NewKeylogLogData `json:"data"`
	// contains filtered or unexported fields
}

type NewKeylogLogData

type NewKeylogLogData struct {
	ID          int       `json:"id" mapstructure:"id"`
	TaskID      int       `json:"task_id" mapstructure:"task_id"`
	Keystrokes  []byte    `json:"keystrokes" mapstructure:"keystrokes"`
	Window      string    `json:"window" mapstructure:"window"`
	Timestamp   time.Time `json:"timestamp" mapstructure:"timestamp"`
	OperationID int       `json:"operation_id" mapstructure:"operation_id"`
	User        string    `json:"user" mapstructure:"user"`
}

type NewPayloadLog

type NewPayloadLog struct {
	Data NewPayloadLogData `json:"data"`
	// contains filtered or unexported fields
}

type NewPayloadLogData

type NewPayloadLogData struct {
	ID               int       `json:"id"`
	UUID             string    `json:"uuid"`
	Description      string    `json:"description"`
	OperatorID       int       `json:"operator_id"`
	CreationTime     time.Time `json:"creation_time"`
	PayloadTypeID    int       `json:"payload_type_id"`
	OperationID      int       `json:"operation_id"`
	WrappedPayloadID *int      `json:"wrapped_payload_id"`
	Deleted          bool      `json:"deleted"`
	BuildContainer   string    `json:"build_container"`
	BuildPhase       string    `json:"build_phase"`
	BuildMessage     string    `json:"build_message"`
	BuildStderr      string    `json:"build_stderr"`
	BuildStdout      string    `json:"build_stdout"`
	CallbackAlert    bool      `json:"callback_alert"`
	AutoGenerated    bool      `json:"auto_generated"`
	OS               string    `json:"os"`
	TaskID           *int      `json:"task_id"`
	FileID           *int      `json:"file_id"`
	Timestamp        time.Time `json:"timestamp"`
}

type NewTaskLog

type NewTaskLog struct {
	Data NewTaskLogData `json:"data"`
	// contains filtered or unexported fields
}

type RabbitmqDirectMethod

type RabbitmqDirectMethod struct {
	RabbitmqRoutingKey         string
	RabbitmqProcessingFunction func([]byte)
}

type RabbitmqRPCMethod

type RabbitmqRPCMethod struct {
	RabbitmqRoutingKey         string
	RabbitmqProcessingFunction func([]byte) interface{}
}

Jump to

Keyboard shortcuts

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