Documentation ¶
Index ¶
- Variables
- func HandlePivotClose(session *core.Session, data []byte)
- func HandlePivotData(session *core.Session, data []byte)
- func HandlePivotOpen(session *core.Session, data []byte)
- func StartDNSListener(domains []string, canaries bool) *dns.Server
- func StartDNSListenerJob(domains []string, canaries bool, listenPort uint16) (*core.Job, error)
- func StartHTTPListenerJob(conf *HTTPServerConfig) (*core.Job, error)
- func StartHTTPStagerListenerJob(conf *HTTPServerConfig, data []byte) (*core.Job, error)
- func StartMTLSListenerJob(host string, listenPort uint16) (*core.Job, error)
- func StartMutualTLSListener(bindIface string, port uint16) (net.Listener, error)
- func StartPersistentJobs(cfg *configs.ServerConfig) error
- func StartPivotListener() error
- func StartTCPListener(bindIface string, port uint16, data []byte) (net.Listener, error)
- func StartTCPStagerListenerJob(host string, port uint16, shellcode []byte) (*core.Job, error)
- type DNSSession
- type HTTPHandler
- type HTTPServerConfig
- type HTTPSession
- type HTTPSessions
- type PivotsMap
- type SendBlock
- type SliverHTTPC2
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func HandlePivotClose ¶
HandlePivotClose - Handles a PivotClose message
func HandlePivotData ¶
HandlePivotData - Handles a PivotData message
func HandlePivotOpen ¶
HandlePivotOpen - Handles a PivotOpen message
func StartDNSListener ¶
StartDNSListener - Start a DNS listener
func StartDNSListenerJob ¶
func StartHTTPListenerJob ¶
func StartHTTPListenerJob(conf *HTTPServerConfig) (*core.Job, error)
func StartHTTPStagerListenerJob ¶
func StartHTTPStagerListenerJob(conf *HTTPServerConfig, data []byte) (*core.Job, error)
StartHTTPStagerListener - Start an HTTP(S) stager payload listener
func StartMTLSListenerJob ¶
func StartMutualTLSListener ¶
StartMutualTLSListener - Start a mutual TLS listener
func StartPersistentJobs ¶
func StartPersistentJobs(cfg *configs.ServerConfig) error
Start persistent jobs
func StartPivotListener ¶
func StartPivotListener() error
StartPivotListener - Starts listening for pivot messages
func StartTCPListener ¶
StartTCPListener - Start a TCP listener
Types ¶
type DNSSession ¶
type DNSSession struct { ID string Session *core.Session Key cryptography.AESKey // contains filtered or unexported fields }
DNSSession - Holds DNS session information
type HTTPHandler ¶
type HTTPHandler func(resp http.ResponseWriter, req *http.Request)
HTTPHandler - Path mapped to a handler function
type HTTPServerConfig ¶
type HTTPServerConfig struct { Addr string LPort uint16 Domain string Website string Secure bool Cert []byte Key []byte ACME bool }
HTTPServerConfig - Config data for servers
type HTTPSession ¶
type HTTPSession struct { ID string Session *core.Session Key cryptography.AESKey Started time.Time // contains filtered or unexported fields }
HTTPSession - Holds data related to a sliver c2 session
type HTTPSessions ¶
type HTTPSessions struct {
// contains filtered or unexported fields
}
HTTPSessions - All currently open HTTP sessions
func (*HTTPSessions) Add ¶
func (s *HTTPSessions) Add(session *HTTPSession)
Add - Add an HTTP session
func (*HTTPSessions) Get ¶
func (s *HTTPSessions) Get(sessionID string) *HTTPSession
Get - Get an HTTP session
func (*HTTPSessions) Remove ¶
func (s *HTTPSessions) Remove(sessionID string)
Remove - Remove an HTTP session
type PivotsMap ¶
type PivotsMap struct { Pivots *map[uint32]*core.Session // contains filtered or unexported fields }
PivotsMap - Mananges the pivots, provides atomic access
func (*PivotsMap) AddSession ¶
AddSliver - Add a sliver to the hive (atomically)
func (*PivotsMap) RemoveSession ¶
RemoveSliver - Remove a session from the hive (atomically)
type SliverHTTPC2 ¶
type SliverHTTPC2 struct { HTTPServer *http.Server Conf *HTTPServerConfig HTTPSessions *HTTPSessions SliverStage []byte // Sliver shellcode to serve during staging process Cleanup func() // contains filtered or unexported fields }
SliverHTTPC2 - Holds refs to all the C2 objects
func StartHTTPSListener ¶
func StartHTTPSListener(conf *HTTPServerConfig) (*SliverHTTPC2, error)
StartHTTPSListener - Start an HTTP(S) listener, this can be used to start both
HTTP/HTTPS depending on the caller's conf
TODO: Better error handling, configurable ACME host/port
func (*SliverHTTPC2) DefaultRespHeaders ¶
func (s *SliverHTTPC2) DefaultRespHeaders(next http.Handler) http.Handler
DefaultRespHeaders - Configures default response headers