Documentation
¶
Index ¶
- Constants
- Variables
- func AIConversationByID(id string, operatorName string, includeMessages bool) (*clientpb.AIConversation, error)
- func AIConversationMessagesByID(id string, operatorName string) (*clientpb.AIConversationMessages, error)
- func AIConversationsByOperator(operatorName string) ([]*clientpb.AIConversation, error)
- 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 CertificateAuthorities() ([]*models.CertificateAuthority, 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 DeleteAIConversation(id string, operatorName string) 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 IsC2WireGuardIP(tunIP string) bool
- func IsMultiplayerWireGuardIP(tunIP string) bool
- 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 NextAvailableMultiplayerWGIP() (string, error)
- func NextAvailableWGIP() (string, 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 ReleaseWGIP(tunIP string) error
- func RemoveContent(id string) error
- func RemoveWebSite(id string) error
- func RenameBeacon(id string, name string) error
- func ReserveNextAvailableWGIP(ownerType string, ownerID string) (string, error)
- func ReserveWGIP(tunIP string, ownerType string, ownerID string) error
- func ReserveWGIPTx(tx *gorm.DB, tunIP string, ownerType string, ownerID 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 SaveAIConversation(conversation *clientpb.AIConversation, operatorName string) (*clientpb.AIConversation, error)
- func SaveAIConversationMessage(message *clientpb.AIConversationMessage, operatorName string) (*clientpb.AIConversationMessage, error)
- func SaveC2Listener(listenerConf *clientpb.ListenerJob) error
- func SaveHTTPC2Config(httpC2Config *clientpb.HTTPC2Config) 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 Session() *gorm.DB
- func SetKeyValue(key string, value string) error
- func UpdateBeaconCheckinByID(id string, next int64) error
- func UpdateHTTPC2Listener(listenerConf *clientpb.ListenerJob) error
- func UpdateListenerJobID(oldJobID uint32, newJobID uint32) 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 ¶
const ( C2WireGuardIPCIDR = "100.64.0.1/16" MultiplayerWireGuardIPCIDR = "100.65.0.1/16" )
Variables ¶
var Client = newDBClient()
Client - Database Client
var ( // ErrRecordNotFound - Record not found error ErrRecordNotFound = gorm.ErrRecordNotFound )
Functions ¶
func AIConversationByID ¶ added in v1.7.4
func AIConversationByID(id string, operatorName string, includeMessages bool) (*clientpb.AIConversation, error)
AIConversationByID - Fetch an AI conversation by ID, optionally scoped to an operator.
func AIConversationMessagesByID ¶ added in v1.7.4
func AIConversationMessagesByID(id string, operatorName string) (*clientpb.AIConversationMessages, error)
AIConversationMessagesByID - Fetch all messages for a conversation.
func AIConversationsByOperator ¶ added in v1.7.4
func AIConversationsByOperator(operatorName string) ([]*clientpb.AIConversation, error)
AIConversationsByOperator - List AI conversations, optionally scoped to an operator.
func AddContent ¶ added in v1.6.0
func AddContent(pbWebContent *clientpb.WebContent, webContentDir string) (*clientpb.WebContent, error)
AddContent - Add content to website
func AddWebSite ¶ added in v1.6.0
AddWebsite - Return website, create if it does not exist
func AllCrackFiles ¶ added in v1.6.0
func BeaconByID ¶ added in v1.5.0
BeaconByID - Select a Beacon by ID
func BeaconTaskByEnvelopeID ¶ added in v1.5.0
func BeaconTaskByEnvelopeID(beaconID string, envelopeID int64) (*clientpb.BeaconTask, error)
BeaconTasksByEnvelopeID - Select a (sent) BeaconTask by its envelope ID
func BeaconTaskByID ¶ added in v1.5.0
func BeaconTaskByID(id string) (*clientpb.BeaconTask, error)
BeaconTaskByID - Select a specific BeaconTask by ID, this will fetch the full request/response
func BeaconTasksByBeaconID ¶ added in v1.5.0
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 CertificateAuthorities ¶ added in v1.6.9
func CertificateAuthorities() ([]*models.CertificateAuthority, error)
CertificateAuthorities - Return all certificate authorities
func CheckKeyExReplay ¶ added in v1.6.0
CheckKeyExReplay - Store the hash of a key exchange to prevent replays
func CountTasksByBeaconID ¶ added in v1.5.0
CountTasksByBeaconID - Select a (sent) BeaconTask by its envelope ID
func CrackFilesByType ¶ added in v1.6.0
func CrackFilesByType(fileType clientpb.CrackFileType) ([]*models.CrackFile, error)
CrackFilesByType - Get all files by crack file type
func CrackFilesDiskUsage ¶ added in v1.6.0
CrackFilesDiskUsage - Get all files by crack file type
func CrackWordlistByName ¶ added in v1.6.0
CrackWordlistByName - Get all files by crack file type
func CrackstationByHostUUID ¶ added in v1.6.0
func CrackstationByHostUUID(hostUUID string) (*models.Crackstation, error)
CrackstationByHostUUID - Get crackstation by the session's reported HostUUID
func CredentialByID ¶ added in v1.6.0
func CredentialByID(id string) (*clientpb.Credential, error)
CredentialsByID
func CredentialsByCollection ¶ added in v1.6.0
func CredentialsByCollection(collection string) ([]*clientpb.Credential, error)
CredentialsByHashType
func CredentialsByHashType ¶ added in v1.6.0
func CredentialsByHashType(hashType clientpb.HashType) ([]*clientpb.Credential, error)
CredentialsByHashType
func DeleteAIConversation ¶ added in v1.7.4
DeleteAIConversation - Delete an AI conversation thread and all related messages.
func DeleteKeyValue ¶ added in v1.5.0
DeleteKeyValue - Delete a key/value pair
func DeleteListener ¶ added in v1.6.0
func DeleteProfile ¶ added in v1.6.0
DeleteProfile - Delete a profile from the database
func GetByCrackFileByID ¶ added in v1.6.0
GetByCrackFileByID - Get a crack task by its ID
func GetCertificateInfo ¶ added in v1.6.0
func GetCertificateInfo(categoryOptions uint32, cn string) ([]*models.Certificate, error)
Certificates
func GetCrackTaskByID ¶ added in v1.6.0
GetCrackTaskByID - Get a crack task by its ID
func GetKeyValue ¶ added in v1.5.0
GetKeyValue - Get a value from a key
func HTTPC2ConfigUpdate ¶ added in v1.6.0
func HTTPC2ConfigUpdate(newConf *clientpb.HTTPC2Config, oldConf *clientpb.HTTPC2Config) error
func HostByHostID ¶ added in v1.5.0
HostByHostID - Get host by the session's reported HostUUID
func HostByHostUUID ¶ added in v1.5.0
HostByHostUUID - Get host by the session's reported HostUUID
func ImplantBuildByID ¶ added in v1.6.0
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 ¶ added in v1.6.0
func ImplantBuildByPublicKeyDigest(publicKeyDigest [32]byte) (*clientpb.ImplantBuild, error)
ImplantBuildByPublicKeyDigest - Fetch implant build by it's ecc public key
func ImplantBuildByResourceID ¶ added in v1.6.0
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 ¶ added in v1.5.0
func ImplantConfigByID(id string) (*clientpb.ImplantConfig, error)
ImplantConfigByID - Fetch implant config by id
func ImplantConfigWithC2sByID ¶ added in v1.5.30
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 IsC2WireGuardIP ¶ added in v1.7.4
IsC2WireGuardIP reports whether the tunnel IP belongs to the C2 WireGuard address space.
func IsMultiplayerWireGuardIP ¶ added in v1.7.4
IsMultiplayerWireGuardIP reports whether the tunnel IP belongs to the multiplayer WireGuard address space.
func ListBeacons ¶ added in v1.5.0
ListBeacons - Select a Beacon by ID
func ListCanaries ¶
ListCanaries - List of all embedded canaries
func ListenerByJobID ¶ added in v1.6.0
func ListenerByJobID(JobID uint32) (*clientpb.ListenerJob, error)
func ListenerJobs ¶ added in v1.6.0
func ListenerJobs() ([]*clientpb.ListenerJob, error)
func LoadHTTPC2ConfigByName ¶ added in v1.6.0
func LoadHTTPC2ConfigByName(name string) (*clientpb.HTTPC2Config, error)
func LoadHTTPC2s ¶ added in v1.6.0
func LoadHTTPC2s() ([]*clientpb.HTTPC2Config, error)
func NextAvailableMultiplayerWGIP ¶ added in v1.7.4
NextAvailableMultiplayerWGIP returns the next unassigned multiplayer WireGuard tunnel IP candidate.
func NextAvailableWGIP ¶ added in v1.7.4
NextAvailableWGIP returns the next unassigned WireGuard tunnel IP candidate.
func OperatorAll ¶ added in v1.5.0
OperatorAll - Select all operators from the database
func OperatorByToken ¶ added in v1.5.0
OperatorByToken - Select an operator by token value
func PendingBeaconTasksByBeaconID ¶ added in v1.5.0
func PendingBeaconTasksByBeaconID(id string) ([]*models.BeaconTask, error)
PendingBeaconTasksByBeaconID - Select a Beacon by ID, ordered by creation time
func PlaintextCredentialsByHashType ¶ added in v1.6.0
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 ReleaseWGIP ¶ added in v1.7.4
ReleaseWGIP deletes a reservation for a WireGuard tunnel IP.
func RemoveContent ¶ added in v1.6.0
func RemoveWebSite ¶ added in v1.6.0
func RenameBeacon ¶ added in v1.5.5
RenameBeacon - Rename a beacon
func ReserveNextAvailableWGIP ¶ added in v1.7.4
ReserveNextAvailableWGIP retries allocation until it can reserve a unique tunnel IP at the database layer.
func ReserveWGIP ¶ added in v1.7.4
ReserveWGIP persists a unique WireGuard tunnel IP reservation.
func ReserveWGIPTx ¶ added in v1.7.4
ReserveWGIPTx persists a unique WireGuard tunnel IP reservation using an existing transaction.
func ResourceIDByName ¶ added in v1.6.0
func ResourceIDByName(name string) (*clientpb.ResourceID, error)
ResourceID by name
func ResourceIDByType ¶ added in v1.6.0
func ResourceIDByType(resourceType string) ([]*clientpb.ResourceID, error)
ResourceID queries
func ResourceIDByValue ¶ added in v1.6.0
func ResourceIDByValue(id uint64) (*clientpb.ResourceID, error)
ResourceID by value
func ResourceIDs ¶ added in v1.6.0
func ResourceIDs() ([]*clientpb.ResourceID, error)
func SaveAIConversation ¶ added in v1.7.4
func SaveAIConversation(conversation *clientpb.AIConversation, operatorName string) (*clientpb.AIConversation, error)
SaveAIConversation - Create or update an AI conversation thread.
func SaveAIConversationMessage ¶ added in v1.7.4
func SaveAIConversationMessage(message *clientpb.AIConversationMessage, operatorName string) (*clientpb.AIConversationMessage, error)
SaveAIConversationMessage - Create or update a single AI conversation message.
func SaveC2Listener ¶ added in v1.6.0
func SaveC2Listener(listenerConf *clientpb.ListenerJob) error
func SaveHTTPC2Config ¶ added in v1.6.0
func SaveHTTPC2Config(httpC2Config *clientpb.HTTPC2Config) error
func SaveImplantBuild ¶ added in v1.6.0
func SaveImplantBuild(ib *clientpb.ImplantBuild) (*clientpb.ImplantBuild, error)
SaveImplantBuild
func SaveImplantConfig ¶ added in v1.6.0
func SaveImplantConfig(ic *clientpb.ImplantConfig) (*clientpb.ImplantConfig, error)
SaveImplantConfig
func SaveResourceID ¶ added in v1.6.0
func SaveResourceID(r *clientpb.ResourceID) error
func SaveWatchTowerConfig ¶ added in v1.6.0
func SaveWatchTowerConfig(m *clientpb.MonitoringProvider) error
func SetKeyValue ¶ added in v1.5.0
SetKeyValue - Set the value for a key/value pair
func UpdateBeaconCheckinByID ¶ added in v1.5.0
UpdateBeaconCheckinByID - Update the beacon's last / next checkin
func UpdateHTTPC2Listener ¶ added in v1.6.0
func UpdateHTTPC2Listener(listenerConf *clientpb.ListenerJob) error
func UpdateListenerJobID ¶ added in v1.7.2
UpdateListenerJobID - Update a listener record's job id while preserving listener configuration rows.
func WGPeerIPs ¶ added in v1.4.9
WGPeerIPs - Fetch a list of all persisted WireGuard tunnel IPs and reservations across both the C2 and multiplayer features.
func WatchTowerConfigDel ¶ added in v1.6.0
func WatchTowerConfigDel(m *clientpb.MonitoringProvider) error
func WatchTowerConfigs ¶ added in v1.6.0
func WatchTowerConfigs() ([]*clientpb.MonitoringProvider, error)
watchtower - List configurations
func WebContentByIDAndPath ¶ added in v1.6.0
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.