Documentation
¶
Index ¶
- Constants
- func GCMDecrypt(key AESKey, ciphertext []byte) ([]byte, error)
- func GCMEncrypt(key AESKey, plaintext []byte) ([]byte, error)
- func GetActiveC2() string
- func GetProxyURL() string
- func GetReconnectInterval() time.Duration
- func GetTNet() *netstack.Net
- func GetTUNAddress() string
- func LookupDomainKey(selector string, parentDomain string) ([]byte, error)
- func RSADecrypt(ciphertext []byte, privateKey *rsa.PrivateKey) ([]byte, error)
- func RSAEncrypt(msg []byte, pub *rsa.PublicKey) ([]byte, error)
- type AESIV
- type AESKey
- type BlockReassembler
- type Connection
- type Jar
- type RecvBlock
- type SliverHTTPClient
- type Tunnel
Constants ¶
const ( // AESKeySize - Always use 256 bit keys AESKeySize = 16 // GCMNonceSize - 96 bit nonces for GCM GCMNonceSize = 12 )
Variables ¶
This section is empty.
Functions ¶
func GCMDecrypt ¶
GCMDecrypt - Decrypt GCM ciphertext
func GCMEncrypt ¶
GCMEncrypt - Encrypt using AES GCM
func GetReconnectInterval ¶
GetReconnectInterval - Parse the reconnect interval inserted at compile-time
func GetTUNAddress ¶ added in v1.4.12
func GetTUNAddress() string
func LookupDomainKey ¶
LookupDomainKey - Attempt to get the server's RSA public key
func RSADecrypt ¶
func RSADecrypt(ciphertext []byte, privateKey *rsa.PrivateKey) ([]byte, error)
RSADecrypt - Decrypt ciphertext with rsa private key
Types ¶
type AESKey ¶
type AESKey [AESKeySize]byte
AESKey - 128 bit key
func RandomAESKey ¶
func RandomAESKey() AESKey
RandomAESKey - Generate random ID of randomIDSize bytes
type BlockReassembler ¶
BlockReassembler - Data is encoded and split into `Blocks`
type Connection ¶
type Connection struct { Send chan *pb.Envelope Recv chan *pb.Envelope IsOpen bool // contains filtered or unexported fields }
Connection - Abstract connection to the server
func GetActiveConnection ¶
func GetActiveConnection() *Connection
GetActiveConnection returns the Connection of the C2 in use
func StartConnectionLoop ¶
func StartConnectionLoop() *Connection
StartConnectionLoop - Starts the main connection loop
func (*Connection) AddTunnel ¶
func (c *Connection) AddTunnel(tun *Tunnel)
AddTunnel - Add tunnel to mapping
func (*Connection) RemoveTunnel ¶
func (c *Connection) RemoveTunnel(ID uint64)
RemoveTunnel - Add tunnel to mapping
func (*Connection) Tunnel ¶
func (c *Connection) Tunnel(ID uint64) *Tunnel
Tunnel - Add tunnel to mapping
type Jar ¶
type Jar struct {
// contains filtered or unexported fields
}
Jar - CookieJar implementation that ignores domains/origins
type SliverHTTPClient ¶
type SliverHTTPClient struct { Origin string Client *http.Client ProxyURL string SessionKey *AESKey SessionID string }
SliverHTTPClient - Helper struct to keep everything together
func HTTPStartSession ¶
func HTTPStartSession(address string) (*SliverHTTPClient, error)
HTTPStartSession - Attempts to start a session with a given address
func (*SliverHTTPClient) Poll ¶
func (s *SliverHTTPClient) Poll() ([]byte, error)
Poll - Perform an HTTP GET request
func (*SliverHTTPClient) Send ¶
func (s *SliverHTTPClient) Send(data []byte) error
Send - Perform an HTTP POST request
func (*SliverHTTPClient) SessionInit ¶
func (s *SliverHTTPClient) SessionInit() error
SessionInit - Initialize the session
type Tunnel ¶
type Tunnel struct { ID uint64 Reader io.ReadCloser ReadSequence uint64 Writer io.WriteCloser WriteSequence uint64 }
Tunnel - Duplex byte read/write