Documentation ¶
Index ¶
- Variables
- func AddContent(pbWebContent *clientpb.WebContent, webContentDir string) (*clientpb.WebContent, error)
- func AddWebSite(webSiteName string, webContentDir string) (*clientpb.Website, error)
- func AllCrackFiles() ([]*models.CrackFile, error)
- func BeaconByID(id string) (*models.Beacon, error)
- func BeaconTaskByEnvelopeID(beaconID string, envelopeID int64) (*clientpb.BeaconTask, error)
- func BeaconTaskByID(id string) (*clientpb.BeaconTask, error)
- func BeaconTasksByBeaconID(beaconID string) ([]*clientpb.BeaconTask, error)
- func CanaryByDomain(domain string) (*clientpb.DNSCanary, error)
- func CheckKeyExReplay(ciphertext []byte) error
- func CountTasksByBeaconID(beaconID string) (int64, int64, error)
- func CrackFilesByType(fileType clientpb.CrackFileType) ([]*models.CrackFile, error)
- func CrackFilesDiskUsage() (int64, error)
- func CrackWordlistByName(name string) (*models.CrackFile, error)
- func CrackstationByHostUUID(hostUUID string) (*models.Crackstation, error)
- func CredentialByID(id string) (*clientpb.Credential, error)
- func CredentialsByCollection(collection string) ([]*clientpb.Credential, error)
- func CredentialsByHashType(hashType clientpb.HashType) ([]*clientpb.Credential, error)
- func DeleteC2(c2ID uuid.UUID) error
- func DeleteKeyValue(key string, value string) error
- func DeleteListener(JobID uint32) error
- func DeleteProfile(name string) error
- func GetByCrackFileByID(id string) (*models.CrackFile, error)
- func GetCertificateInfo(categoryOptions uint32, cn string) ([]*models.Certificate, error)
- func GetCrackTaskByID(id string) (*models.CrackTask, error)
- func GetKeyValue(key string) (string, error)
- func HTTPC2ConfigUpdate(newConf *clientpb.HTTPC2Config, oldConf *clientpb.HTTPC2Config) error
- func HostByHostID(id uuid.UUID) (*clientpb.Host, error)
- func HostByHostUUID(id string) (*models.Host, error)
- func IOCByID(id string) (*clientpb.IOC, error)
- func ImplantBuildByID(id string) (*clientpb.ImplantBuild, error)
- func ImplantBuildByName(name string) (*clientpb.ImplantBuild, error)
- func ImplantBuildByPublicKeyDigest(publicKeyDigest [32]byte) (*clientpb.ImplantBuild, error)
- func ImplantBuildByResourceID(resourceID uint64) (*clientpb.ImplantBuild, error)
- func ImplantBuilds() (*clientpb.ImplantBuilds, error)
- func ImplantConfigByID(id string) (*clientpb.ImplantConfig, error)
- func ImplantConfigWithC2sByID(id string) (*clientpb.ImplantConfig, error)
- func ImplantProfileByName(name string) (*clientpb.ImplantProfile, error)
- func ImplantProfileNames() ([]string, error)
- func ImplantProfiles() ([]*clientpb.ImplantProfile, error)
- func ListBeacons() ([]*clientpb.Beacon, error)
- func ListCanaries() ([]*clientpb.DNSCanary, error)
- func ListHosts() ([]*clientpb.Host, error)
- func ListenerByJobID(JobID uint32) (*clientpb.ListenerJob, error)
- func ListenerJobs() ([]*clientpb.ListenerJob, error)
- func LoadHTTPC2ConfigByName(name string) (*clientpb.HTTPC2Config, error)
- func LoadHTTPC2s() ([]*clientpb.HTTPC2Config, error)
- func OperatorAll() ([]*models.Operator, error)
- func OperatorByToken(value string) (*models.Operator, error)
- func PendingBeaconTasksByBeaconID(id string) ([]*models.BeaconTask, error)
- func PlaintextCredentialsByHashType(hashType clientpb.HashType) ([]*clientpb.Credential, error)
- func ProfileByName(name string) (*clientpb.ImplantProfile, error)
- func RemoveContent(id string) error
- func RemoveWebSite(id string) error
- func RenameBeacon(id string, name string) error
- func ResourceIDByName(name string) (*clientpb.ResourceID, error)
- func ResourceIDByType(resourceType string) ([]*clientpb.ResourceID, error)
- func ResourceIDByValue(id uint64) (*clientpb.ResourceID, error)
- func ResourceIDs() ([]*clientpb.ResourceID, error)
- func SaveHTTPC2Config(httpC2Config *clientpb.HTTPC2Config) error
- func SaveHTTPC2Listener(listenerConf *clientpb.ListenerJob) error
- func SaveImplantBuild(ib *clientpb.ImplantBuild) (*clientpb.ImplantBuild, error)
- func SaveImplantConfig(ic *clientpb.ImplantConfig) (*clientpb.ImplantConfig, error)
- func SaveResourceID(r *clientpb.ResourceID) error
- func SaveWatchTowerConfig(m *clientpb.MonitoringProvider) error
- func SearchStageExtensions(stagerExtension string, profileName string) error
- func SearchStartSessionExtensions(StartSessionFileExt string, profileName string) error
- func Session() *gorm.DB
- func SetKeyValue(key string, value string) error
- func UpdateBeaconCheckinByID(id string, next int64) error
- func UpdateHTTPC2Listener(listenerConf *clientpb.ListenerJob) error
- func WGPeerIPs() ([]string, error)
- func WatchTowerConfigDel(m *clientpb.MonitoringProvider) error
- func WatchTowerConfigs() ([]*clientpb.MonitoringProvider, error)
- func WebContentByIDAndPath(id string, path string, webContentDir string, eager bool) (*clientpb.WebContent, error)
- func WebsiteByName(name string, webContentDir string) (*clientpb.Website, error)
- func Websites(webContentDir string) ([]*clientpb.Website, error)
Constants ¶
This section is empty.
Variables ¶
var Client = newDBClient()
Client - Database Client
var ( // ErrRecordNotFound - Record not found error ErrRecordNotFound = gorm.ErrRecordNotFound )
Functions ¶
func AddContent ¶
func AddContent(pbWebContent *clientpb.WebContent, webContentDir string) (*clientpb.WebContent, error)
AddContent - Add content to website
func AddWebSite ¶
AddWebsite - Return website, create if it does not exist
func AllCrackFiles ¶
func BeaconByID ¶
BeaconByID - Select a Beacon by ID
func BeaconTaskByEnvelopeID ¶
func BeaconTaskByEnvelopeID(beaconID string, envelopeID int64) (*clientpb.BeaconTask, error)
BeaconTasksByEnvelopeID - Select a (sent) BeaconTask by its envelope ID
func BeaconTaskByID ¶
func BeaconTaskByID(id string) (*clientpb.BeaconTask, error)
BeaconTaskByID - Select a specific BeaconTask by ID, this will fetch the full request/response
func BeaconTasksByBeaconID ¶
func BeaconTasksByBeaconID(beaconID string) ([]*clientpb.BeaconTask, error)
BeaconTasksByBeaconID - Get all tasks for a specific beacon by default will not fetch the request/response columns since these could be arbitrarily large.
func CanaryByDomain ¶
CanaryByDomain - Check if a canary exists
func CheckKeyExReplay ¶
CheckKeyExReplay - Store the hash of a key exchange to prevent replays
func CountTasksByBeaconID ¶
CountTasksByBeaconID - Select a (sent) BeaconTask by its envelope ID
func CrackFilesByType ¶
func CrackFilesByType(fileType clientpb.CrackFileType) ([]*models.CrackFile, error)
CrackFilesByType - Get all files by crack file type
func CrackFilesDiskUsage ¶
CrackFilesDiskUsage - Get all files by crack file type
func CrackWordlistByName ¶
CrackWordlistByName - Get all files by crack file type
func CrackstationByHostUUID ¶
func CrackstationByHostUUID(hostUUID string) (*models.Crackstation, error)
CrackstationByHostUUID - Get crackstation by the session's reported HostUUID
func CredentialsByCollection ¶
func CredentialsByCollection(collection string) ([]*clientpb.Credential, error)
CredentialsByHashType
func CredentialsByHashType ¶
func CredentialsByHashType(hashType clientpb.HashType) ([]*clientpb.Credential, error)
CredentialsByHashType
func DeleteKeyValue ¶
DeleteKeyValue - Delete a key/value pair
func DeleteListener ¶
func DeleteProfile ¶
DeleteProfile - Delete a profile from the database
func GetByCrackFileByID ¶
GetByCrackFileByID - Get a crack task by its ID
func GetCertificateInfo ¶
func GetCertificateInfo(categoryOptions uint32, cn string) ([]*models.Certificate, error)
Certificates
func GetCrackTaskByID ¶
GetCrackTaskByID - Get a crack task by its ID
func GetKeyValue ¶
GetKeyValue - Get a value from a key
func HTTPC2ConfigUpdate ¶
func HTTPC2ConfigUpdate(newConf *clientpb.HTTPC2Config, oldConf *clientpb.HTTPC2Config) error
func HostByHostID ¶
HostByHostID - Get host by the session's reported HostUUID
func HostByHostUUID ¶
HostByHostUUID - Get host by the session's reported HostUUID
func ImplantBuildByID ¶
func ImplantBuildByID(id string) (*clientpb.ImplantBuild, error)
ImplantBuildByID - Fetch implant build from ID
func ImplantBuildByName ¶
func ImplantBuildByName(name string) (*clientpb.ImplantBuild, error)
ImplantBuildByName - Fetch implant build by name
func ImplantBuildByPublicKeyDigest ¶
func ImplantBuildByPublicKeyDigest(publicKeyDigest [32]byte) (*clientpb.ImplantBuild, error)
ImplantBuildByPublicKeyDigest - Fetch implant build by it's ecc public key
func ImplantBuildByResourceID ¶
func ImplantBuildByResourceID(resourceID uint64) (*clientpb.ImplantBuild, error)
ImplantBuildByResourceID - Fetch implant build from resource ID
func ImplantBuilds ¶
func ImplantBuilds() (*clientpb.ImplantBuilds, error)
ImplantBuilds - Return all implant builds
func ImplantConfigByID ¶
func ImplantConfigByID(id string) (*clientpb.ImplantConfig, error)
ImplantConfigByID - Fetch implant config by id
func ImplantConfigWithC2sByID ¶
func ImplantConfigWithC2sByID(id string) (*clientpb.ImplantConfig, error)
ImplantConfigWithC2sByID - Fetch implant build by name
func ImplantProfileByName ¶
func ImplantProfileByName(name string) (*clientpb.ImplantProfile, error)
ImplantProfileByName - Fetch implant build by name
func ImplantProfileNames ¶
ImplantProfileNames - Fetch a list of all build names
func ImplantProfiles ¶
func ImplantProfiles() ([]*clientpb.ImplantProfile, error)
ImplantProfiles - Fetch a map of name<->profiles current in the database
func ListBeacons ¶
ListBeacons - Select a Beacon by ID
func ListCanaries ¶
ListCanaries - List of all embedded canaries
func ListenerByJobID ¶
func ListenerByJobID(JobID uint32) (*clientpb.ListenerJob, error)
func ListenerJobs ¶
func ListenerJobs() ([]*clientpb.ListenerJob, error)
func LoadHTTPC2ConfigByName ¶
func LoadHTTPC2ConfigByName(name string) (*clientpb.HTTPC2Config, error)
func LoadHTTPC2s ¶
func LoadHTTPC2s() ([]*clientpb.HTTPC2Config, error)
func OperatorAll ¶
OperatorAll - Select all operators from the database
func OperatorByToken ¶
OperatorByToken - Select an operator by token value
func PendingBeaconTasksByBeaconID ¶
func PendingBeaconTasksByBeaconID(id string) ([]*models.BeaconTask, error)
PendingBeaconTasksByBeaconID - Select a Beacon by ID, ordered by creation time
func PlaintextCredentialsByHashType ¶
func PlaintextCredentialsByHashType(hashType clientpb.HashType) ([]*clientpb.Credential, error)
PlaintextCredentials
func ProfileByName ¶
func ProfileByName(name string) (*clientpb.ImplantProfile, error)
ProfileByName - Fetch a single profile from the database
func RemoveContent ¶
func RemoveWebSite ¶
func ResourceIDByName ¶
func ResourceIDByName(name string) (*clientpb.ResourceID, error)
ResourceID by name
func ResourceIDByType ¶
func ResourceIDByType(resourceType string) ([]*clientpb.ResourceID, error)
ResourceID queries
func ResourceIDByValue ¶
func ResourceIDByValue(id uint64) (*clientpb.ResourceID, error)
ResourceID by value
func ResourceIDs ¶
func ResourceIDs() ([]*clientpb.ResourceID, error)
func SaveHTTPC2Config ¶
func SaveHTTPC2Config(httpC2Config *clientpb.HTTPC2Config) error
func SaveHTTPC2Listener ¶
func SaveHTTPC2Listener(listenerConf *clientpb.ListenerJob) error
func SaveImplantBuild ¶
func SaveImplantBuild(ib *clientpb.ImplantBuild) (*clientpb.ImplantBuild, error)
SaveImplantBuild
func SaveImplantConfig ¶
func SaveImplantConfig(ic *clientpb.ImplantConfig) (*clientpb.ImplantConfig, error)
SaveImplantConfig
func SaveResourceID ¶
func SaveResourceID(r *clientpb.ResourceID) error
func SaveWatchTowerConfig ¶
func SaveWatchTowerConfig(m *clientpb.MonitoringProvider) error
func SearchStageExtensions ¶
used to prevent duplicate stager extensions
func SearchStartSessionExtensions ¶
used to prevent duplicate start session extensions
func SetKeyValue ¶
SetKeyValue - Set the value for a key/value pair
func UpdateBeaconCheckinByID ¶
UpdateBeaconCheckinByID - Update the beacon's last / next checkin
func UpdateHTTPC2Listener ¶
func UpdateHTTPC2Listener(listenerConf *clientpb.ListenerJob) error
func WatchTowerConfigDel ¶
func WatchTowerConfigDel(m *clientpb.MonitoringProvider) error
func WatchTowerConfigs ¶
func WatchTowerConfigs() ([]*clientpb.MonitoringProvider, error)
watchtower - List configurations
func WebContentByIDAndPath ¶
func WebContentByIDAndPath(id string, path string, webContentDir string, eager bool) (*clientpb.WebContent, error)
WebContent by ID and path
func WebsiteByName ¶
WebsiteByName - Get website by name
Types ¶
This section is empty.