Documentation
¶
Index ¶
- Variables
- func CurrentJobID() uint32
- func NextCtrlID() uint32
- func NextJobID() uint32
- type Cache
- func (c *Cache) AddMessage(spite *implantpb.Spite, cur int)
- func (c *Cache) GetAll()
- func (c *Cache) GetLastMessage(taskID int) (*implantpb.Spite, bool)
- func (c *Cache) GetMessage(taskID, cur int) (*implantpb.Spite, bool)
- func (c *Cache) GetMessages(taskID int) ([]*implantpb.Spite, bool)
- func (c *Cache) Load() error
- func (c *Cache) Save() error
- func (c *Cache) SetSize(size int)
- type Client
- type Connection
- type Event
- type Forward
- type Job
- type Listener
- type Message
- type Pipeline
- type Pipelines
- type Session
- func (s *Session) AllTask() []*Task
- func (s *Session) DeleteResp(taskId uint32)
- func (s *Session) GetResp(taskId uint32) (chan *implantpb.Spite, bool)
- func (s *Session) Logger() *logs.Logger
- func (s *Session) NewTask(name string, total int) *Task
- func (s *Session) Request(msg *lispb.SpiteSession, stream grpc.ServerStream, timeout time.Duration) error
- func (s *Session) RequestAndWait(msg *lispb.SpiteSession, stream grpc.ServerStream, timeout time.Duration) (*implantpb.Spite, error)
- func (s *Session) RequestWithAsync(msg *lispb.SpiteSession, stream grpc.ServerStream, timeout time.Duration) (chan *implantpb.Spite, error)
- func (s *Session) RequestWithStream(msg *lispb.SpiteSession, stream grpc.ServerStream, timeout time.Duration) (chan *implantpb.Spite, chan *implantpb.Spite, error)
- func (s *Session) SetLastTaskId(id uint32)
- func (s *Session) StoreResp(taskId uint32, ch chan *implantpb.Spite)
- func (s *Session) ToProtobuf() *clientpb.Session
- func (s *Session) Update(req *lispb.RegisterSession)
- func (s *Session) UpdateLastCheckin()
- func (s *Session) UpdateSysInfo(info *implantpb.SysInfo)
- type Task
- type Tasks
- type Ticker
- type Website
- type Websites
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Sessions - Manages implant connections Sessions = &sessions{ active: &sync.Map{}, } ExtensionModules = []string{consts.ModuleExecuteBof, consts.ModuleExecuteDll} // ErrUnknownMessageType - Returned if the implant did not understand the message for // example when the command is not supported on the platform ErrUnknownMessageType = errors.New("unknown message type") // ErrImplantSendTimeout - The implant did not respond prior to timeout deadline ErrImplantSendTimeout = errors.New("implant timeout") )
View Source
var ( // Clients - Manages client active Clients = &clients{ mutex: &sync.Mutex{}, active: map[int]*Client{}, } )
View Source
var ( Connections = &connections{ connections: &sync.Map{}, } )
View Source
var (
// EventBroker - Distributes event messages
EventBroker = newBroker()
)
View Source
var ( Forwarders = &forwarders{ forwarders: &sync.Map{}, } )
View Source
var ( Listeners = listeners{ &sync.Map{}, } )
Functions ¶
func CurrentJobID ¶
func CurrentJobID() uint32
func NextCtrlID ¶
func NextCtrlID() uint32
Types ¶
type Connection ¶
type Connection struct {
RawID []byte
SessionID string
LastMessage time.Time
C chan *implantpb.Spite // spite
Sender chan *implantpb.Spites
Alive bool
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(rawid []byte) *Connection
type Forward ¶
type Forward struct {
Pipeline
ImplantRpc listenerrpc.ImplantRPCClient
ListenerRpc listenerrpc.ListenerRPCClient
// contains filtered or unexported fields
}
Forward is a struct that handles messages from listener and server
func NewForward ¶
func NewForward(conn *grpc.ClientConn, pipeline Pipeline) (*Forward, error)
type Job ¶
func (*Job) ToProtobuf ¶
type Listener ¶
func (*Listener) ToProtobuf ¶
type Pipelines ¶
func (Pipelines) ToProtobuf ¶
type Session ¶
type Session struct {
PipelineID string
ID string
Name string
Group string
RemoteAddr string
Os *implantpb.Os
Process *implantpb.Process
Timer *implantpb.Timer
Filepath string
WordDir string
ProxyURL string
Modules []string
Extensions *implantpb.Extensions
Locale string
Tasks *Tasks // task manager
*Cache
// contains filtered or unexported fields
}
Session - Represents a connection to an implant
func NewSession ¶
func NewSession(req *lispb.RegisterSession) *Session
func (*Session) DeleteResp ¶
func (*Session) Request ¶
func (s *Session) Request(msg *lispb.SpiteSession, stream grpc.ServerStream, timeout time.Duration) error
Request
func (*Session) RequestAndWait ¶
func (s *Session) RequestAndWait(msg *lispb.SpiteSession, stream grpc.ServerStream, timeout time.Duration) (*implantpb.Spite, error)
func (*Session) RequestWithAsync ¶
func (s *Session) RequestWithAsync(msg *lispb.SpiteSession, stream grpc.ServerStream, timeout time.Duration) (chan *implantpb.Spite, error)
func (*Session) RequestWithStream ¶
func (s *Session) RequestWithStream(msg *lispb.SpiteSession, stream grpc.ServerStream, timeout time.Duration) (chan *implantpb.Spite, chan *implantpb.Spite, error)
RequestWithStream - 'async' means that the response is not returned immediately, but is returned through the channel 'ch
func (*Session) SetLastTaskId ¶
func (*Session) ToProtobuf ¶
func (*Session) Update ¶
func (s *Session) Update(req *lispb.RegisterSession)
func (*Session) UpdateLastCheckin ¶
func (s *Session) UpdateLastCheckin()
func (*Session) UpdateSysInfo ¶
type Task ¶
type Task struct {
Id uint32
Type string
SessionId string
Cur int
Total int
Callback func()
Ctx context.Context
Cancel context.CancelFunc
Status *implantpb.Spite //
// contains filtered or unexported fields
}
func (*Task) ToProtobuf ¶
type Tasks ¶
type Tasks struct {
// contains filtered or unexported fields
}
func (*Tasks) ToProtobuf ¶
type Ticker ¶
type Ticker struct {
// contains filtered or unexported fields
}
var (
GlobalTicker *Ticker
)
Click to show internal directories.
Click to hide internal directories.