types

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownSpite = errors.New("unknown spite body")
	ErrUnknownJob   = errors.New("unknown job body")
)
View Source
var DefaultProfile []byte

Functions

func BuildOneSpites

func BuildOneSpites(spite *implantpb.Spite) *implantpb.Spites

func BuildPingSpite

func BuildPingSpite() *implantpb.Spite

func BuildPingSpites added in v0.0.3

func BuildPingSpites() *implantpb.Spites

func BuildSpite

func BuildSpite(spite *implantpb.Spite, msg proto.Message) (*implantpb.Spite, error)

BuildSpite build spite request

func BuildSpites

func BuildSpites(spites []*implantpb.Spite) *implantpb.Spites

Types

type BasicProfile added in v0.0.3

type BasicProfile struct {
	Name       string   `yaml:"name" config:"name" default:"malefic"`
	Targets    []string `yaml:"targets" config:"targets" default:"[]"`
	Protocol   string   `yaml:"protocol" config:"protocol" default:"tcp"`
	TLS        bool     `yaml:"tls" config:"tls" default:"false"`
	Proxy      string   `yaml:"proxy" config:"proxy" default:""`
	Interval   int      `yaml:"interval" config:"interval" default:"5"`
	Jitter     float64  `yaml:"jitter" config:"jitter" default:"0.2"`
	CA         string   `yaml:"ca" config:"ca" default:""`
	Encryption string   `yaml:"encryption" config:"encryption" default:"aes"`
	Key        string   `yaml:"key" config:"key" default:"maliceofinternal"`
}

type ImplantProfile added in v0.0.3

type ImplantProfile struct {
	Mod          string                 `yaml:"mod" config:"mod" default:""`
	RegisterInfo bool                   `yaml:"register_info" config:"register_info" default:"false"`
	HotLoad      bool                   `yaml:"hot_load" config:"hot_load" default:"false"`
	Modules      []string               `yaml:"modules" config:"modules" default:"[]"`
	Extras       map[string]interface{} `yaml:",inline"`
}

type MsgName

type MsgName string
const (
	MsgUnknown        MsgName = "unknown"
	MsgNil            MsgName = "nil"
	MsgEmpty          MsgName = "empty"
	MsgInit           MsgName = "init"
	MsgPing           MsgName = "ping"
	MsgSleep          MsgName = "sleep"
	MsgRequest        MsgName = "request"
	MsgResponse       MsgName = "response"
	MsgBlock          MsgName = "block"
	MsgRegister       MsgName = "register"
	MsgSysInfo        MsgName = "sysinfo"
	MsgUpload         MsgName = consts.ModuleUpload
	MsgDownload       MsgName = consts.ModuleDownload
	MsgCurl           MsgName = consts.ModuleCurl
	MsgExec           MsgName = consts.ModuleExecution
	MsgAck            MsgName = "ack"
	MsgListModule     MsgName = consts.ModuleListModule
	MsgLoadModule     MsgName = consts.ModuleLoadModule
	MsgListAddon      MsgName = consts.ModuleListAddon
	MsgLoadAddon      MsgName = consts.ModuleLoadAddon
	MsgBinaryResponse MsgName = "assembly_response"
	MsgExecuteAddon   MsgName = consts.ModuleExecuteAddon
	MsgExecuteLocal   MsgName = consts.ModuleExecuteLocal
	//MsgExecuteSpawn     MsgName = "execute_spawn"
	MsgLs          MsgName = consts.ModuleLs
	MsgNetstat     MsgName = consts.ModuleNetstat
	MsgPs          MsgName = consts.ModulePs
	MsgKill        MsgName = consts.ModuleKill
	MsgBypass      MsgName = consts.ModuleBypass
	MsgRegistryAdd MsgName = consts.ModuleRegAdd

	MsgServicesResponse  MsgName = consts.ModuleServiceList
	MsgServiceResponse   MsgName = consts.ModuleServiceQuery
	MsgTaskSchdsResponse MsgName = consts.ModuleTaskSchdList
	MsgTaskSchdResponse  MsgName = consts.ModuleTaskSchdQuery
	MsgWmiQuery          MsgName = consts.ModuleWmiQuery
	MsgWmiExecute        MsgName = consts.ModuleWmiExec
)

func MessageType

func MessageType(message *implantpb.Spite) MsgName

MessageType , parse response message

func (MsgName) String

func (r MsgName) String() string

type ProfileConfig added in v0.0.3

type ProfileConfig struct {
	Basic   *BasicProfile          `yaml:"basic" config:"basic"`
	Pulse   *PulseProfile          `yaml:"pulse" config:"pulse"`
	Implant *ImplantProfile        `yaml:"implant" config:"implant"`
	Extras  map[string]interface{} `yaml:",inline"`
}

func LoadProfile added in v0.0.3

func LoadProfile(content []byte) (*ProfileConfig, error)

type ProfileParams added in v0.0.3

type ProfileParams struct {
	Interval int     `json:"Interval"`
	Jitter   float64 `json:"Jitter"`
}

func (*ProfileParams) String added in v0.0.3

func (p *ProfileParams) String() string

type PulseProfile added in v0.0.3

type PulseProfile struct {
	Target     string                 `yaml:"target"`
	Encryption string                 `yaml:"encryption"`
	Key        string                 `yaml:"key"`
	Protocol   string                 `yaml:"protocol"`
	Extras     map[string]interface{} `yaml:",inline"`
}

Jump to

Keyboard shortcuts

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