Documentation
¶
Index ¶
- Constants
- Variables
- func InitLogs(debug bool)
- func StartClientListener(address string) (*grpc.Server, net.Listener, error)
- type GenericRequest
- type Server
- func (rpc *Server) AddClient(ctx context.Context, req *rootpb.Operator) (*rootpb.Response, error)
- func (rpc *Server) AddListener(ctx context.Context, req *rootpb.Operator) (*rootpb.Response, error)
- func (rpc *Server) BasicSessionOP(ctx context.Context, req *clientpb.BasicUpdateSession) (*clientpb.Empty, error)
- func (rpc *Server) Broadcast(ctx context.Context, req *clientpb.Event) (*clientpb.Empty, error)
- func (rpc *Server) Bypass(ctx context.Context, req *implantpb.BypassRequest) (*clientpb.Task, error)
- func (rpc *Server) CancelTask(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)
- func (rpc *Server) Cat(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)
- func (rpc *Server) Cd(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)
- func (rpc *Server) Chmod(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)
- func (rpc *Server) Chown(ctx context.Context, req *implantpb.ChownRequest) (*clientpb.Task, error)
- func (rpc *Server) Clear(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)
- func (rpc *Server) Cp(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)
- func (rpc *Server) Curl(ctx context.Context, req *implantpb.CurlRequest) (*clientpb.Task, error)
- func (rpc *Server) Download(ctx context.Context, req *implantpb.DownloadRequest) (*clientpb.Task, error)
- func (rpc *Server) Env(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)
- func (rpc *Server) Events(_ *clientpb.Empty, stream clientrpc.MaliceRPC_EventsServer) error
- func (rpc *Server) Execute(ctx context.Context, req *implantpb.ExecRequest) (*clientpb.Task, error)
- func (rpc *Server) ExecuteAddon(ctx context.Context, req *implantpb.ExecuteAddon) (*clientpb.Task, error)
- func (rpc *Server) ExecuteArmory(ctx context.Context, req *implantpb.ExecuteBinary) (*clientpb.Task, error)
- func (rpc *Server) ExecuteAssembly(ctx context.Context, req *implantpb.ExecuteBinary) (*clientpb.Task, error)
- func (rpc *Server) ExecuteBof(ctx context.Context, req *implantpb.ExecuteBinary) (*clientpb.Task, error)
- func (rpc *Server) ExecuteDll(ctx context.Context, req *implantpb.ExecuteBinary) (*clientpb.Task, error)
- func (rpc *Server) ExecuteEXE(ctx context.Context, req *implantpb.ExecuteBinary) (*clientpb.Task, error)
- func (rpc *Server) ExecutePowershell(ctx context.Context, req *implantpb.ExecuteBinary) (*clientpb.Task, error)
- func (rpc *Server) ExecuteShellcode(ctx context.Context, req *implantpb.ExecuteBinary) (*clientpb.Task, error)
- func (rpc *Server) GenericHandler(ctx context.Context, req *GenericRequest) (chan *implantpb.Spite, error)
- func (rpc *Server) GetAlivedSessions(ctx context.Context, _ *clientpb.Empty) (*clientpb.Sessions, error)
- func (rpc *Server) GetAllTaskContent(ctx context.Context, req *clientpb.Task) (*clientpb.TaskContexts, error)
- func (rpc *Server) GetBasic(ctx context.Context, _ *clientpb.Empty) (*clientpb.Basic, error)
- func (rpc *Server) GetClients(ctx context.Context, req *clientpb.Empty) (*clientpb.Clients, error)
- func (rpc *Server) GetListeners(ctx context.Context, req *clientpb.Empty) (*clientpb.Listeners, error)
- func (rpc *Server) GetSession(ctx context.Context, req *clientpb.SessionRequest) (*clientpb.Session, error)
- func (rpc *Server) GetSessions(ctx context.Context, _ *clientpb.Empty) (*clientpb.Sessions, error)
- func (rpc *Server) GetTaskContent(ctx context.Context, req *clientpb.Task) (*clientpb.TaskContext, error)
- func (rpc *Server) GetTaskFiles(ctx context.Context, req *clientpb.Session) (*clientpb.Files, error)
- func (rpc *Server) GetTasks(ctx context.Context, session *clientpb.Session) (*clientpb.Tasks, error)
- func (rpc *Server) Info(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)
- func (rpc *Server) JobStream(stream listenerrpc.ListenerRPC_JobStreamServer) error
- func (rpc *Server) Kill(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)
- func (rpc *Server) ListAddon(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)
- func (rpc *Server) ListClientsAuth(ctx context.Context, req *rootpb.Operator) (*clientpb.Clients, error)
- func (rpc *Server) ListJobs(ctx context.Context, req *clientpb.Empty) (*lispb.Pipelines, error)
- func (rpc *Server) ListListenersAuth(ctx context.Context, req *rootpb.Operator) (*clientpb.Listeners, error)
- func (rpc *Server) ListModule(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)
- func (rpc *Server) ListTcpPipelines(ctx context.Context, req *lispb.ListenerName) (*lispb.Pipelines, error)
- func (rpc *Server) ListWebsites(ctx context.Context, req *lispb.ListenerName) (*lispb.Websites, error)
- func (rpc *Server) LoadAddon(ctx context.Context, req *implantpb.LoadAddon) (*clientpb.Task, error)
- func (rpc *Server) LoadModule(ctx context.Context, req *implantpb.LoadModule) (*clientpb.Task, error)
- func (rpc *Server) LoginClient(ctx context.Context, req *clientpb.LoginReq) (*clientpb.Client, error)
- func (rpc *Server) Ls(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)
- func (rpc *Server) Mkdir(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)
- func (rpc *Server) Mv(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)
- func (rpc *Server) Netstat(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)
- func (rpc *Server) NewPipeline(ctx context.Context, req *lispb.Pipeline) (*clientpb.Empty, error)
- func (rpc *Server) NewWebsite(ctx context.Context, req *lispb.Pipeline) (*clientpb.Empty, error)
- func (rpc *Server) Notify(ctx context.Context, req *clientpb.Event) (*clientpb.Empty, error)
- func (rpc *Server) Ping(ctx context.Context, req *implantpb.Ping) (*implantpb.Empty, error)
- func (rpc *Server) Ps(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)
- func (rpc *Server) Pwd(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)
- func (rpc *Server) RefreshModule(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)
- func (rpc *Server) Register(ctx context.Context, req *lispb.RegisterSession) (*implantpb.Empty, error)
- func (rpc *Server) RegisterListener(ctx context.Context, req *lispb.RegisterListener) (*implantpb.Empty, error)
- func (rpc *Server) RegisterPipeline(ctx context.Context, req *lispb.Pipeline) (*implantpb.Empty, error)
- func (rpc *Server) RegisterWebsite(ctx context.Context, req *lispb.Pipeline) (*implantpb.Empty, error)
- func (rpc *Server) RemoveClient(ctx context.Context, req *rootpb.Operator) (*rootpb.Response, error)
- func (rpc *Server) RemoveListener(ctx context.Context, req *rootpb.Operator) (*rootpb.Response, error)
- func (rpc *Server) Rm(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)
- func (rpc *Server) SessionEvent(ctx context.Context, req *clientpb.Event) (*clientpb.Empty, error)
- func (rpc *Server) Setenv(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)
- func (rpc *Server) SpiteStream(stream listenerrpc.ListenerRPC_SpiteStreamServer) error
- func (rpc *Server) StartTcpPipeline(ctx context.Context, req *lispb.CtrlPipeline) (*clientpb.Empty, error)
- func (rpc *Server) StartWebsite(ctx context.Context, req *lispb.CtrlPipeline) (*clientpb.Empty, error)
- func (rpc *Server) StopTcpPipeline(ctx context.Context, req *lispb.CtrlPipeline) (*clientpb.Empty, error)
- func (rpc *Server) StopWebsite(ctx context.Context, req *lispb.CtrlPipeline) (*clientpb.Empty, error)
- func (rpc *Server) StreamGenericHandler(ctx context.Context, req *GenericRequest) (chan *implantpb.Spite, chan *implantpb.Spite, error)
- func (rpc *Server) Sync(ctx context.Context, req *clientpb.Sync) (*clientpb.SyncResp, error)
- func (rpc *Server) SysInfo(ctx context.Context, req *implantpb.SysInfo) (*implantpb.Empty, error)
- func (rpc *Server) Unsetenv(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)
- func (rpc *Server) Upload(ctx context.Context, req *implantpb.UploadRequest) (*clientpb.Task, error)
- func (rpc *Server) UploadWebsite(ctx context.Context, req *lispb.WebsiteAssets) (*clientpb.Empty, error)
- func (rpc *Server) WaitTaskContent(ctx context.Context, req *clientpb.Task) (*clientpb.TaskContext, error)
- func (rpc *Server) WaitTaskFinish(ctx context.Context, req *clientpb.Task) (*clientpb.TaskContext, error)
- func (rpc *Server) Website(ctx context.Context, req *lispb.Website) (*lispb.Website, error)
- func (rpc *Server) WebsiteAddContent(ctx context.Context, req *lispb.WebsiteAddContent) (*lispb.Website, error)
- func (rpc *Server) WebsiteRemove(ctx context.Context, req *lispb.Website) (*clientpb.Empty, error)
- func (rpc *Server) WebsiteRemoveContent(ctx context.Context, req *lispb.WebsiteRemoveContent) (*lispb.Website, error)
- func (rpc *Server) WebsiteUpdateContent(ctx context.Context, req *lispb.WebsiteAddContent) (*lispb.Website, error)
- func (rpc *Server) Websites(ctx context.Context, _ *clientpb.Empty) (*lispb.Websites, error)
- func (rpc *Server) Whoami(ctx context.Context, req *implantpb.Request) (*clientpb.Task, error)
Constants ¶
View Source
const ( Transport contextKey = iota Operator )
Variables ¶
View Source
var ( // ErrInvalidSessionID - Invalid Session ID in request ErrInvalidSessionID = status.Error(codes.InvalidArgument, "Invalid session ID") // ErrMissingRequestField - Returned when a request does not contain a implantpb.Request ErrMissingRequestField = status.Error(codes.InvalidArgument, "Missing session request field") // ErrAsyncNotSupported - Unsupported mode / command type ErrAsyncNotSupported = status.Error(codes.Unavailable, "Async not supported for this command") // ErrDatabaseFailure - Generic database failure error (real error is logged) ErrDatabaseFailure = status.Error(codes.Internal, "Database operation failed") // ErrInvalidName - Invalid name ErrInvalidName = status.Error(codes.InvalidArgument, "Invalid session name, alphanumerics and _-. only") ErrNotFoundSession = status.Error(codes.NotFound, "Session ID not found") ErrNotFoundTask = status.Error(codes.NotFound, "Task ID not found") ErrNotFoundListener = status.Error(codes.NotFound, "Listener not found") ErrNotFoundPipeline = status.Error(codes.NotFound, "Pipeline not found") ErrNotFoundClientName = status.Error(codes.NotFound, "Client name not found") ErrNotFoundTaskContent = status.Error(codes.NotFound, "Task content not found") ErrTaskIndexExceed = status.Error(codes.NotFound, "task index id exceed total") )
Functions ¶
Types ¶
type GenericRequest ¶
func (*GenericRequest) HandlerResponse ¶ added in v0.0.2
func (*GenericRequest) InitSpite ¶ added in v0.0.2
func (r *GenericRequest) InitSpite() (*implantpb.Spite, error)
func (*GenericRequest) SetCallback ¶
func (r *GenericRequest) SetCallback(callback func())
type Server ¶
type Server struct {
// Magical methods to break backwards compatibility
// Here be dragons: https://github.com/grpc/grpc-go/issues/3794
clientrpc.UnimplementedMaliceRPCServer
listenerrpc.UnimplementedImplantRPCServer
listenerrpc.UnimplementedListenerRPCServer
clientrpc.UnimplementedRootRPCServer
}
func (*Server) AddListener ¶
func (*Server) BasicSessionOP ¶
func (*Server) CancelTask ¶ added in v0.0.2
func (*Server) Download ¶
func (rpc *Server) Download(ctx context.Context, req *implantpb.DownloadRequest) (*clientpb.Task, error)
Download - Download a file from implant
func (*Server) ExecuteAddon ¶ added in v0.0.2
func (*Server) ExecuteArmory ¶ added in v0.0.2
func (*Server) ExecuteAssembly ¶
func (*Server) ExecuteBof ¶
func (*Server) ExecuteDll ¶
func (*Server) ExecuteEXE ¶ added in v0.0.2
func (*Server) ExecutePowershell ¶
func (*Server) ExecuteShellcode ¶
func (*Server) GenericHandler ¶ added in v0.0.2
func (*Server) GetAlivedSessions ¶
func (*Server) GetAllTaskContent ¶
func (*Server) GetClients ¶
func (*Server) GetListeners ¶
func (*Server) GetSession ¶
func (*Server) GetSessions ¶
func (*Server) GetTaskContent ¶
func (*Server) GetTaskFiles ¶ added in v0.0.2
func (*Server) JobStream ¶
func (rpc *Server) JobStream(stream listenerrpc.ListenerRPC_JobStreamServer) error
func (*Server) ListClientsAuth ¶ added in v0.0.2
func (*Server) ListListenersAuth ¶ added in v0.0.2
func (*Server) ListModule ¶ added in v0.0.2
func (*Server) ListTcpPipelines ¶ added in v0.0.2
func (*Server) ListWebsites ¶
func (*Server) LoadModule ¶
func (*Server) LoginClient ¶
func (*Server) NewPipeline ¶ added in v0.0.2
func (*Server) NewWebsite ¶ added in v0.0.2
func (*Server) RefreshModule ¶ added in v0.0.2
func (*Server) RegisterListener ¶
func (*Server) RegisterPipeline ¶
func (*Server) RegisterWebsite ¶
func (*Server) RemoveClient ¶
func (*Server) RemoveListener ¶
func (*Server) SessionEvent ¶ added in v0.0.2
func (*Server) SpiteStream ¶
func (rpc *Server) SpiteStream(stream listenerrpc.ListenerRPC_SpiteStreamServer) error
func (*Server) StartTcpPipeline ¶
func (*Server) StartWebsite ¶
func (*Server) StopTcpPipeline ¶
func (*Server) StopWebsite ¶
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) 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) UploadWebsite ¶ added in v0.0.2
func (*Server) WaitTaskContent ¶
func (*Server) WaitTaskFinish ¶ added in v0.0.2
func (*Server) WebsiteAddContent ¶
func (rpc *Server) WebsiteAddContent(ctx context.Context, req *lispb.WebsiteAddContent) (*lispb.Website, error)
WebsiteAddContent - Add content to a website, the website is created if `name` does not exist
func (*Server) WebsiteRemove ¶
func (*Server) WebsiteRemoveContent ¶
func (rpc *Server) WebsiteRemoveContent(ctx context.Context, req *lispb.WebsiteRemoveContent) (*lispb.Website, error)
WebsiteRemoveContent - Remove specific content from a website
func (*Server) WebsiteUpdateContent ¶
func (rpc *Server) WebsiteUpdateContent(ctx context.Context, req *lispb.WebsiteAddContent) (*lispb.Website, error)
WebsiteUpdateContent - Update specific content from a website, currently you can only the update Content-type field
Click to show internal directories.
Click to hide internal directories.