Documentation ¶
Index ¶
- Constants
- Variables
- func DonutFromAssembly(assembly []byte, isDLL bool, arch string, params string, method string, ...) ([]byte, error)
- func DonutShellcodeFromFile(filePath string, arch string, dotnet bool, params string, className string, ...) (data []byte, err error)
- func DonutShellcodeFromPE(pe []byte, arch string, dotnet bool, params string, className string, ...) (data []byte, err error)
- func GenerateConfig(name string, config *models.ImplantConfig, save bool) error
- func GenerateUniqueIP() (net.IP, error)
- func GetCompilerTargets() []*clientpb.CompilerTarget
- func GetCrossCompilers() []*clientpb.CrossCompiler
- func GetSliversDir() string
- func GetUnsupportedTargets() []*clientpb.CompilerTarget
- func ImplantBuildSave(name string, config *models.ImplantConfig, fPath string) error
- func ImplantConfigFromProtobuf(pbConfig *clientpb.ImplantConfig) (string, *models.ImplantConfig)
- func ImplantConfigSave(config *models.ImplantConfig) error
- func ImplantFileDelete(build *models.ImplantBuild) error
- func ImplantFileFromBuild(build *models.ImplantBuild) ([]byte, error)
- func SaveImplantProfile(name string, config *models.ImplantConfig) error
- func ShellcodeRDI(dllPath string, functionName string, userdata string) (shellcode []byte, err error)
- func ShellcodeRDIFromBytes(data []byte, functionName string, arguments string) (shellcode []byte, err error)
- func ShellcodeRDIToFile(dllPath string, functionName string) (shellcodePath string, err error)
- func SliverExecutable(name string, otpSecret string, config *models.ImplantConfig, save bool) (string, error)
- func SliverExternal(name string, config *models.ImplantConfig) (*clientpb.ExternalImplantConfig, error)
- func SliverSharedLibrary(name string, otpSecret string, config *models.ImplantConfig, save bool) (string, error)
- func SliverShellcode(name string, otpSecret string, config *models.ImplantConfig, save bool) (string, error)
- func UpdateCanary(canary *models.DNSCanary) error
- type CanaryGenerator
Constants ¶
const ( SliverTemplateName = "sliver" // 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 // DefaultPollInterval - In seconds DefaultPollInterval = 1 // DefaultSuffix - Indicates a platform independent src file DefaultSuffix = "_default.go" // 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" // SliverCXX64EnvVar - Environment variable that can specify the 64 bit mingw path SliverCXX64EnvVar = "SLIVER_CXX_64" // SliverCXX32EnvVar - Environment variable that can specify the 32 bit mingw path SliverCXX32EnvVar = "SLIVER_CXX_32" // SliverPlatformCC64EnvVar - Environment variable that can specify the 64 bit mingw path SliverPlatformCC64EnvVar = "SLIVER_%s_CC_64" // SliverPlatformCC32EnvVar - Environment variable that can specify the 32 bit mingw path SliverPlatformCC32EnvVar = "SLIVER_%s_CC_32" // SliverPlatformCXX64EnvVar - Environment variable that can specify the 64 bit mingw path SliverPlatformCXX64EnvVar = "SLIVER_%s_CXX_64" // SliverPlatformCXX32EnvVar - Environment variable that can specify the 32 bit mingw path SliverPlatformCXX32EnvVar = "SLIVER_%s_CXX_32" )
const (
// CanaryBucketName - DNS Canary bucket name
CanaryBucketName = "canaries"
)
Variables ¶
var ( // ErrImplantBuildFileNotFound - More descriptive 'key not found' error ErrImplantBuildFileNotFound = errors.New("implant build file not found") )
Functions ¶
func DonutFromAssembly ¶
func DonutFromAssembly(assembly []byte, isDLL bool, arch string, params string, method string, className string, appDomain string) ([]byte, error)
DonutFromAssembly - Generate a donut shellcode from a .NET assembly
func DonutShellcodeFromFile ¶
func DonutShellcodeFromFile(filePath string, arch string, dotnet bool, params string, className string, method string) (data []byte, err error)
DonutShellcodeFromFile returns a Donut shellcode for the given PE file
func DonutShellcodeFromPE ¶
func DonutShellcodeFromPE(pe []byte, arch string, dotnet bool, params string, className string, method string, isDLL bool, isUnicode bool) (data []byte, err error)
DonutShellcodeFromPE returns a Donut shellcode for the given PE file
func GenerateConfig ¶
func GenerateConfig(name string, config *models.ImplantConfig, save bool) error
GenerateConfig - Generate the keys/etc for the implant
func GenerateUniqueIP ¶
GenerateUniqueIP generates and returns an available IP which can then be assigned to a Wireguard interface
func GetCompilerTargets ¶
func GetCompilerTargets() []*clientpb.CompilerTarget
GetCompilerTargets - This function attempts to determine what we can reasonably target
func GetCrossCompilers ¶
func GetCrossCompilers() []*clientpb.CrossCompiler
GetCrossCompilers - Get information about the server's cross-compiler configuration
func GetUnsupportedTargets ¶
func GetUnsupportedTargets() []*clientpb.CompilerTarget
GetUnsupportedTargets - Get compiler targets that are not "supported" on this platform
func ImplantBuildSave ¶
func ImplantBuildSave(name string, config *models.ImplantConfig, fPath string) error
ImplantBuildSave - Saves a binary file into the database
func ImplantConfigFromProtobuf ¶
func ImplantConfigFromProtobuf(pbConfig *clientpb.ImplantConfig) (string, *models.ImplantConfig)
ImplantConfigFromProtobuf - Create a native config struct from Protobuf
func ImplantConfigSave ¶
func ImplantConfigSave(config *models.ImplantConfig) error
ImplantConfigSave - Save only the config to the database
func ImplantFileDelete ¶
func ImplantFileDelete(build *models.ImplantBuild) error
ImplantFileDelete - Delete the implant from the file system
func ImplantFileFromBuild ¶
func ImplantFileFromBuild(build *models.ImplantBuild) ([]byte, error)
ImplantFileFromBuild - Saves a binary file into the database
func SaveImplantProfile ¶
func SaveImplantProfile(name string, config *models.ImplantConfig) error
SaveImplantProfile - Save a sliver profile to disk
func ShellcodeRDI ¶
func ShellcodeRDI(dllPath string, functionName string, userdata string) (shellcode []byte, err error)
ShellcodeRDI generates a reflective shellcode based on a DLL file
func ShellcodeRDIFromBytes ¶
func ShellcodeRDIFromBytes(data []byte, functionName string, arguments string) (shellcode []byte, err error)
ShellcodeRDIFromBytes generate a sRDI from a byte array
func ShellcodeRDIToFile ¶
ShellcodeRDIToFile generates a sRDI shellcode and writes it to a file
func SliverExecutable ¶
func SliverExecutable(name string, otpSecret string, config *models.ImplantConfig, save bool) (string, error)
SliverExecutable - Generates a sliver executable binary
func SliverExternal ¶
func SliverExternal(name string, config *models.ImplantConfig) (*clientpb.ExternalImplantConfig, error)
SliverExternal - Generates the cryptographic keys for the implant but compiles no code
func SliverSharedLibrary ¶
func SliverSharedLibrary(name string, otpSecret string, config *models.ImplantConfig, save bool) (string, error)
SliverSharedLibrary - Generates a sliver shared library (DLL/dylib/so) binary
func SliverShellcode ¶
func SliverShellcode(name string, otpSecret string, config *models.ImplantConfig, save bool) (string, error)
SliverShellcode - Generates a sliver shellcode using Donut
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