mythicrpc

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: BSD-3-Clause Imports: 6 Imported by: 1 module, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalyzedPath added in v1.4.0

type AnalyzedPath struct {
	PathPieces    []string `json:"path_pieces"`
	PathSeparator string   `json:"path_separator"`
	Host          string   `json:"host"`
}

type FileData

type FileData struct {
	AgentFileID         string    `json:"agent_file_id"`
	Filename            string    `json:"filename"`
	Comment             string    `json:"comment"`
	Complete            bool      `json:"complete"`
	IsPayload           bool      `json:"is_payload"`
	IsDownloadFromAgent bool      `json:"is_download_from_agent"`
	IsScreenshot        bool      `json:"is_screenshot"`
	FullRemotePath      string    `json:"full_remote_path"`
	Host                string    `json:"host"`
	TaskID              int       `json:"task_id"`
	Md5                 string    `json:"md5"`
	Sha1                string    `json:"sha1"`
	Timestamp           time.Time `json:"timestamp"`
	Command             string    `json:"cmd"`
	Tags                []string  `json:"tags"`
}

type MESSAGE_LEVEL

type MESSAGE_LEVEL = string
const (
	MESSAGE_LEVEL_INFO          MESSAGE_LEVEL = "info"
	MESSAGE_LEVEL_DEBUG         MESSAGE_LEVEL = "debug"
	MESSAGE_LEVEL_AUTH          MESSAGE_LEVEL = "auth"
	MESSAGE_LEVEL_AGENT_MESSAGE MESSAGE_LEVEL = "agent"
	MESSAGE_LEVEL_API           MESSAGE_LEVEL = "api"
)

type MythicRPCAPITokenCreateMessage added in v1.4.0

type MythicRPCAPITokenCreateMessage struct {
	AgentTaskID     *string `json:"agent_task_id"`
	AgentCallbackID *string `json:"agent_callback_id"`
	PayloadUUID     *string `json:"payload_uuid"`
	OperationID     *int    `json:"operation_id"`
}

MythicRPCAPITokenCreateMessage needs at least one parameter to generate an appropriate apitoken, the rest are unnecessary

type MythicRPCAPITokenCreateMessageResponse added in v1.4.0

type MythicRPCAPITokenCreateMessageResponse struct {
	Success  bool   `json:"success"`
	Error    string `json:"error"`
	APIToken string `json:"apitoken"`
}

Every mythicRPC function call must return a response that includes the following two values

func SendMythicRPCAPITokenCreate added in v1.4.0

type MythicRPCAgentstorageCreateMessage

type MythicRPCAgentstorageCreateMessage struct {
	// UniqueID (Required) - a unique identifier for this entry provided by you, the dev
	UniqueID string `json:"unique_id"`
	// DataToStore (Required) - the data you want to store as bytes
	DataToStore []byte `json:"data"`
}

type MythicRPCAgentstorageCreateMessageResponse

type MythicRPCAgentstorageCreateMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

func SendMythicRPCAgentStorageCreate

SendMythicRPCAgentStorageCreate - Create a new entry in the agentstorage table within Mythic. This can be used to store arbitrary data that the agent/c2 profile might need later on and used a way to share data.

type MythicRPCAgentstorageRemoveMessage

type MythicRPCAgentstorageRemoveMessage struct {
	// UniqueID (Required) - The unique identifier to search for in the database to remove
	UniqueID string `json:"unique_id"`
}

type MythicRPCAgentstorageRemoveMessageResponse

type MythicRPCAgentstorageRemoveMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

func SendMythicRPCAgentStorageRemove

SendMythicRPCAgentStorageRemove - Remove a specific entry from the agentstorage table within Mythic.

type MythicRPCAgentstorageSearchMessage

type MythicRPCAgentstorageSearchMessage struct {
	// SearchUniqueID (Required) - The unique identifier you supplied when creating the data that you're searching for
	SearchUniqueID string `json:"unique_id"` // required
}

type MythicRPCAgentstorageSearchMessageResponse

type MythicRPCAgentstorageSearchMessageResponse struct {
	Success              bool                                `json:"success"`
	Error                string                              `json:"error"`
	AgentStorageMessages []MythicRPCAgentstorageSearchResult `json:"agentstorage_messages"`
}

func SendMythicRPCAgentStorageSearch

SendMythicRPCAgentStorageSearch - Search for a specific entry within the agentstorage table and fetch the results.

type MythicRPCAgentstorageSearchResult

type MythicRPCAgentstorageSearchResult struct {
	UniqueID string `json:"unique_id"`
	Data     []byte `json:"data"`
}

type MythicRPCArtifactCreateMessage

type MythicRPCArtifactCreateMessage struct {
	// TaskID (Required) - the task associated with this new artifact for Mythic to track
	TaskID int `json:"task_id"`
	// ArtifactMessage (Required) - the actual artifact string you want to store
	ArtifactMessage string `json:"message"`
	// BaseArtifactType (Required) - what kind of artifact is it? Process Create? File Removal? etc
	BaseArtifactType string `json:"base_artifact"`
	// ArtifactHost (Optional) - what's the hostname for where this artifact happened? If none is specified, it's assumed to be the same host where the task ran
	ArtifactHost *string `json:"host,omitempty"`
}

type MythicRPCArtifactCreateMessageResponse

type MythicRPCArtifactCreateMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

func SendMythicRPCArtifactCreate

SendMythicRPCArtifactCreate - Create a new artifact for Mythic to track.

type MythicRPCArtifactSearchMessage

type MythicRPCArtifactSearchMessage struct {
	// TaskID (Required) - What is the current task that's searching for artifact information.
	TaskID int `json:"task_id"`
	// SearchArtifacts (Required) - Additional structure of data used to search artifacts.
	SearchArtifacts MythicRPCArtifactearchArtifactData `json:"artifact"`
}

type MythicRPCArtifactSearchMessageResponse

type MythicRPCArtifactSearchMessageResponse struct {
	Success   bool                                 `json:"success"`
	Error     string                               `json:"error"`
	Artifacts []MythicRPCArtifactearchArtifactData `json:"artifacts"`
}

func SendMythicRPCArtifactSearch

SendMythicRPCArtifactSearch - Search for artifacts that are tracked by Mythic.

type MythicRPCArtifactearchArtifactData

type MythicRPCArtifactearchArtifactData struct {
	// Host (Optional) - When searching, you can filter your artifacts by the hostname.
	// As a response, this will always be populated.
	Host *string `json:"host" ` // optional
	// ArtifactType (Optional) - When searching, you can filter your artifacts by the type of artifact.
	// As a response, this will always be populated.
	ArtifactType *string `json:"artifact_type"` //optional
	// ArtifactMessage (Optional) - When searching, you can filter your artifacts by what the message contains.
	// As a response, this will always be populated.
	ArtifactMessage *string `json:"artifact_message"` //optional
	// TaskID (Optional) - When searching, you can filter your artifacts to those created by a certain task.
	// As a response, this will always be populated.
	TaskID *int `json:"task_id"` //optional
}

type MythicRPCC2UpdateStatusMessage added in v1.4.6

type MythicRPCC2UpdateStatusMessage struct {
	C2Profile             string `json:"c2_profile"`     // required
	InternalServerRunning bool   `json:"server_running"` // required
	Error                 string `json:"error"`
}

type MythicRPCC2UpdateStatusMessageResponse added in v1.4.6

type MythicRPCC2UpdateStatusMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

func SendMythicRPCC2UpdateStatus added in v1.4.6

SendMythicRPCCallbackCreate - Register a new callback within Mythic

type MythicRPCCallbackAddCommandMessage

type MythicRPCCallbackAddCommandMessage struct {
	// TaskID - What task is trying to add commands. This will add commands to the callback associated with this task.
	TaskID int `json:"task_id"` // required
	// AgentCallbackID - Agent Callback UUID of callback to add commands to if TaskID isn't specified
	AgentCallbackID string `json:"agent_callback_id"`
	// PayloadType - The payload type of the associated commands to load if they're for a payload type (or command augment) container other than the one for the callback
	PayloadType string `json:"payload_type"`
	// Commands (Required) - The names of the commands you want to add. If they're already added, then they are skipped.
	Commands []string `json:"commands"` // required
	// CallbackIDs allows you to specify a list of CallbackID values to add commands to multiple callbacks at once
	CallbackIDs []int `json:"callback_ids"`
}

type MythicRPCCallbackAddCommandMessageResponse

type MythicRPCCallbackAddCommandMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

func SendMythicRPCCallbackAddCommand

SendMythicRPCCallbackAddCommand - Register new commands as being "loaded" into the current callback. This makes them available for tasking through the UI.

type MythicRPCCallbackCreateMessage

type MythicRPCCallbackCreateMessage struct {
	// PayloadUUID (Required) - What is the UUID of the payload that this new callback will be based on
	PayloadUUID string `json:"payload_uuid"`
	// C2ProfileName (Required) - What is the name of the C2 Profile that this agent is communicating over.
	C2ProfileName string `json:"c2_profile"`
	// EncryptionKey (Optional) - Specify a custom encryption key for use with this callback instead of the
	// C2 profile/Payload's encryption keys.
	EncryptionKey *[]byte `json:"encryption_key"`
	// DecryptionKey (Optional) - Specify a custom decryption key for use with this callback instead of the
	// C2 profile/Payload's decryption keys
	DecryptionKey *[]byte `json:"decryption_key"`
	// CryptoType (Optional) - What kind of crypto is being used? aes256_hmac? none? something else?
	CryptoType string `json:"crypto_type"`
	// User (Optional) - What is the username associated with this new callback
	User string `json:"user"`
	// Host (Optional) - What is the hostname associated with this new callback
	Host string `json:"host"`
	// PID (Optional) - What is the PID associated with this new callback
	PID int `json:"pid"`
	// ExtraInfo (Optional) - Additional information you can store with the callback for context or tracking
	ExtraInfo string `json:"extra_info"`
	// SleepInfo (Optional) - Additional context information about the current sleep data for this callback
	SleepInfo string `json:"sleep_info"`
	// Ip (Optional) - The IP associated with this callback. Use this if you just want to set a single IP address for the callback.
	Ip string `json:"ip"`
	// IPs (Optional) - The array of IP addresses associated with this callback. Use this if you have multiple IP addresses
	// for the callback and want to return them all for the operator to view
	IPs []string `json:"ips"`
	// ExternalIP (Optional) - The external IP address associated with this callback
	ExternalIP string `json:"external_ip"`
	// IntegrityLevel (Optional) - The integrity level associated with the callback.
	// 0 is Unknown, 1 is Low integrity, 2 is Medium integrity, 3 is High integrity, 4 is SYSTEM integrity.
	// 3 and above will result in a red interact button (if you're root, you should return 3+).
	IntegrityLevel int `json:"integrity_level"`
	// Os (Optional) - More detailed OS information than simply the "Windows", "macOS", "Linux", etc associated
	// with the payload
	Os string `json:"os"`
	// Domain (Optional) - the domain associated with the callback.
	Domain string `json:"domain"`
	// Architecture (Optional) - The architecture of the callback (x86, x64, arm64, etc)
	Architecture string `json:"architecture"`
	// Description (Optional) - Set a description for the new callback
	Description string `json:"description"`
	// ProcessName (Optional) - The name of process associated with the new callback.
	ProcessName string `json:"process_name" mapstructure:"process_name"`
	// Cwd (Optional) - The current working directory associated with the new callback
	Cwd string `json:"cwd"`
	// ImpersonationContext - the username in which you're impersonating instead of your normal user
	ImpersonationContext string `json:"impersonation_context"`
}

type MythicRPCCallbackCreateMessageResponse

type MythicRPCCallbackCreateMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
	// CallbackUUID - The AgentCallbackID for the new callback that was created.
	CallbackUUID string `json:"callback_uuid"`
}

func SendMythicRPCCallbackCreate

SendMythicRPCCallbackCreate - Register a new callback within Mythic

type MythicRPCCallbackDecryptBytesMessage

type MythicRPCCallbackDecryptBytesMessage struct {
	// AgentCallbackID (Required) - The UUID for the callback that will decrypt the message. Can also be a PayloadUUID or StagingUUID, but requires the C2Profile field as well
	AgentCallbackID string `json:"agent_callback_id"`
	// Message (Required) - The actual encrypted message you want to decrypt
	Message []byte `json:"message"`
	// IncludesUUID (Optional) - Does the Message include the UUID or not?
	IncludesUUID bool `json:"include_uuid"`
	// IsBase64Encoded (Optional) - Is the Message base64 encoded, or is it just the raw bytes?
	IsBase64Encoded bool `json:"base64_message"`
	// C2Profile (optional) - If using a Payload UUID then the C2 Profile is required
	C2Profile string `json:"c2_profile"`
}

type MythicRPCCallbackDecryptBytesMessageResponse

type MythicRPCCallbackDecryptBytesMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
	Message []byte `json:"message"`
}

func SendMythicRPCCallbackDecryptBytes

SendMythicRPCCallbackDecryptBytes - Ask Mythic to look up the associated callback and decrypt a message for that callback

type MythicRPCCallbackDisplayToRealIdSearchMessage

type MythicRPCCallbackDisplayToRealIdSearchMessage struct {
	// CallbackDisplayID (Required) - The display id that the operator sees for a callback (i.e. 1, 2, 3, etc).
	// The display ID is always incremental within each operation. So, each operation will have a callback1 for example.
	CallbackDisplayID int `json:"callback_display_id"`
	// OperationName (Optional) - The name of the operation associated with the callback.
	// Either OperationName or OperationID must be supplied to give context for the CallbackDisplayID
	OperationName *string `json:"operation_name"`
	// OperationID (Opational) - The ID of the operation associated with the callback.
	// Either OperationName or OperationID must be supplied to give context for the CallbackDisplayID
	OperationID *int `json:"operation_id"`
}

type MythicRPCCallbackDisplayToRealIdSearchMessageResponse

type MythicRPCCallbackDisplayToRealIdSearchMessageResponse struct {
	Success    bool   `json:"success"`
	Error      string `json:"error"`
	CallbackID int    `json:"callback_id"`
}

Every mythicRPC function call must return a response that includes the following two values

func SendMythicRPCCallbackDisplayToRealIdSearch

SendMythicRPCCallbackDisplayToRealIdSearch - Convert a generic CallbackDisplayID to a unique CallbackID for use with other RPC calls.

type MythicRPCCallbackEdgeRemoveMessage added in v1.6.0

type MythicRPCCallbackEdgeRemoveMessage struct {
	SourceCallbackID      int    `json:"source_callback_id"`
	DestinationCallbackID int    `json:"destination_callback_id"`
	C2ProfileName         string `json:"c2_profile_name"`
}

type MythicRPCCallbackEdgeRemoveMessageResponse added in v1.6.0

type MythicRPCCallbackEdgeRemoveMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

type MythicRPCCallbackEdgeSearchMessage added in v1.2.2

type MythicRPCCallbackEdgeSearchMessage struct {
	AgentCallbackID       string  `json:"agent_callback_id"`
	CallbackID            int     `json:"callback_id"`
	SearchC2ProfileName   *string `json:"search_c2_profile_name"`
	SearchActiveEdgesOnly *bool   `json:"search_active_edges_only"`
}

type MythicRPCCallbackEdgeSearchMessageResponse added in v1.2.2

type MythicRPCCallbackEdgeSearchMessageResponse struct {
	Success bool                                       `json:"success"`
	Error   string                                     `json:"error"`
	Results []MythicRPCCallbackEdgeSearchMessageResult `json:"results"`
}

type MythicRPCCallbackEdgeSearchMessageResult added in v1.2.2

type MythicRPCCallbackEdgeSearchMessageResult struct {
	ID             int                                  `mapstructure:"id" json:"id"`
	StartTimestamp time.Time                            `mapstructure:"start_timestamp" json:"start_timestamp"`
	EndTimestamp   time.Time                            `mapstructure:"end_timestamp" json:"end_timestamp"`
	Source         MythicRPCCallbackSearchMessageResult `mapstructure:"source" json:"source"`
	Destination    MythicRPCCallbackSearchMessageResult `mapstructure:"destination" json:"destination"`
	C2Profile      string                               `mapstructure:"c2profile" json:"c2profile"`
}

type MythicRPCCallbackEncryptBytesMessage

type MythicRPCCallbackEncryptBytesMessage struct {
	// AgentCallbackID (Required) - The UUID for the callback that will encrypt the message. Can also be a PayloadUUID or StagingUUID, but requires the C2Profile field as well
	AgentCallbackID string `json:"agent_callback_id"` //required
	// Message (Required) - The actual encrypted message you want to encrypt
	Message []byte `json:"message"`
	// IncludeUUID (Optional) - Should the encrypted message include the UUID in front?
	IncludeUUID bool `json:"include_uuid"`
	// Base64ReturnMessage (Optional) - Should the resulting Message be base64 encoded or left as raw bytes?
	Base64ReturnMessage bool `json:"base64_message"`
	// C2Profile (optional) - If using a Payload UUID then the C2 Profile is required
	C2Profile string `json:"c2_profile"`
}

type MythicRPCCallbackEncryptBytesMessageResponse

type MythicRPCCallbackEncryptBytesMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
	Message []byte `json:"message"`
}

func SendMythicRPCCallbackEncryptBytes

SendMythicRPCCallbackEncryptBytes - Ask Mythic to encrypt a message for a specific callback UUID.

type MythicRPCCallbackNextCheckinRangeMessage added in v1.4.0

type MythicRPCCallbackNextCheckinRangeMessage struct {
	SleepInterval int       `json:"sleep_interval"`
	SleepJitter   int       `json:"sleep_jitter"`
	LastCheckin   time.Time `json:"last_checkin"`
}

type MythicRPCCallbackNextCheckinRangeMessageResponse added in v1.4.0

type MythicRPCCallbackNextCheckinRangeMessageResponse struct {
	Success bool      `json:"success"`
	Error   string    `json:"error"`
	Min     time.Time `json:"min"`
	Max     time.Time `json:"max"`
}

func SendMythicRPCCallbackNextCheckinRange added in v1.4.0

SendMythicRPCCallbackEncryptBytes - Ask Mythic to encrypt a message for a specific callback UUID.

type MythicRPCCallbackRemoveCommandMessage

type MythicRPCCallbackRemoveCommandMessage struct {
	// TaskID (Required) - The task id that's going to remove commands from the associated callback.
	TaskID int `json:"task_id"` // required
	// AgentCallbackID - Agent Callback UUID of callback to add commands to if TaskID isn't specified
	AgentCallbackID string `json:"agent_callback_id"`
	// PayloadType - The payload type of the associated commands to load if they're for a payload type (or command augment) container other than the one for the callback
	PayloadType string `json:"payload_type"`
	// Commands (Required) - The list of command names to be removed from the callback. If the command isn't loaded
	// within the callback, then it's skipped
	Commands []string `json:"commands"` // required
	// CallbackIDs allows you to specify a list of CallbackID values to remove commands from multiple callbacks at once
	CallbackIDs []int `json:"callback_ids"`
}

type MythicRPCCallbackRemoveCommandMessageResponse

type MythicRPCCallbackRemoveCommandMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

func SendMythicRPCCallbackRemoveCommand

SendMythicRPCCallbackRemoveCommand - Remove commands from a certain callback. This is helpful if you want to unload certain functionality that might have been temporarily loaded in the first place.

type MythicRPCCallbackSearchCommandData

type MythicRPCCallbackSearchCommandData struct {
	Name                string                 `json:"cmd"`
	Version             int                    `json:"version"`
	Attributes          map[string]interface{} `json:"attributes"`
	NeedsAdmin          bool                   `json:"needs_admin"`
	HelpCmd             string                 `json:"help_cmd"`
	Description         string                 `json:"description"`
	SupportedUiFeatures []string               `json:"supported_ui_features"`
	Author              string                 `json:"author"`
	ScriptOnly          bool                   `json:"script_only"`
}

type MythicRPCCallbackSearchCommandMessage

type MythicRPCCallbackSearchCommandMessage struct {
	CallbackID                *int      `json:"callback_id,omitempty"`
	TaskID                    *int      `json:"task_id,omitempty"`
	SearchCommandNames        *[]string `json:"command_names,omitempty"`
	SearchSupportedUIFeatures *string   `json:"supported_ui_features,omitempty"`
	SearchScriptOnly          *bool     `json:"script_only,omitempty"`
	// this is an exact match search
	SearchAttributes map[string]interface{} `json:"params,omitempty"`
}

type MythicRPCCallbackSearchCommandMessageResponse

type MythicRPCCallbackSearchCommandMessageResponse struct {
	Success  bool                                `json:"success"`
	Error    string                              `json:"error"`
	Commands []MythicRPCCommandSearchCommandData `json:"commands"`
}

Every mythicRPC function call must return a response that includes the following two values

type MythicRPCCallbackSearchMessage

type MythicRPCCallbackSearchMessage struct {
	// AgentCallbackID (Required) - this is the UUID of the callback associated with this search.If this isn't supplied, AgentCallbackID must be supplied.
	// This provides the necessary context to scope the search to the right operation.
	AgentCallbackID string `json:"agent_callback_id"`
	// CallbackID (required) - this is the ID of the callback associated with this search. If this isn't supplied, AgentCallbackUUID must be supplied.
	CallbackID int `json:"callback_id"`
	// SearchCallbackID (Optional) - if you know the real callback ID, you can search via that here.
	SearchCallbackID *int `json:"search_callback_id"`
	// SearchCallbackDisplayID (Optional) - if you know the display id for the callback (the one that shows up in the UI), then you can search via that here.
	SearchCallbackDisplayID *int `json:"search_callback_display_id"`
	// SearchAgentCallbackID (Optional) - if you know the agent callback uuid for the callback, you can search for that here.
	SearchAgentCallbackID *string `json:"search_callback_uuid"`
	// SearchCallbackUser (Optional) - if you know the user associated with the callback you want, supply that here.
	SearchCallbackUser *string `json:"user,omitempty"`
	// SearchCallbackHost (Optional) - if you know the hostname of the callback you want, supply that here.
	SearchCallbackHost *string `json:"host,omitempty"`
	// SearchCallbackPID (Optional) - if you know the PID of the callback you want, supply that here.
	SearchCallbackPID *int `json:"pid,omitempty"`
	// SearchCallbackExtraInfo (Optional) - if you know the extra info associated with a callback, supply that here.
	SearchCallbackExtraInfo *string `json:"extra_info,omitempty"`
	// SearchCallbackSleepInfo (Optional) - if you know the sleep information for a callback, supply that here.
	SearchCallbackSleepInfo *string `json:"sleep_info,omitempty"`
	// SearchCallbackIP (Optional) - if you know the IP address of the callback you want, supply that here
	SearchCallbackIP *string `json:"ip,omitempty"`
	// SearchCallbackExternalIP (Optional) - if you know the external IP address of the callback you want, supply that here.
	SearchCallbackExternalIP *string `json:"external_ip,omitempty"`
	// SearchCallbackIntegrityLevel (Optional) - if you know the integrity level of the callback you want, supply that here
	SearchCallbackIntegrityLevel *int `json:"integrity_level,omitempty"`
	// SearchCallbackOs (Optional) - if you know the detailed OS information for the callback you want, supply that here.
	// NOTE: This is NOT the "windows", "Linux", "macOS", etc piece you selected when building a payload.
	SearchCallbackOs *string `json:"os,omitempty"`
	// SearchCallbackDomain (Optional) - if you know the domain
	SearchCallbackDomain       *string `json:"domain,omitempty"`
	SearchCallbackArchitecture *string `json:"architecture,omitempty"`
	SearchCallbackDescription  *string `json:"description,omitempty"`
	// SearchCallbackPayloadTypes allows filtering callbacks down to which payload types they're based on
	SearchCallbackPayloadTypes *[]string `json:"payload_types,omitempty"`
}

type MythicRPCCallbackSearchMessageResponse

type MythicRPCCallbackSearchMessageResponse struct {
	Success bool                                   `json:"success"`
	Error   string                                 `json:"error"`
	Results []MythicRPCCallbackSearchMessageResult `json:"results"`
}

type MythicRPCCallbackSearchMessageResult

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

type MythicRPCCallbackSearchTokenData added in v1.6.1

type MythicRPCCallbackSearchTokenData struct {
	ID               int                               `mapstructure:"id" json:"id"`
	Token            MythicRPCCallbackTokenSearchToken `mapstructure:"token" json:"token"`
	CallbackID       int                               `mapstructure:"callback_id" json:"callback_id"`
	TaskID           int                               `mapstructure:"task_id" json:"task_id"`
	TimestampCreated time.Time                         `mapstructure:"timestamp_created" json:"timestamp_created"`
	Deleted          bool                              `mapstructure:"deleted" json:"deleted"`
	Host             string                            `mapstructure:"host" json:"host"`
}

type MythicRPCCallbackTokenCreateMessage

type MythicRPCCallbackTokenCreateMessage struct {
	TaskID         int                          `json:"task_id"` //required
	CallbackTokens []MythicRPCCallbackTokenData `json:"callbacktokens"`
}

type MythicRPCCallbackTokenCreateMessageResponse

type MythicRPCCallbackTokenCreateMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

type MythicRPCCallbackTokenData

type MythicRPCCallbackTokenData = agentMessagePostResponseCallbackTokens

type MythicRPCCallbackTokenRemoveCallbackTokenData

type MythicRPCCallbackTokenRemoveCallbackTokenData = agentMessagePostResponseCallbackTokens

type MythicRPCCallbackTokenRemoveMessage

type MythicRPCCallbackTokenRemoveMessage struct {
	TaskID         int                                             `json:"task_id"` //required
	CallbackTokens []MythicRPCCallbackTokenRemoveCallbackTokenData `json:"callbacktokens"`
}

type MythicRPCCallbackTokenRemoveMessageResponse

type MythicRPCCallbackTokenRemoveMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

type MythicRPCCallbackTokenSearchMessage added in v1.6.1

type MythicRPCCallbackTokenSearchMessage struct {
	TaskID          *int    `json:"task_id"`
	CallbackID      *int    `json:"callback_id"`
	AgentCallbackID *string `json:"agent_callback_id"`
}

type MythicRPCCallbackTokenSearchMessageResponse added in v1.6.1

type MythicRPCCallbackTokenSearchMessageResponse struct {
	Success        bool                               `json:"success"`
	Error          string                             `json:"error"`
	CallbackTokens []MythicRPCCallbackSearchTokenData `json:"callbacktokens"`
}

type MythicRPCCallbackTokenSearchToken added in v1.6.1

type MythicRPCCallbackTokenSearchToken struct {
	// mythic supplied
	ID          int       `mapstructure:"id" json:"id"`
	TaskID      int       `mapstructure:"task_id" json:"task_id"`
	Deleted     bool      `mapstructure:"deleted" json:"deleted"`
	Host        string    `mapstructure:"host" json:"host"`
	Description string    `mapstructure:"description" json:"description"`
	OperationID int       `mapstructure:"operation_id" json:"operation_id"`
	Timestamp   time.Time `mapstructure:"timestamp" json:"timestamp"`
	// agent supplied
	TokenID            int64  `mapstructure:"token_id" json:"token_id"`
	User               string `mapstructure:"user" json:"user"`
	Groups             string `mapstructure:"groups" json:"groups"`
	Privileges         string `mapstructure:"privileges" json:"privileges"`
	ThreadID           int    `mapstructure:"thread_id" json:"thread_id"`
	ProcessID          int    `mapstructure:"process_id" json:"process_id"`
	SessionID          int    `mapstructure:"session_id" json:"session_id"`
	LogonSID           string `mapstructure:"logon_sid" json:"logon_sid"`
	IntegrityLevelSID  string `mapstructure:"integrity_level_sid" json:"integrity_level_sid"`
	AppContainerSID    string `mapstructure:"app_container_sid" json:"app_container_sid"`
	AppContainerNumber int    `mapstructure:"app_container_number" json:"app_container_number"`
	DefaultDacl        string `mapstructure:"default_dacl" json:"default_dacl"`
	Restricted         bool   `mapstructure:"restricted" json:"restricted"`
	Handle             int    `mapstructure:"handle" json:"handle"`
	Capabilities       string `mapstructure:"capabilities" json:"capabilities"`
}

type MythicRPCCallbackUpdateMessage

type MythicRPCCallbackUpdateMessage struct {
	AgentCallbackID                   *string   `json:"agent_callback_id"` // required
	CallbackID                        *int      `json:"callback_id"`
	TaskID                            *int      `json:"task_id"`
	EncryptionKey                     *[]byte   `json:"encryption_key,omitempty"`
	DecryptionKey                     *[]byte   `json:"decryption_key,omitempty"`
	CryptoType                        *string   `json:"crypto_type,omitempty"`
	User                              *string   `json:"user,omitempty"`
	Host                              *string   `json:"host,omitempty"`
	PID                               *int      `json:"pid,omitempty"`
	ExtraInfo                         *string   `json:"extra_info,omitempty"`
	SleepInfo                         *string   `json:"sleep_info,omitempty"`
	Ip                                *string   `json:"ip,omitempty"`
	IPs                               *[]string `json:"ips,omitempty"`
	ExternalIP                        *string   `json:"external_ip,omitempty"`
	IntegrityLevel                    *int      `json:"integrity_level,omitempty"`
	Os                                *string   `json:"os,omitempty"`
	Domain                            *string   `json:"domain,omitempty"`
	Architecture                      *string   `json:"architecture,omitempty"`
	Description                       *string   `json:"description,omitempty"`
	ProcessName                       *string   `json:"process_name,omitempty"`
	UpdateLastCheckinTime             *bool     `json:"update_last_checkin_time,omitempty"`
	UpdateLastCheckinTimeViaC2Profile *string   `json:"update_last_checkin_time_via_c2_profile,omitempty"`
	Cwd                               *string   `json:"cwd,omitempty"`
	ImpersonationContext              *string   `json:"impersonation_context,omitempty"`
	Dead                              *bool     `json:"dead,omitempty"`
}

type MythicRPCCallbackUpdateMessageResponse

type MythicRPCCallbackUpdateMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

type MythicRPCCommandSearchCommandData

type MythicRPCCommandSearchCommandData struct {
	Name                string                 `json:"cmd"`
	Version             int                    `json:"version"`
	Attributes          map[string]interface{} `json:"attributes"`
	NeedsAdmin          bool                   `json:"needs_admin"`
	HelpCmd             string                 `json:"help_cmd"`
	Description         string                 `json:"description"`
	SupportedUiFeatures []string               `json:"supported_ui_features"`
	Author              string                 `json:"author"`
	ScriptOnly          bool                   `json:"script_only"`
}

type MythicRPCCommandSearchMessage

type MythicRPCCommandSearchMessage struct {
	SearchCommandNames        *[]string `json:"command_names,omitempty"`
	SearchPayloadTypeName     string    `json:"payload_type_name"`
	SearchSupportedUIFeatures *string   `json:"supported_ui_features,omitempty"`
	SearchScriptOnly          *bool     `json:"script_only,omitempty"`
	SearchOs                  *string   `json:"os,omitempty"`
	// this is an exact match search
	SearchAttributes map[string]interface{} `json:"params,omitempty"`
}

type MythicRPCCommandSearchMessageResponse

type MythicRPCCommandSearchMessageResponse struct {
	Success  bool                                `json:"success"`
	Error    string                              `json:"error"`
	Commands []MythicRPCCommandSearchCommandData `json:"commands"`
}

Every mythicRPC function call must return a response that includes the following two values

type MythicRPCCredentialCreateCredentialData

type MythicRPCCredentialCreateCredentialData = agentMessagePostResponseCredentials

type MythicRPCCredentialCreateMessage

type MythicRPCCredentialCreateMessage struct {
	TaskID      int                                       `json:"task_id"` //required
	Credentials []MythicRPCCredentialCreateCredentialData `json:"credentials"`
}

type MythicRPCCredentialCreateMessageResponse

type MythicRPCCredentialCreateMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

type MythicRPCCredentialSearchCredentialData

type MythicRPCCredentialSearchCredentialData struct {
	Type       *string `json:"type" `      // optional
	Account    *string `json:"account" `   // optional
	Realm      *string `json:"realm" `     // optional
	Credential *string `json:"credential"` // optional
	Comment    *string `json:"comment"`    // optional
	Metadata   *string `json:"metadata"`   // optional
}

type MythicRPCCredentialSearchMessage

type MythicRPCCredentialSearchMessage struct {
	TaskID            int                                     `json:"task_id"` //required
	SearchCredentials MythicRPCCredentialSearchCredentialData `json:"credentials"`
}

type MythicRPCCredentialSearchMessageResponse

type MythicRPCCredentialSearchMessageResponse struct {
	Success     bool                                      `json:"success"`
	Error       string                                    `json:"error"`
	Credentials []MythicRPCCredentialSearchCredentialData `json:"credentials"`
}

type MythicRPCCustomBrowserSearchData added in v1.6.1

type MythicRPCCustomBrowserSearchData struct {
	TreeType      string      `json:"tree_type" mapstructure:"tree_type"`
	Host          *string     `json:"host" mapstructure:"host"`
	Name          *string     `json:"name" mapstructure:"name"`
	ParentPath    *string     `json:"parent_path" mapstructure:"parent_path"`
	FullPath      *string     `json:"full_path" mapstructure:"full_path"`
	MetadataKey   *string     `json:"metadata_key" mapstructure:"metadata_key"`
	MetadataValue interface{} `json:"metadata_value" mapstructure:"metadata_value"`
	CallbackGroup *string     `json:"callback_group" mapstructure:"callback_group"`
}

type MythicRPCCustomBrowserSearchDataResponse added in v1.6.1

type MythicRPCCustomBrowserSearchDataResponse struct {
	TreeType   string                 `json:"tree_type" mapstructure:"tree_type"`
	Host       string                 `json:"host" mapstructure:"host"`
	Name       string                 `json:"name" mapstructure:"name"`
	ParentPath string                 `json:"parent_path" mapstructure:"parent_path"`
	FullPath   string                 `json:"full_path" mapstructure:"full_path"`
	Metadata   map[string]interface{} `json:"metadata" mapstructure:"metadata"`
}

type MythicRPCCustomBrowserSearchMessage added in v1.6.1

type MythicRPCCustomBrowserSearchMessage struct {
	TaskID                 *int                             `json:"task_id"`
	OperationID            *int                             `json:"operation_id"`
	GetAllMatchingChildren bool                             `json:"all_matching_children"`
	SearchCustomBrowser    MythicRPCCustomBrowserSearchData `json:"custombrowser"`
}

type MythicRPCCustomBrowserSearchMessageResponse added in v1.6.1

type MythicRPCCustomBrowserSearchMessageResponse struct {
	Success              bool                                       `json:"success"`
	Error                string                                     `json:"error"`
	CustomBrowserEntries []MythicRPCCustomBrowserSearchDataResponse `json:"custombrowser"`
}

type MythicRPCFileBrowserCreateFileBrowserData

type MythicRPCFileBrowserCreateFileBrowserData = agentMessagePostResponseFileBrowser

type MythicRPCFileBrowserCreateMessage

type MythicRPCFileBrowserCreateMessage struct {
	TaskID      int                                       `json:"task_id"` //required
	FileBrowser MythicRPCFileBrowserCreateFileBrowserData `json:"filebrowser"`
}

type MythicRPCFileBrowserCreateMessageResponse

type MythicRPCFileBrowserCreateMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

type MythicRPCFileBrowserParsePathMessage added in v1.4.0

type MythicRPCFileBrowserParsePathMessage struct {
	Path string `json:"path"`
}

type MythicRPCFileBrowserParsePathMessageResponse added in v1.4.0

type MythicRPCFileBrowserParsePathMessageResponse struct {
	Success      bool         `json:"success"`
	Error        string       `json:"error"`
	AnalyzedPath AnalyzedPath `json:"analyzed_path"`
}

type MythicRPCFileBrowserRemoveFileBrowserData

type MythicRPCFileBrowserRemoveFileBrowserData = agentMessagePostResponseRemovedFiles

type MythicRPCFileBrowserRemoveMessage

type MythicRPCFileBrowserRemoveMessage struct {
	TaskID       int                                         `json:"task_id"` //required
	RemovedFiles []MythicRPCFileBrowserRemoveFileBrowserData `json:"removed_files"`
}

type MythicRPCFileBrowserRemoveMessageResponse

type MythicRPCFileBrowserRemoveMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

type MythicRPCFileCreateMessage

type MythicRPCFileCreateMessage struct {
	TaskID              int    `json:"task_id"`
	PayloadUUID         string `json:"payload_uuid"`
	AgentCallbackID     string `json:"agent_callback_id"`
	OperationID         int    `json:"operation_id"`
	OperatorID          int    `json:"operator_id"`
	FileContents        []byte `json:"-"`
	DeleteAfterFetch    bool   `json:"delete_after_fetch"`
	Filename            string `json:"filename"`
	IsScreenshot        bool   `json:"is_screenshot"`
	IsDownloadFromAgent bool   `json:"is_download"`
	RemotePathOnTarget  string `json:"remote_path"`
	TargetHostName      string `json:"host"`
	Comment             string `json:"comment"`
}

MythicRPCFileCreateMessage Must supply one of TaskID, PayloadUUID, or AgentCallbackID so that Mythic can track the file for the right operation

type MythicRPCFileCreateMessageResponse

type MythicRPCFileCreateMessageResponse struct {
	Success     bool   `json:"success"`
	Error       string `json:"error"`
	AgentFileID string `json:"agent_file_id"`
}

type MythicRPCFileGetContentMessage

type MythicRPCFileGetContentMessage struct {
	AgentFileID string `json:"file_id"`
}

type MythicRPCFileGetContentMessageResponse

type MythicRPCFileGetContentMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
	Content []byte `json:"content"`
}

Every mythicRPC function call must return a response that includes the following two values

type MythicRPCFileSearchMessage

type MythicRPCFileSearchMessage struct {
	TaskID              int    `json:"task_id"`
	CallbackID          int    `json:"callback_id"`
	Filename            string `json:"filename"`
	LimitByCallback     bool   `json:"limit_by_callback"`
	MaxResults          int    `json:"max_results"`
	Comment             string `json:"comment"`
	AgentFileID         string `json:"file_id"`
	IsPayload           bool   `json:"is_payload"`
	IsDownloadFromAgent bool   `json:"is_download_from_agent"`
	IsScreenshot        bool   `json:"is_screenshot"`
}

type MythicRPCFileSearchMessageResponse

type MythicRPCFileSearchMessageResponse struct {
	Success bool       `json:"success"`
	Error   string     `json:"error"`
	Files   []FileData `json:"files"`
}

Every mythicRPC function call must return a response that includes the following two values

type MythicRPCFileUpdateMessage

type MythicRPCFileUpdateMessage struct {
	AgentFileID      string  `json:"file_id"`
	Comment          string  `json:"comment"`
	Filename         string  `json:"filename"`
	AppendContents   *[]byte `json:"append_contents,omitempty"`
	ReplaceContents  *[]byte `json:"-"`
	Delete           bool    `json:"delete"`
	DeleteAfterFetch *bool   `json:"delete_after_fetch"`
}

type MythicRPCFileUpdateMessageResponse

type MythicRPCFileUpdateMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

Every mythicRPC function call must return a response that includes the following two values

type MythicRPCHandleAgentMessageJsonMessage added in v1.6.0

type MythicRPCHandleAgentMessageJsonMessage struct {
	// CallbackID or AgentCallbackID is required
	CallbackID      int    `json:"callback_id"`
	AgentCallbackID string `json:"agent_callback_id"`
	// AgentMessage is the full agent JSON message including an action keyword
	AgentMessage      map[string]interface{} `json:"agent_message"`
	UpdateCheckinTime bool                   `json:"update_checkin_time"`
}

type MythicRPCHandleAgentMessageJsonMessageResponse added in v1.6.0

type MythicRPCHandleAgentMessageJsonMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

type MythicRPCKeylogCreateMessage

type MythicRPCKeylogCreateMessage struct {
	TaskID  int                                `json:"task_id"` //required
	Keylogs []MythicRPCKeylogCreateProcessData `json:"keylogs"`
}

type MythicRPCKeylogCreateMessageResponse

type MythicRPCKeylogCreateMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

type MythicRPCKeylogCreateProcessData

type MythicRPCKeylogCreateProcessData = agentMessagePostResponseKeylogs

type MythicRPCKeylogSearchKeylogData

type MythicRPCKeylogSearchKeylogData struct {
	User        *string `json:"user" `         // optional
	WindowTitle *string `json:"window_title" ` // optional
	Keystrokes  *[]byte `json:"keystrokes" `   // optional
}

type MythicRPCKeylogSearchMessage

type MythicRPCKeylogSearchMessage struct {
	TaskID        int                             `json:"task_id"` //required
	SearchKeylogs MythicRPCKeylogSearchKeylogData `json:"keylogs"`
}

type MythicRPCKeylogSearchMessageResponse

type MythicRPCKeylogSearchMessageResponse struct {
	Success bool                              `json:"success"`
	Error   string                            `json:"error"`
	Keylogs []MythicRPCKeylogSearchKeylogData `json:"keylogs"`
}

type MythicRPCOperationEventLogCreateMessage

type MythicRPCOperationEventLogCreateMessage struct {
	// three optional ways to specify the operation
	TaskID          *int    `json:"task_id"`
	CallbackID      *int    `json:"callback_id"`
	AgentCallbackID *string `json:"callback_agent_id"`
	OperationID     *int    `json:"operation_id"`
	// the data to store
	Message      string        `json:"message"`
	Warning      bool          `json:"warning"`
	MessageLevel MESSAGE_LEVEL `json:"level"` //info or warning
}

type MythicRPCOperationEventLogCreateMessageResponse

type MythicRPCOperationEventLogCreateMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

type MythicRPCOtherServiceRPCMessage

type MythicRPCOtherServiceRPCMessage struct {
	ServiceName                 string                 `json:"service_name"` //required
	ServiceRPCFunction          string                 `json:"service_function"`
	ServiceRPCFunctionArguments map[string]interface{} `json:"service_arguments"`
}

type MythicRPCOtherServiceRPCMessageResponse

type MythicRPCOtherServiceRPCMessageResponse struct {
	Success bool                   `json:"success"`
	Error   string                 `json:"error"`
	Result  map[string]interface{} `json:"result"`
}

type MythicRPCPayloadAddCommandMessage

type MythicRPCPayloadAddCommandMessage struct {
	PayloadUUID string   `json:"payload_uuid"` //required
	Commands    []string `json:"commands"`     // required
}

type MythicRPCPayloadAddCommandMessageResponse

type MythicRPCPayloadAddCommandMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

type MythicRPCPayloadCreateFromScratchMessage

type MythicRPCPayloadCreateFromScratchMessage struct {
	TaskID               int                  `json:"task_id"`
	PayloadConfiguration PayloadConfiguration `json:"payload_configuration"`
	RemoteHost           *string              `json:"remote_host"`
}

type MythicRPCPayloadCreateFromScratchMessageResponse

type MythicRPCPayloadCreateFromScratchMessageResponse struct {
	Success        bool   `json:"success"`
	Error          string `json:"error"`
	NewPayloadUUID string `json:"new_payload_uuid"`
}

Every mythicRPC function call must return a response that includes the following two values

type MythicRPCPayloadCreateFromUUIDMessage

type MythicRPCPayloadCreateFromUUIDMessage struct {
	PayloadUUID    string  `json:"uuid"`
	TaskID         int     `json:"task_id"`
	NewDescription *string `json:"new_description"`
	NewFilename    *string `json:"new_filename"`
	RemoteHost     *string `json:"remote_host"`
}

type MythicRPCPayloadCreateFromUUIDMessageResponse

type MythicRPCPayloadCreateFromUUIDMessageResponse struct {
	Success        bool   `json:"success"`
	Error          string `json:"error"`
	NewPayloadUUID string `json:"new_payload_uuid"`
}

Every mythicRPC function call must return a response that includes the following two values

type MythicRPCPayloadGetContentMessage

type MythicRPCPayloadGetContentMessage struct {
	PayloadUUID string `json:"uuid"`
}

type MythicRPCPayloadGetContentMessageResponse

type MythicRPCPayloadGetContentMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
	Content []byte `json:"content"`
}

Every mythicRPC function call must return a response that includes the following two values

type MythicRPCPayloadOnHostCreateData

type MythicRPCPayloadOnHostCreateData struct {
	Host        string  `json:"host"`
	PayloadID   *int    `json:"payload_id"`
	PayloadUUID *string `json:"payload_uuid"`
}

type MythicRPCPayloadOnHostCreateMessage

type MythicRPCPayloadOnHostCreateMessage struct {
	TaskID        int                              `json:"task_id"` //required
	PayloadOnHost MythicRPCPayloadOnHostCreateData `json:"payload_on_host"`
}

type MythicRPCPayloadOnHostCreateMessageResponse

type MythicRPCPayloadOnHostCreateMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

type MythicRPCPayloadRemoveCommandMessage

type MythicRPCPayloadRemoveCommandMessage struct {
	PayloadUUID string   `json:"payload_uuid"` //required
	Commands    []string `json:"commands"`     // required
}

type MythicRPCPayloadRemoveCommandMessageResponse

type MythicRPCPayloadRemoveCommandMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

type MythicRPCPayloadSearchBuildParameter

type MythicRPCPayloadSearchBuildParameter struct {
	PayloadType          string            `json:"payload_type"`
	BuildParameterValues map[string]string `json:"build_parameter_values"`
}

type MythicRPCPayloadSearchMessage

type MythicRPCPayloadSearchMessage struct {
	CallbackID                   int                                    `json:"callback_id"`
	PayloadUUID                  string                                 `json:"uuid"`
	Description                  string                                 `json:"description"`
	Filename                     string                                 `json:"filename"`
	PayloadTypes                 []string                               `json:"payload_types"`
	IncludeAutoGeneratedPayloads bool                                   `json:"include_auto_generated"`
	BuildParameters              []MythicRPCPayloadSearchBuildParameter `json:"build_parameters"`
}

type MythicRPCPayloadSearchMessageResponse

type MythicRPCPayloadSearchMessageResponse struct {
	Success               bool                   `json:"success"`
	Error                 string                 `json:"error"`
	PayloadConfigurations []PayloadConfiguration `json:"payloads"`
}

Every mythicRPC function call must return a response that includes the following two values

type MythicRPCPayloadUpdateBuildStepMessage

type MythicRPCPayloadUpdateBuildStepMessage struct {
	PayloadUUID string `json:"payload_uuid"`
	StepName    string `json:"step_name"`
	StepStdout  string `json:"step_stdout"`
	StepStderr  string `json:"step_stderr"`
	StepSuccess bool   `json:"step_success"`
	StepSkip    bool   `json:"step_skip"`
}

type MythicRPCPayloadUpdateBuildStepMessageResponse

type MythicRPCPayloadUpdateBuildStepMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

Every mythicRPC function call must return a response that includes the following two values

type MythicRPCProcessCreateMessage

type MythicRPCProcessCreateMessage struct {
	TaskID    int                                 `json:"task_id"` //required
	Processes []MythicRPCProcessCreateProcessData `json:"processes"`
}

type MythicRPCProcessCreateMessageResponse

type MythicRPCProcessCreateMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

type MythicRPCProcessCreateProcessData

type MythicRPCProcessCreateProcessData = agentMessagePostResponseProcesses

type MythicRPCProcessSearchMessage

type MythicRPCProcessSearchMessage struct {
	TaskID        int                               `json:"task_id"` //required
	SearchProcess MythicRPCProcessSearchProcessData `json:"process"`
}

type MythicRPCProcessSearchMessageResponse

type MythicRPCProcessSearchMessageResponse struct {
	Success   bool                                `json:"success"`
	Error     string                              `json:"error"`
	Processes []MythicRPCProcessSearchProcessData `json:"processes"`
}

type MythicRPCProcessSearchProcessData

type MythicRPCProcessSearchProcessData struct {
	Host            *string `json:"host" `              // optional
	ProcessID       *int    `json:"process_id" `        // optional
	Architecture    *string `json:"architecture"`       // optional
	ParentProcessID *int    `json:"parent_process_id" ` // optional
	BinPath         *string `json:"bin_path" `          // optional
	Name            *string `json:"name" `              // optional
	User            *string `json:"user" `              // optional
	CommandLine     *string `json:"command_line" `      // optional
	IntegrityLevel  *int    `json:"integrity_level" `   // optional
	Description     *string `json:"description" `       // optional
	Signer          *string `json:"signer"`             // optional
}

type MythicRPCProxyStartMessage

type MythicRPCProxyStartMessage struct {
	// TaskID - the TaskID that's starting the proxy connection
	TaskID int `json:"task_id"`
	// LocalPort - for SOCKS, this is the port to open on the Mythic server.
	// For interactive, this is the port to open on the Mythic server
	// For rpfwd, this is the port to open on the host where your agent is running.
	LocalPort int `json:"local_port"`
	// RemotePort - This only needs to be set for rpfwd - this is the remote port to connect to when the LocalPort gets a connection
	RemotePort int `json:"remote_port"`
	// RemoteIP - This only needs to be set for rpfwd - this is the remote ip to connect to when the LocalPort gets a connection
	RemoteIP string `json:"remote_ip"`
	// PortType - What type of proxy connection are you opening
	// CALLBACK_PORT_TYPE_SOCKS
	// CALLBACK_PORT_TYPE_RPORTFWD
	// CALLBACK_PORT_TYPE_INTERACTIVE
	PortType string `json:"port_type"`
	// Username - This only can be set for socks - this allows auth for connecting to the port opened on the Mythic server
	Username string `json:"username"`
	// Password - This only can be set for socks - this allows auth for connecting to the port opened on the Mythic server
	Password string `json:"password"`
}

type MythicRPCProxyStartMessageResponse

type MythicRPCProxyStartMessageResponse struct {
	Success   bool   `json:"success"`
	Error     string `json:"error"`
	LocalPort int    `json:"local_port"`
}

type MythicRPCProxyStopMessage

type MythicRPCProxyStopMessage struct {
	TaskID   int    `json:"task_id"`
	Port     int    `json:"port"`
	PortType string `json:"port_type"`
	Username string `json:"username"`
	Password string `json:"password"`
}

type MythicRPCProxyStopMessageResponse

type MythicRPCProxyStopMessageResponse struct {
	Success   bool   `json:"success"`
	Error     string `json:"error"`
	LocalPort int    `json:"local_port"`
}

type MythicRPCResponse

type MythicRPCResponse struct {
	ResponseID int    `json:"response_id"`
	Response   []byte `json:"response"`
	TaskID     int    `json:"task_id"`
}

type MythicRPCResponseCreateMessage

type MythicRPCResponseCreateMessage struct {
	TaskID   int    `json:"task_id"`
	Response []byte `json:"response"`
}

type MythicRPCResponseCreateMessageResponse

type MythicRPCResponseCreateMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

type MythicRPCResponseSearchMessage

type MythicRPCResponseSearchMessage struct {
	TaskID   int    `json:"task_id"`
	Response string `json:"response"`
}

type MythicRPCResponseSearchMessageResponse

type MythicRPCResponseSearchMessageResponse struct {
	Success   bool                `json:"success"`
	Error     string              `json:"error"`
	Responses []MythicRPCResponse `json:"responses"`
}

type MythicRPCTagCreateMessage added in v1.4.21

type MythicRPCTagCreateMessage struct {
	TagTypeID    int                    `json:"tagtype_id"`
	URL          string                 `json:"url"`
	Source       string                 `json:"source"`
	Data         map[string]interface{} `json:"data"`
	TaskID       *int                   `json:"task_id"`
	FileID       *int                   `json:"file_id"`
	CredentialID *int                   `json:"credential_id"`
	MythicTreeID *int                   `json:"mythic_tree_id"`
}

type MythicRPCTagCreateMessageResponse added in v1.4.21

type MythicRPCTagCreateMessageResponse struct {
	Success bool             `json:"success"`
	Error   string           `json:"error"`
	Tag     MythicRPCTagData `json:"tag"`
}

Every mythicRPC function call must return a response that includes the following two values

func SendMythicRPCTagCreate added in v1.4.21

func SendMythicRPCTagCreate(input MythicRPCTagCreateMessage) (*MythicRPCTagCreateMessageResponse, error)

type MythicRPCTagData added in v1.4.21

type MythicRPCTagData struct {
	ID           int                    `json:"id"`
	TagTypeID    int                    `json:"tagtype_id"`
	TagType      MythicRPCTagTypeData   `json:"tagtype"`
	Data         map[string]interface{} `json:"data"`
	URL          string                 `json:"url"`
	Source       string                 `json:"source"`
	TaskID       *int                   `json:"task_id"`
	FileID       *int                   `json:"file_id"`
	CredentialID *int                   `json:"credential_id"`
	MythicTreeID *int                   `json:"mythic_tree_id"`
}

type MythicRPCTagSearchMessage added in v1.4.21

type MythicRPCTagSearchMessage struct {
	TaskID                int     `json:"task_id"`
	SearchTagID           *int    `json:"search_tag_id"`
	SearchTagTaskID       *int    `json:"search_tag_task_id"`
	SearchTagFileID       *int    `json:"search_tag_file_id,omitempty"`
	SearchTagCredentialID *int    `json:"search_tag_credential_id,omitempty"`
	SearchTagMythicTreeID *int    `json:"search_tag_mythictree_id,omitempty"`
	SearchTagSource       *string `json:"search_tag_source,omitempty"`
	SearchTagData         *string `json:"search_tag_data,omitempty"`
	SearchTagURL          *string `json:"search_tag_url,omitempty"`
}

type MythicRPCTagSearchMessageResponse added in v1.4.21

type MythicRPCTagSearchMessageResponse struct {
	Success bool               `json:"success"`
	Error   string             `json:"error"`
	Tags    []MythicRPCTagData `json:"tags"`
}

Every mythicRPC function call must return a response that includes the following two values

func SendMythicRPCTagSearch added in v1.4.21

func SendMythicRPCTagSearch(input MythicRPCTagSearchMessage) (*MythicRPCTagSearchMessageResponse, error)

type MythicRPCTagTypeData added in v1.4.21

type MythicRPCTagTypeData struct {
	ID          int    `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Color       string `json:"color"`
	OperationID int    `json:"operation_id"`
}

type MythicRPCTagTypeGetOrCreateMessage added in v1.4.21

type MythicRPCTagTypeGetOrCreateMessage struct {
	TaskID                        int     `json:"task_id"`
	GetOrCreateTagTypeID          *int    `json:"get_or_create_tag_type_id"`
	GetOrCreateTagTypeName        *string `json:"get_or_create_tag_type_name"`
	GetOrCreateTagTypeDescription *string `json:"get_or_create_tag_type_description"`
	GetOrCreateTagTypeColor       *string `json:"get_or_create_tag_type_color"`
}

type MythicRPCTagTypeGetOrCreateMessageResponse added in v1.4.21

type MythicRPCTagTypeGetOrCreateMessageResponse struct {
	Success bool                 `json:"success"`
	Error   string               `json:"error"`
	TagType MythicRPCTagTypeData `json:"tagtype"`
}

Every mythicRPC function call must return a response that includes the following two values

func SendMythicRPCTagTypeGetOrCreate added in v1.4.21

type MythicRPCTaskCreateMessage added in v1.3.0

type MythicRPCTaskCreateMessage struct {
	AgentCallbackID     *string `json:"agent_callback_id"`
	CallbackID          *int    `json:"callback_id"`
	OperatorID          *int    `json:"operator_id"`
	TaskID              *int    `json:"task_id"`
	CommandName         string  `json:"command_name"`
	Params              string  `json:"params"`
	ParameterGroupName  *string `json:"parameter_group_name,omitempty"`
	Token               *int    `json:"token,omitempty"`
	EventStepInstanceID *int    `json:"eventstepinstance_id,omitempty"`
}

MythicRPCTaskCreateMessage needs OperatorID, TaskID, or EventStepInstanceID to track task to appropriate user

type MythicRPCTaskCreateMessageResponse added in v1.3.0

type MythicRPCTaskCreateMessageResponse struct {
	Success       bool   `json:"success"`
	Error         string `json:"error"`
	TaskID        int    `json:"task_id"`
	TaskDisplayID int    `json:"task_display_id"`
}

Every mythicRPC function call must return a response that includes the following two values

func SendMythicRPCTaskCreate added in v1.3.0

func SendMythicRPCTaskCreate(input MythicRPCTaskCreateMessage) (*MythicRPCTaskCreateMessageResponse, error)

SendMythicRPCTaskCreate needs OperatorID, TaskID, or EventStepInstanceID to track task to appropriate user

type MythicRPCTaskCreateSubtaskGroupMessage

type MythicRPCTaskCreateSubtaskGroupMessage struct {
	TaskID                int                                    `json:"task_id"`    // required
	GroupName             string                                 `json:"group_name"` // required
	GroupCallbackFunction *string                                `json:"group_callback_function,omitempty"`
	Tasks                 []MythicRPCTaskCreateSubtaskGroupTasks `json:"tasks"` // required

}

type MythicRPCTaskCreateSubtaskGroupMessageResponse

type MythicRPCTaskCreateSubtaskGroupMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
	TaskIDs []int  `json:"task_ids"`
}

Every mythicRPC function call must return a response that includes the following two values

type MythicRPCTaskCreateSubtaskGroupTasks

type MythicRPCTaskCreateSubtaskGroupTasks struct {
	SubtaskCallbackFunction *string `json:"subtask_callback_function,omitempty"`
	CommandName             string  `json:"command_name"` // required
	Params                  string  `json:"params"`       // required
	ParameterGroupName      *string `json:"parameter_group_name,omitempty"`
	Token                   *int    `json:"token,omitempty"`
}

type MythicRPCTaskCreateSubtaskMessage

type MythicRPCTaskCreateSubtaskMessage struct {
	TaskID                  int     `json:"task_id"`
	SubtaskCallbackFunction *string `json:"subtask_callback_function,omitempty"`
	CommandName             string  `json:"command_name"`
	Params                  string  `json:"params"`
	ParameterGroupName      *string `json:"parameter_group_name,omitempty"`
	Token                   *int    `json:"token,omitempty"`
}

type MythicRPCTaskCreateSubtaskMessageResponse

type MythicRPCTaskCreateSubtaskMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
	TaskID  int    `json:"task_id"`
}

Every mythicRPC function call must return a response that includes the following two values

type MythicRPCTaskDisplayToRealIdSearchMessage

type MythicRPCTaskDisplayToRealIdSearchMessage struct {
	TaskDisplayID int     `json:"task_display_id"`
	OperationName *string `json:"operation_name"`
	OperationID   *int    `json:"operation_id"`
}

type MythicRPCTaskDisplayToRealIdSearchMessageResponse

type MythicRPCTaskDisplayToRealIdSearchMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
	TaskID  int    `json:"task_id"`
}

Every mythicRPC function call must return a response that includes the following two values

type MythicRPCTaskSearchMessage

type MythicRPCTaskSearchMessage struct {
	TaskID              int       `json:"task_id"`
	SearchTaskID        *int      `json:"search_task_id"`
	SearchTaskDisplayID *int      `json:"search_task_display_id"`
	SearchAgentTaskID   *string   `json:"agent_task_id,omitempty"`
	SearchHost          *string   `json:"host,omitempty"`
	SearchCallbackID    *int      `json:"callback_id,omitempty"`
	SearchCompleted     *bool     `json:"completed,omitempty"`
	SearchCommandNames  *[]string `json:"command_names,omitempty"`
	SearchParams        *string   `json:"params,omitempty"`
	SearchParentTaskID  *int      `json:"parent_task_id,omitempty"`
}

type MythicRPCTaskSearchMessageResponse

type MythicRPCTaskSearchMessageResponse struct {
	Success bool                    `json:"success"`
	Error   string                  `json:"error"`
	Tasks   []PTTaskMessageTaskData `json:"tasks"`
}

Every mythicRPC function call must return a response that includes the following two values

type MythicRPCTaskUpdateMessage

type MythicRPCTaskUpdateMessage struct {
	TaskID            int     `json:"task_id"`
	UpdateStatus      *string `json:"update_status,omitempty"`
	UpdateStdout      *string `json:"update_stdout,omitempty"`
	UpdateStderr      *string `json:"update_stderr,omitempty"`
	UpdateCommandName *string `json:"update_command_name,omitempty"`
	UpdateCompleted   *bool   `json:"update_completed,omitempty"`
}

type MythicRPCTaskUpdateMessageResponse

type MythicRPCTaskUpdateMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

Every mythicRPC function call must return a response that includes the following two values

type MythicRPCTokenCreateMessage

type MythicRPCTokenCreateMessage struct {
	TaskID int                             `json:"task_id"` //required
	Tokens []MythicRPCTokenCreateTokenData `json:"tokens"`
}

type MythicRPCTokenCreateMessageResponse

type MythicRPCTokenCreateMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

type MythicRPCTokenCreateTokenData

type MythicRPCTokenCreateTokenData = agentMessagePostResponseToken

type MythicRPCTokenRemoveMessage

type MythicRPCTokenRemoveMessage struct {
	TaskID int                             `json:"task_id"` //required
	Tokens []MythicRPCTokenRemoveTokenData `json:"tokens"`
}

type MythicRPCTokenRemoveMessageResponse

type MythicRPCTokenRemoveMessageResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
}

type MythicRPCTokenRemoveTokenData

type MythicRPCTokenRemoveTokenData = agentMessagePostResponseToken

type PTTaskMessageTaskData

type PTTaskMessageTaskData struct {
	ID                                 int    `json:"id"`
	DisplayID                          int    `json:"display_id"`
	AgentTaskID                        string `json:"agent_task_id"`
	CommandName                        string `json:"command_name"`
	Params                             string `json:"params"`
	Timestamp                          string `json:"timestamp"`
	CallbackID                         int    `json:"callback_id"`
	Status                             string `json:"status"`
	OriginalParams                     string `json:"original_params"`
	DisplayParams                      string `json:"display_params"`
	Comment                            string `json:"comment"`
	Stdout                             string `json:"stdout"`
	Stderr                             string `json:"stderr"`
	Completed                          bool   `json:"completed"`
	OpsecPreBlocked                    bool   `json:"opsec_pre_blocked"`
	OpsecPreMessage                    string `json:"opsec_pre_message"`
	OpsecPreBypassed                   bool   `json:"opsec_pre_bypassed"`
	OpsecPreBypassRole                 string `json:"opsec_pre_bypass_role"`
	OpsecPostBlocked                   bool   `json:"opsec_post_blocked"`
	OpsecPostMessage                   string `json:"opsec_post_message"`
	OpsecPostBypassed                  bool   `json:"opsec_post_bypassed"`
	OpsecPostBypassRole                string `json:"opsec_post_bypass_role"`
	ParentTaskID                       int    `json:"parent_task_id"`
	OperatorUsername                   string `json:"operator_username"`
	SubtaskCallbackFunction            string `json:"subtask_callback_function"`
	SubtaskCallbackFunctionCompleted   bool   `json:"subtask_callback_function_completed"`
	GroupCallbackFunction              string `json:"group_callback_function"`
	GroupCallbackFunctionCompleted     bool   `json:"group_callback_function_completed"`
	CompletedCallbackFunction          string `json:"completed_callback_function"`
	CompletedCallbackFunctionCompleted bool   `json:"completed_callback_function_completed"`
	SubtaskGroupName                   string `json:"subtask_group_name"`
	TaskingLocation                    string `json:"tasking_location"`
	ParameterGroupName                 string `json:"parameter_group_name"`
	TokenID                            int    `json:"token_id"`
}

type PayloadConfiguration

type PayloadConfiguration struct {
	Description        string                                `json:"description"`
	PayloadType        string                                `json:"payload_type" binding:"required"`
	C2Profiles         *[]PayloadConfigurationC2Profile      `json:"c2_profiles,omitempty"`
	BuildParameters    *[]PayloadConfigurationBuildParameter `json:"build_parameters,omitempty"`
	Commands           []string                              `json:"commands"`
	SelectedOS         string                                `json:"selected_os" binding:"required"`
	Filename           string                                `json:"filename" binding:"required"`
	WrappedPayloadUUID string                                `json:"wrapped_payload"`
	UUID               string                                `json:"uuid"`
	AgentFileID        string                                `json:"agent_file_id"`
	BuildPhase         string                                `json:"build_phase"`
}

exporting a payload configuration

type PayloadConfigurationBuildParameter

type PayloadConfigurationBuildParameter struct {
	Name  string      `json:"name" binding:"required"`
	Value interface{} `json:"value" binding:"required"`
}

type PayloadConfigurationC2Profile

type PayloadConfigurationC2Profile struct {
	Name       string                 `json:"c2_profile"`
	Parameters map[string]interface{} `json:"c2_profile_parameters"`
}

Source Files

Jump to

Keyboard shortcuts

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