Documentation ¶
Index ¶
- Constants
- Variables
- func AddHelper(name string, helper *Helper) error
- func ConvertArgsToExpectedTypes(args []interface{}, argTypes []reflect.Type) ([]interface{}, error)
- func ConvertGoValueToLua(L *lua.LState, value interface{}) lua.LValue
- func ConvertGoValueToLuaType(L *lua.LState, t reflect.Type) string
- func ConvertLuaTableToGo(tbl *lua.LTable) interface{}
- func ConvertLuaValueToGo(value lua.LValue) interface{}
- func ConvertNumericType(value int64, kind reflect.Kind) interface{}
- func GetGlobalResourceFile(filename string) (string, error)
- func GetResourceFile(pluginName, filename string) (string, error)
- func GetResult(rpc clientrpc.MaliceRPCClient, task *clientpb.Task, index int32) (*clientpb.TaskContext, error)
- func NewBinary(module string, path string, args []string, output bool, timeout uint32, ...) (*implantpb.ExecuteBinary, error)
- func NewExecutable(module string, path string, args []string, arch string, ...) (*implantpb.ExecuteBinary, error)
- func NewSacrificeProcessMessage(ppid int64, hidden, block_dll, disable_etw bool, argue string) (*implantpb.SacrificeProcess, error)
- func ParseAssembly(spite *implantpb.Spite) (string, error)
- func ParseStatus(spite *implantpb.Spite) (bool, error)
- func PrintTask(task *clientpb.TaskContext) (*implantpb.Spite, error)
- func RegisterBuiltin(rpc clientrpc.MaliceRPCClient)
- func RegisterCustomBuiltin(rpc clientrpc.MaliceRPCClient)
- func RegisterEncodeFunc(rpc clientrpc.MaliceRPCClient)
- func RegisterFunction(name string, fn interface{})
- func RegisterGRPCBuiltin(rpc clientrpc.MaliceRPCClient)
- func RegisterInternalDoneCallback(name string, callback ImplantCallback) error
- func RegisterInternalFunc(pkg, name string, fn *InternalFunc, callback ImplantCallback) error
- func WaitResult(rpc clientrpc.MaliceRPCClient, task *clientpb.Task) (*clientpb.TaskContext, error)
- func WrapFuncForLua(fn *InternalFunc) lua.LGFunction
- type BuiltinCallback
- type EventCondition
- type Helper
- type ImplantCallback
- type InternalFunc
- type OnEventFunc
Constants ¶
View Source
const ( GroupEncode = "encode" GroupArtifact = "artifact" )
View Source
const ( BeaconPackage = "beacon" RpcPackage = "rpc" ArmoryPackage = "armory" BuiltinPackage = "builtin" )
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(map[string]*InternalFunc)
Functions ¶
func ConvertArgsToExpectedTypes ¶ added in v0.0.3
Convert the []interface{} and map[string]interface{} to the expected types defined in ArgTypes
func ConvertGoValueToLua ¶
将 Lua 的 lua.LValue 转换为 Go 的 interface{}
func ConvertLuaTableToGo ¶ added in v0.0.3
ConvertLuaTableToGo takes a Lua table and converts it into a Go slice or map
func ConvertLuaValueToGo ¶
func ConvertNumericType ¶
func GetGlobalResourceFile ¶ added in v0.0.3
func GetResourceFile ¶ added in v0.0.3
func GetResult ¶ added in v0.0.3
func GetResult(rpc clientrpc.MaliceRPCClient, task *clientpb.Task, index int32) (*clientpb.TaskContext, error)
func NewExecutable ¶ added in v0.0.3
func NewExecutable(module string, path string, args []string, arch string, sac *implantpb.SacrificeProcess) (*implantpb.ExecuteBinary, error)
func NewSacrificeProcessMessage ¶ added in v0.0.3
func PrintTask ¶ added in v0.0.3
func PrintTask(task *clientpb.TaskContext) (*implantpb.Spite, error)
func RegisterBuiltin ¶ added in v0.0.3
func RegisterBuiltin(rpc clientrpc.MaliceRPCClient)
func RegisterCustomBuiltin ¶ added in v0.0.3
func RegisterCustomBuiltin(rpc clientrpc.MaliceRPCClient)
func RegisterEncodeFunc ¶ added in v0.0.3
func RegisterEncodeFunc(rpc clientrpc.MaliceRPCClient)
func RegisterFunction ¶
func RegisterFunction(name string, fn interface{})
func RegisterGRPCBuiltin ¶ added in v0.0.3
func RegisterGRPCBuiltin(rpc clientrpc.MaliceRPCClient)
func RegisterInternalDoneCallback ¶ added in v0.0.3
func RegisterInternalDoneCallback(name string, callback ImplantCallback) error
func RegisterInternalFunc ¶
func RegisterInternalFunc(pkg, name string, fn *InternalFunc, callback ImplantCallback) error
RegisterInternalFunc 注册并生成 Lua 定义文件
func WaitResult ¶ added in v0.0.3
func WaitResult(rpc clientrpc.MaliceRPCClient, task *clientpb.Task) (*clientpb.TaskContext, error)
func WrapFuncForLua ¶
func WrapFuncForLua(fn *InternalFunc) lua.LGFunction
Types ¶
type BuiltinCallback ¶ added in v0.0.3
type EventCondition ¶ added in v0.0.3
type Helper ¶ added in v0.0.3
type Helper struct { Group string Short string Long string Input []string Output []string Example string CMDName string }
func (*Helper) FormatInput ¶ added in v0.0.3
func (*Helper) FormatOutput ¶ added in v0.0.3
type ImplantCallback ¶
type ImplantCallback func(content *clientpb.TaskContext) (string, error)
callback to callee, like lua or go, return string
type InternalFunc ¶
type InternalFunc struct { Name string Package string RawName string Raw interface{} Func func(...interface{}) (interface{}, error) HasLuaCallback bool NoCache bool FinishCallback ImplantCallback // implant callback DoneCallback ImplantCallback ArgTypes []reflect.Type ReturnTypes []reflect.Type *Helper }
func GetInternalFuncSignature ¶
func GetInternalFuncSignature(fn interface{}) *InternalFunc
获取函数的参数和返回值类型
func WrapInternalFunc ¶
func WrapInternalFunc(fun interface{}) *InternalFunc
func (*InternalFunc) String ¶ added in v0.0.3
func (fn *InternalFunc) String() string
Click to show internal directories.
Click to hide internal directories.