Documentation ¶
Index ¶
- Constants
- Variables
- func GetCodename() string
- func GetSliversDir() string
- func ProfileSave(name string, config *SliverConfig) error
- func Profiles() map[string]*SliverConfig
- func ShellcodeRDI(dllPath string, functionName string) (shellcode []byte, err error)
- func ShellcodeRDIToFile(dllPath string, functionName string) (shellcodePath string, err error)
- func SliverConfigMap() (map[string]*SliverConfig, error)
- func SliverConfigSave(config *SliverConfig) error
- func SliverEgg(config SliverConfig) (string, error)
- func SliverExecutable(config *SliverConfig) (string, error)
- func SliverFileByName(name string) ([]byte, error)
- func SliverFileSave(name, fpath string) error
- func SliverFiles() ([]string, error)
- func SliverSharedLibrary(config *SliverConfig) (string, error)
- func UpdateCanary(canary *DNSCanary) error
- type CanaryGenerator
- type DNSCanary
- type SliverC2
- type SliverConfig
Constants ¶
const ( // WINDOWS OS WINDOWS = "windows" // DARWIN / MacOS DARWIN = "darwin" // LINUX OS LINUX = "linux" // DefaultReconnectInterval - In seconds DefaultReconnectInterval = 60 // DefaultMTLSLPort - Default listen port DefaultMTLSLPort = 8888 // DefaultHTTPLPort - Default HTTP listen port DefaultHTTPLPort = 443 // Assume SSL, it'll fallback // SliverCC64EnvVar - Environment variable that can specify the 64 bit mingw path SliverCC64EnvVar = "SLIVER_CC_64" // SliverCC32EnvVar - Environment variable that can specify the 32 bit mingw path SliverCC32EnvVar = "SLIVER_CC_32" )
const (
// CanaryBucketName - DNS Canary bucket name
CanaryBucketName = "canaries"
)
Variables ¶
var ( // ErrSliverNotFound - More descriptive 'key not found' error ErrSliverNotFound = errors.New("Sliver not found") )
Functions ¶
func ProfileSave ¶
func ProfileSave(name string, config *SliverConfig) error
ProfileSave - Save a sliver profile to disk
func Profiles ¶
func Profiles() map[string]*SliverConfig
Profiles - Fetch a map of name<->profiles current in the database
func ShellcodeRDI ¶
ShellcodeRDI generates a reflective shellcode based on a DLL file
func ShellcodeRDIToFile ¶
ShellcodeRDIToFile generates a sRDI shellcode and writes it to a file
func SliverConfigMap ¶
func SliverConfigMap() (map[string]*SliverConfig, error)
SliverConfigMap - Get a sliver's config by it's codename
func SliverConfigSave ¶
func SliverConfigSave(config *SliverConfig) error
SliverConfigSave - Save a configuration to the database
func SliverEgg ¶
func SliverEgg(config SliverConfig) (string, error)
SliverEgg - Generates a sliver egg (stager) binary
func SliverExecutable ¶
func SliverExecutable(config *SliverConfig) (string, error)
SliverExecutable - Generates a sliver executable binary
func SliverFileByName ¶
SliverFileByName - Saves a binary file into the database
func SliverFileSave ¶
SliverFileSave - Saves a binary file into the database
func SliverSharedLibrary ¶
func SliverSharedLibrary(config *SliverConfig) (string, error)
SliverSharedLibrary - Generates a sliver shared library (DLL/dylib/so) binary
func UpdateCanary ¶
UpdateCanary - Update an existing canary
Types ¶
type CanaryGenerator ¶
CanaryGenerator - Holds data related to canary generation
func (*CanaryGenerator) GenerateCanary ¶
func (g *CanaryGenerator) GenerateCanary() string
GenerateCanary - Generate a canary domain and save it to the db
currently this gets called by template engine
type DNSCanary ¶
type DNSCanary struct { SliverName string `json:"sliver_name"` Domain string `json:"domain"` Triggered bool `json:"triggered"` FirstTrigger string `json:"first_trigger"` LatestTrigger string `json:"latest_trigger"` Count int `json:"count"` }
DNSCanary - DNS canary
func CheckCanary ¶
CheckCanary - Check if a canary exists
func ListCanaries ¶
ListCanaries - List of all embedded canaries
func (*DNSCanary) ToProtobuf ¶
ToProtobuf - Return a protobuf version of the struct
type SliverC2 ¶
type SliverC2 struct { Priority uint32 `json:"priority"` URL string `json:"url"` Options string `json:"options"` }
SliverC2 - C2 struct
func (SliverC2) ToProtobuf ¶
ToProtobuf - Convert to protobuf version
type SliverConfig ¶
type SliverConfig struct { // Go GOOS string `json:"go_os"` GOARCH string `json:"go_arch"` // Standard Name string `json:"name"` CACert string `json:"ca_cert"` Cert string `json:"cert"` Key string `json:"key"` Debug bool `json:"debug"` ObfuscateSymbols bool `json:"obfuscate_symbols"` ReconnectInterval int `json:"reconnect_interval"` MaxConnectionErrors int `json:"max_connection_errors"` C2 []SliverC2 `json:"c2s"` MTLSc2Enabled bool `json:"c2_mtls_enabled"` HTTPc2Enabled bool `json:"c2_http_enabled"` DNSc2Enabled bool `json:"c2_dns_enabled"` CanaryDomains []string `json:"canary_domains"` // Limits LimitDomainJoined bool `json:"limit_domainjoined"` LimitHostname string `json:"limit_hostname"` LimitUsername string `json:"limit_username"` LimitDatetime string `json:"limit_datetime"` // Output Format Format clientpb.SliverConfig_OutputFormat `json:"format"` IsSharedLib bool `json:"is_shared_lib"` FileName string }
SliverConfig - Parameters when generating a implant
func ProfileByName ¶
func ProfileByName(name string) (*SliverConfig, error)
ProfileByName - Fetch a single profile from the database
func SliverConfigByName ¶
func SliverConfigByName(name string) (*SliverConfig, error)
SliverConfigByName - Get a sliver's config by it's codename
func SliverConfigFromProtobuf ¶
func SliverConfigFromProtobuf(pbConfig *clientpb.SliverConfig) *SliverConfig
SliverConfigFromProtobuf - Create a native config struct from Protobuf
func (*SliverConfig) ToProtobuf ¶
func (c *SliverConfig) ToProtobuf() *clientpb.SliverConfig
ToProtobuf - Convert SliverConfig to protobuf equiv