rpc

package
v0.0.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Transport contextKey = iota
	Operator
)

Variables

This section is empty.

Functions

func InitLogs

func InitLogs(debug bool)

func StartClientListener

func StartClientListener(address string) (*grpc.Server, net.Listener, error)

StartClientListener - Start a mutual TLS listener

Types

type GenericRequest

type GenericRequest struct {
	proto.Message
	Task    *core.Task
	Count   int
	Session *core.Session
	Callee  string
}

func (*GenericRequest) HandlerResponse added in v0.0.2

func (r *GenericRequest) HandlerResponse(ch chan *implantpb.Spite, typ types.MsgName, callbacks ...func(spite *implantpb.Spite))

func (*GenericRequest) InitSpite added in v0.0.2

func (r *GenericRequest) InitSpite(ctx context.Context) (*implantpb.Spite, error)

func (*GenericRequest) NewSpite

func (r *GenericRequest) NewSpite(msg proto.Message) (*implantpb.Spite, error)

func (*GenericRequest) SetCallback

func (r *GenericRequest) SetCallback(callback func())

type Server

func NewServer

func NewServer() *Server

NewServer - Create new server instance

func (*Server) AddClient

func (rpc *Server) AddClient(ctx context.Context, req *rootpb.Operator) (*rootpb.Response, error)

func (*Server) AddListener

func (rpc *Server) AddListener(ctx context.Context, req *rootpb.Operator) (*rootpb.Response, error)

func (*Server) Broadcast

func (rpc *Server) Broadcast(ctx context.Context, req *clientpb.Event) (*clientpb.Empty, error)

func (*Server) Build added in v0.0.3

func (rpc *Server) Build(ctx context.Context, req *clientpb.Generate) (*clientpb.Builder, error)

func (*Server) Bypass added in v0.0.2

func (rpc *Server) Bypass(ctx context.Context, req *implantpb.BypassRequest) (*clientpb.Task, error)

func (*Server) CancelTask added in v0.0.2

func (rpc *Server) CancelTask(ctx context.Context, req *implantpb.ImplantTask) (*clientpb.Task, error)

func (*Server) Cat

func (rpc *Server) Cat(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) Cd

func (rpc *Server) Cd(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) Checkin added in v0.0.3

func (rpc *Server) Checkin(ctx context.Context, req *implantpb.Ping) (*clientpb.Empty, error)

func (*Server) Chmod

func (rpc *Server) Chmod(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) Chown

func (rpc *Server) Chown(ctx context.Context, req *implantpb.ChownRequest) (*clientpb.Task, error)

func (*Server) Clear added in v0.0.2

func (rpc *Server) Clear(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) Cp

func (rpc *Server) Cp(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) Curl

func (rpc *Server) Curl(ctx context.Context, req *implantpb.CurlRequest) (*clientpb.Task, error)

func (*Server) DLL2Shellcode added in v0.0.3

func (rpc *Server) DLL2Shellcode(ctx context.Context, req *clientpb.DLL2Shellcode) (*clientpb.Bin, error)

func (*Server) Download

func (rpc *Server) Download(ctx context.Context, req *implantpb.DownloadRequest) (*clientpb.Task, error)

Download - Download a file from implant

func (*Server) DownloadArtifact added in v0.0.3

func (rpc *Server) DownloadArtifact(ctx context.Context, req *clientpb.Builder) (*clientpb.Builder, error)

func (*Server) EXE2Shellcode added in v0.0.3

func (rpc *Server) EXE2Shellcode(ctx context.Context, req *clientpb.EXE2Shellcode) (*clientpb.Bin, error)

func (*Server) Env

func (rpc *Server) Env(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) Events

func (rpc *Server) Events(_ *clientpb.Empty, stream clientrpc.MaliceRPC_EventsServer) error

func (*Server) Execute

func (rpc *Server) Execute(ctx context.Context, req *implantpb.ExecRequest) (*clientpb.Task, error)

func (*Server) ExecuteAddon added in v0.0.2

func (rpc *Server) ExecuteAddon(ctx context.Context, req *implantpb.ExecuteAddon) (*clientpb.Task, error)

func (*Server) ExecuteArmory added in v0.0.2

func (rpc *Server) ExecuteArmory(ctx context.Context, req *implantpb.ExecuteBinary) (*clientpb.Task, error)

func (*Server) ExecuteAssembly

func (rpc *Server) ExecuteAssembly(ctx context.Context, req *implantpb.ExecuteBinary) (*clientpb.Task, error)

func (*Server) ExecuteBof

func (rpc *Server) ExecuteBof(ctx context.Context, req *implantpb.ExecuteBinary) (*clientpb.Task, error)

func (*Server) ExecuteDll

func (rpc *Server) ExecuteDll(ctx context.Context, req *implantpb.ExecuteBinary) (*clientpb.Task, error)

func (*Server) ExecuteEXE added in v0.0.2

func (rpc *Server) ExecuteEXE(ctx context.Context, req *implantpb.ExecuteBinary) (*clientpb.Task, error)

func (*Server) ExecuteLocal added in v0.0.3

func (rpc *Server) ExecuteLocal(ctx context.Context, req *implantpb.ExecuteBinary) (*clientpb.Task, error)

func (*Server) ExecutePowerpick added in v0.0.3

func (rpc *Server) ExecutePowerpick(ctx context.Context, req *implantpb.ExecuteBinary) (*clientpb.Task, error)

func (*Server) ExecuteShellcode

func (rpc *Server) ExecuteShellcode(ctx context.Context, req *implantpb.ExecuteBinary) (*clientpb.Task, error)

func (*Server) GenericHandler added in v0.0.2

func (rpc *Server) GenericHandler(ctx context.Context, req *GenericRequest) (chan *implantpb.Spite, error)

func (*Server) GetAllTaskContent

func (rpc *Server) GetAllTaskContent(ctx context.Context, req *clientpb.Task) (*clientpb.TaskContexts, error)

func (*Server) GetArtifact added in v0.0.3

func (rpc *Server) GetArtifact(ctx context.Context, req *clientpb.Builder) (*clientpb.Builder, error)

for listener

func (*Server) GetBasic

func (rpc *Server) GetBasic(ctx context.Context, _ *clientpb.Empty) (*clientpb.Basic, error)

func (*Server) GetClients

func (rpc *Server) GetClients(ctx context.Context, req *clientpb.Empty) (*clientpb.Clients, error)

func (*Server) GetListeners

func (rpc *Server) GetListeners(ctx context.Context, req *clientpb.Empty) (*clientpb.Listeners, error)

func (*Server) GetProfiles added in v0.0.3

func (rpc *Server) GetProfiles(ctx context.Context, req *clientpb.Empty) (*clientpb.Profiles, error)

func (*Server) GetSession

func (rpc *Server) GetSession(ctx context.Context, req *clientpb.SessionRequest) (*clientpb.Session, error)

func (*Server) GetSessionHistory added in v0.0.3

func (rpc *Server) GetSessionHistory(ctx context.Context, req *clientpb.SessionLog) (*clientpb.TasksContext, error)

func (*Server) GetSessions

func (rpc *Server) GetSessions(ctx context.Context, req *clientpb.SessionRequest) (*clientpb.Sessions, error)

func (*Server) GetSystem added in v0.0.3

func (rpc *Server) GetSystem(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) GetTaskContent

func (rpc *Server) GetTaskContent(ctx context.Context, req *clientpb.Task) (*clientpb.TaskContext, error)

func (*Server) GetTaskFiles added in v0.0.2

func (rpc *Server) GetTaskFiles(ctx context.Context, req *clientpb.Session) (*clientpb.Files, error)

func (*Server) GetTasks

func (rpc *Server) GetTasks(ctx context.Context, req *clientpb.TaskRequest) (*clientpb.Tasks, error)

func (*Server) Info

func (rpc *Server) Info(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) InitBindSession added in v0.0.3

func (rpc *Server) InitBindSession(ctx context.Context, req *implantpb.Request) (*clientpb.Empty, error)

func (*Server) JobStream

func (rpc *Server) JobStream(stream listenerrpc.ListenerRPC_JobStreamServer) error

func (*Server) Kill

func (rpc *Server) Kill(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) ListAddon added in v0.0.2

func (rpc *Server) ListAddon(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) ListArtifact added in v0.0.3

func (rpc *Server) ListArtifact(ctx context.Context, req *clientpb.Empty) (*clientpb.Builders, error)

func (*Server) ListClients

func (rpc *Server) ListClients(ctx context.Context, req *rootpb.Operator) (*clientpb.Clients, error)

func (*Server) ListJobs added in v0.0.2

func (rpc *Server) ListJobs(ctx context.Context, req *clientpb.Empty) (*clientpb.Pipelines, error)

func (*Server) ListListeners

func (rpc *Server) ListListeners(ctx context.Context, req *rootpb.Operator) (*clientpb.Listeners, error)

func (*Server) ListModule added in v0.0.2

func (rpc *Server) ListModule(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) ListPipelines

func (rpc *Server) ListPipelines(ctx context.Context, req *clientpb.Listener) (*clientpb.Pipelines, error)

func (*Server) ListWebsites

func (rpc *Server) ListWebsites(ctx context.Context, req *clientpb.Listener) (*clientpb.Pipelines, error)

func (*Server) LoadAddon added in v0.0.2

func (rpc *Server) LoadAddon(ctx context.Context, req *implantpb.LoadAddon) (*clientpb.Task, error)

func (*Server) LoadModule

func (rpc *Server) LoadModule(ctx context.Context, req *implantpb.LoadModule) (*clientpb.Task, error)

func (*Server) LoginClient

func (rpc *Server) LoginClient(ctx context.Context, req *clientpb.LoginReq) (*clientpb.Client, error)

func (*Server) Ls

func (rpc *Server) Ls(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) MaleficSRDI added in v0.0.3

func (rpc *Server) MaleficSRDI(ctx context.Context, req *clientpb.Builder) (*clientpb.Builder, error)

func (*Server) Mkdir

func (rpc *Server) Mkdir(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) Mv

func (rpc *Server) Mv(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) Netstat

func (rpc *Server) Netstat(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) NewProfile added in v0.0.3

func (rpc *Server) NewProfile(ctx context.Context, req *clientpb.Profile) (*clientpb.Empty, error)

func (*Server) Notify added in v0.0.2

func (rpc *Server) Notify(ctx context.Context, req *clientpb.Event) (*clientpb.Empty, error)

func (*Server) Ping

func (rpc *Server) Ping(ctx context.Context, req *implantpb.Ping) (*clientpb.Task, error)

func (*Server) PipeClose added in v0.0.3

func (rpc *Server) PipeClose(ctx context.Context, req *implantpb.PipeRequest) (*clientpb.Task, error)

func (*Server) PipeRead added in v0.0.3

func (rpc *Server) PipeRead(ctx context.Context, req *implantpb.PipeRequest) (*clientpb.Task, error)

func (*Server) PipeUpload added in v0.0.3

func (rpc *Server) PipeUpload(ctx context.Context, pipe *implantpb.PipeRequest) (*clientpb.Task, error)

func (*Server) Polling added in v0.0.3

func (rpc *Server) Polling(ctx context.Context, req *clientpb.Polling) (*clientpb.Empty, error)

func (*Server) Privs added in v0.0.3

func (rpc *Server) Privs(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) Ps

func (rpc *Server) Ps(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) Pwd

func (rpc *Server) Pwd(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) RefreshModule added in v0.0.2

func (rpc *Server) RefreshModule(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) RegAdd added in v0.0.3

func (*Server) RegDelete added in v0.0.3

func (rpc *Server) RegDelete(ctx context.Context, req *implantpb.RegistryRequest) (*clientpb.Task, error)

func (*Server) RegListKey added in v0.0.3

func (rpc *Server) RegListKey(ctx context.Context, req *implantpb.RegistryRequest) (*clientpb.Task, error)

func (*Server) RegListValue added in v0.0.3

func (rpc *Server) RegListValue(ctx context.Context, req *implantpb.RegistryRequest) (*clientpb.Task, error)

func (*Server) RegQuery added in v0.0.3

func (rpc *Server) RegQuery(ctx context.Context, req *implantpb.RegistryRequest) (*clientpb.Task, error)

func (*Server) Register

func (rpc *Server) Register(ctx context.Context, req *clientpb.RegisterSession) (*clientpb.Empty, error)

func (*Server) RegisterListener

func (rpc *Server) RegisterListener(ctx context.Context, req *clientpb.RegisterListener) (*clientpb.Empty, error)

func (*Server) RegisterPipeline

func (rpc *Server) RegisterPipeline(ctx context.Context, req *clientpb.Pipeline) (*clientpb.Empty, error)

func (*Server) RegisterWebsite

func (rpc *Server) RegisterWebsite(ctx context.Context, req *clientpb.Pipeline) (*clientpb.WebsiteResponse, error)

func (*Server) RemoveClient

func (rpc *Server) RemoveClient(ctx context.Context, req *rootpb.Operator) (*rootpb.Response, error)

func (*Server) RemoveListener

func (rpc *Server) RemoveListener(ctx context.Context, req *rootpb.Operator) (*rootpb.Response, error)

func (*Server) Rm

func (rpc *Server) Rm(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) Runas added in v0.0.3

func (rpc *Server) Runas(ctx context.Context, req *implantpb.RunAsRequest) (*clientpb.Task, error)

func (*Server) ServiceCreate added in v0.0.3

func (rpc *Server) ServiceCreate(ctx context.Context, req *implantpb.ServiceRequest) (*clientpb.Task, error)

func (*Server) ServiceDelete added in v0.0.3

func (rpc *Server) ServiceDelete(ctx context.Context, req *implantpb.ServiceRequest) (*clientpb.Task, error)

func (*Server) ServiceList added in v0.0.3

func (rpc *Server) ServiceList(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) ServiceQuery added in v0.0.3

func (rpc *Server) ServiceQuery(ctx context.Context, req *implantpb.ServiceRequest) (*clientpb.Task, error)

func (*Server) ServiceStart added in v0.0.3

func (rpc *Server) ServiceStart(ctx context.Context, req *implantpb.ServiceRequest) (*clientpb.Task, error)

func (*Server) ServiceStop added in v0.0.3

func (rpc *Server) ServiceStop(ctx context.Context, req *implantpb.ServiceRequest) (*clientpb.Task, error)

func (*Server) SessionEvent added in v0.0.2

func (rpc *Server) SessionEvent(ctx context.Context, req *clientpb.Event) (*clientpb.Empty, error)

func (*Server) SessionManage added in v0.0.3

func (rpc *Server) SessionManage(ctx context.Context, req *clientpb.BasicUpdateSession) (*clientpb.Empty, error)

func (*Server) SetEnv added in v0.0.3

func (rpc *Server) SetEnv(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) ShellcodeEncode added in v0.0.3

func (rpc *Server) ShellcodeEncode(ctx context.Context, req *clientpb.ShellcodeEncode) (*clientpb.Bin, error)

func (*Server) Sleep added in v0.0.3

func (rpc *Server) Sleep(ctx context.Context, req *implantpb.Timer) (*clientpb.Task, error)

sleep

func (*Server) SpiteStream

func (rpc *Server) SpiteStream(stream listenerrpc.ListenerRPC_SpiteStreamServer) error

func (*Server) StartPipeline added in v0.0.3

func (rpc *Server) StartPipeline(ctx context.Context, req *clientpb.CtrlPipeline) (*clientpb.Empty, error)

func (*Server) StartWebsite

func (rpc *Server) StartWebsite(ctx context.Context, req *clientpb.CtrlPipeline) (*clientpb.Empty, error)

func (*Server) StopPipeline added in v0.0.3

func (rpc *Server) StopPipeline(ctx context.Context, req *clientpb.CtrlPipeline) (*clientpb.Empty, error)

func (*Server) StopWebsite

func (rpc *Server) StopWebsite(ctx context.Context, req *clientpb.CtrlPipeline) (*clientpb.Empty, error)

func (*Server) StreamGenericHandler added in v0.0.2

func (rpc *Server) StreamGenericHandler(ctx context.Context, req *GenericRequest) (chan *implantpb.Spite, chan *implantpb.Spite, error)

StreamGenericHandler - Generic handler for async request/response's for beacon tasks

func (*Server) Suicide added in v0.0.3

func (rpc *Server) Suicide(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) Sync

func (rpc *Server) Sync(ctx context.Context, req *clientpb.Sync) (*clientpb.SyncResp, error)

func (*Server) SysInfo

func (rpc *Server) SysInfo(ctx context.Context, req *implantpb.SysInfo) (*clientpb.Empty, error)

func (*Server) TaskSchdCreate added in v0.0.3

func (rpc *Server) TaskSchdCreate(ctx context.Context, req *implantpb.TaskScheduleRequest) (*clientpb.Task, error)

func (*Server) TaskSchdDelete added in v0.0.3

func (rpc *Server) TaskSchdDelete(ctx context.Context, req *implantpb.TaskScheduleRequest) (*clientpb.Task, error)

func (*Server) TaskSchdList added in v0.0.3

func (rpc *Server) TaskSchdList(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) TaskSchdQuery added in v0.0.3

func (rpc *Server) TaskSchdQuery(ctx context.Context, req *implantpb.TaskScheduleRequest) (*clientpb.Task, error)

func (*Server) TaskSchdRun added in v0.0.3

func (rpc *Server) TaskSchdRun(ctx context.Context, req *implantpb.TaskScheduleRequest) (*clientpb.Task, error)

func (*Server) TaskSchdStart added in v0.0.3

func (rpc *Server) TaskSchdStart(ctx context.Context, req *implantpb.TaskScheduleRequest) (*clientpb.Task, error)

func (*Server) TaskSchdStop added in v0.0.3

func (rpc *Server) TaskSchdStop(ctx context.Context, req *implantpb.TaskScheduleRequest) (*clientpb.Task, error)

func (*Server) UnsetEnv added in v0.0.3

func (rpc *Server) UnsetEnv(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) Upload

func (rpc *Server) Upload(ctx context.Context, req *implantpb.UploadRequest) (*clientpb.Task, error)

Upload - Upload a file from the remote file system

func (*Server) UploadArtifact added in v0.0.3

func (rpc *Server) UploadArtifact(ctx context.Context, req *clientpb.Builder) (*clientpb.Builder, error)

func (*Server) UploadWebsite added in v0.0.2

func (rpc *Server) UploadWebsite(ctx context.Context, req *clientpb.Website) (*clientpb.Empty, error)

func (*Server) WaitTaskContent

func (rpc *Server) WaitTaskContent(ctx context.Context, req *clientpb.Task) (*clientpb.TaskContext, error)

func (*Server) WaitTaskFinish added in v0.0.2

func (rpc *Server) WaitTaskFinish(ctx context.Context, req *clientpb.Task) (*clientpb.TaskContext, error)

func (*Server) Website

func (rpc *Server) Website(ctx context.Context, req *clientpb.Website) (*clientpb.Website, error)

Website - Get one website

func (*Server) WebsiteAddContent

func (rpc *Server) WebsiteAddContent(ctx context.Context, req *clientpb.WebsiteAddContent) (*clientpb.Website, error)

WebsiteAddContent - Add content to a website, the website is created if `name` does not exist

func (*Server) WebsiteRemove

func (rpc *Server) WebsiteRemove(ctx context.Context, req *clientpb.Website) (*clientpb.Empty, error)

func (*Server) WebsiteRemoveContent

func (rpc *Server) WebsiteRemoveContent(ctx context.Context, req *clientpb.WebsiteRemoveContent) (*clientpb.Website, error)

WebsiteRemoveContent - Remove specific content from a website

func (*Server) WebsiteUpdateContent

func (rpc *Server) WebsiteUpdateContent(ctx context.Context, req *clientpb.WebsiteAddContent) (*clientpb.Website, error)

WebsiteUpdateContent - Update specific content from a website, currently you can only the update Content-type field

func (*Server) Websites

func (rpc *Server) Websites(ctx context.Context, _ *clientpb.Empty) (*clientpb.Websites, error)

func (*Server) Whoami

func (rpc *Server) Whoami(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)

func (*Server) WmiExecute added in v0.0.3

func (rpc *Server) WmiExecute(ctx context.Context, req *implantpb.WmiMethodRequest) (*clientpb.Task, error)

func (*Server) WmiQuery added in v0.0.3

func (rpc *Server) WmiQuery(ctx context.Context, req *implantpb.WmiQueryRequest) (*clientpb.Task, error)

Jump to

Keyboard shortcuts

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