intermediate

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EncodeGroup   = "encode"
	ArtifactGroup = "artifact"
	ListenerGroup = "listener"
	ClientGroup   = "client"
)
View Source
const (
	BeaconPackage  = "beacon"
	RpcPackage     = "rpc"
	ArmoryPackage  = "armory"
	BuiltinPackage = "builtin"
)

lua package

Variables

View Source
var (
	ErrFunctionNotFound = errors.New("function not found")
	WarnArgsMismatch    = errors.New("arguments mismatch")
	WarnReturnMismatch  = errors.New("return values mismatch")
)
View Source
var InternalFunctions = make(internalFuncs)

Functions

func AddHelper

func AddHelper(name string, helper *mals.Helper) error

func GetResult

func GetResult(rpc clientrpc.MaliceRPCClient, task *clientpb.Task, index int32) (*clientpb.TaskContext, error)

func NewBinary

func NewBinary(module string, path string, args []string, out bool, timeout uint32, arch string, process string, sac *implantpb.SacrificeProcess) (*implantpb.ExecuteBinary, error)

func NewBinaryData

func NewBinaryData(module string, path string, data string, out bool, timeout uint32, arch string, process string, sac *implantpb.SacrificeProcess) (*implantpb.ExecuteBinary, error)

func NewBypassAll added in v0.1.1

func NewBypassAll() map[string]string

func NewExecutable

func NewExecutable(module string, path string, args []string, arch string, sac *implantpb.SacrificeProcess) (*implantpb.ExecuteBinary, error)

func NewSacrificeProcessMessage

func NewSacrificeProcessMessage(ppid uint32, hidden, block_dll, bypassETW bool, argue string) (*implantpb.SacrificeProcess, error)

func ParseBinaryResponse

func ParseBinaryResponse(spite *implantpb.Spite) (string, error)

func ParseStatus

func ParseStatus(spite *implantpb.Spite) (bool, error)

func PrintTask

func PrintTask(task *clientpb.TaskContext) (*implantpb.Spite, error)

func RegisterBuiltin

func RegisterBuiltin(rpc clientrpc.MaliceRPCClient)

func RegisterCustomBuiltin

func RegisterCustomBuiltin(rpc clientrpc.MaliceRPCClient)

func RegisterEncodeFunc

func RegisterEncodeFunc(rpc clientrpc.MaliceRPCClient)

func RegisterFunction

func RegisterFunction(name string, fn interface{})

func RegisterInternalDoneCallback

func RegisterInternalDoneCallback(name string, callback ImplantCallback) error

func RegisterInternalFunc

func RegisterInternalFunc(pkg, name string, fn *mals.MalFunction, callback ImplantCallback) error

RegisterInternalFunc 注册并生成 Lua 定义文件

func WrapFunctionReturn

func WrapFunctionReturn(fn interface{}) func(args ...interface{}) (interface{}, error)

Types

type BuiltinCallback

type BuiltinCallback func(content interface{}) (interface{}, error)

type EventCondition

type EventCondition struct {
	Type        string
	Op          string
	MessageType string
	TaskId      string
	SessionId   string
	ListenerId  string
	PipelineId  string
}

func (*EventCondition) Match

func (cond *EventCondition) Match(e *clientpb.Event) bool

type ImplantCallback

type ImplantCallback func(content *clientpb.TaskContext) (string, error)

callback to callee, like lua or go, return string

type InternalFunc

type InternalFunc struct {
	*mals.MalFunction
	FinishCallback ImplantCallback // implant callback
	DoneCallback   ImplantCallback
}

type OnEventFunc

type OnEventFunc func(*clientpb.Event) (bool, error)

Jump to

Keyboard shortcuts

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