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(bindIface string, lport uint16, domains []string, canaries bool) *dns.Server
- func StartDNSListenerJob(bindIface string, lport uint16, domains []string, canaries bool) (*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)
- func StartWGListener(port uint16, netstackPort uint16, keyExchangeListenPort uint16) (net.Listener, *device.Device, *bytes.Buffer, error)
- func StartWGListenerJob(listenPort uint16, nListenPort uint16, keyExchangeListenPort uint16) (*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 StartDNSListenerJob(bindIface string, lport uint16, domains []string, canaries bool) (*core.Job, error)
StartDNSListenerJob - Start a DNS listener as a job
func StartHTTPListenerJob ¶
func StartHTTPListenerJob(conf *HTTPServerConfig) (*core.Job, error)
StartHTTPListenerJob - Start a HTTP listener as a job
func StartHTTPStagerListenerJob ¶
func StartHTTPStagerListenerJob(conf *HTTPServerConfig, data []byte) (*core.Job, error)
StartHTTPStagerListenerJob - Start an HTTP(S) stager payload listener
func StartMTLSListenerJob ¶
StartMTLSListenerJob - Start an mTLS listener as a job
func StartMutualTLSListener ¶
StartMutualTLSListener - Start a mutual TLS listener
func StartPersistentJobs ¶
func StartPersistentJobs(cfg *configs.ServerConfig) error
StartPersistentJobs - Start persistent jobs
func StartPivotListener ¶
func StartPivotListener() error
StartPivotListener - Starts listening for pivot messages
func StartTCPListener ¶
StartTCPListener - Start a TCP listener
func StartTCPStagerListenerJob ¶
StartTCPStagerListenerJob - Start a TCP staging payload listener
func StartWGListener ¶ added in v1.4.9
func StartWGListener(port uint16, netstackPort uint16, keyExchangeListenPort uint16) (net.Listener, *device.Device, *bytes.Buffer, error)
StartWGListener - First ceates an inet.af network stack. then creates a Wireguard device/interface and applies configuration. Go routines are spun up to handle key exchange connections, as well as c2 comms connections.
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 ¶
AddSession - Add a sliver to the core (atomically)
func (*PivotsMap) RemoveSession ¶
RemoveSession - Remove a session from the core (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