Documentation ¶
Index ¶
- Variables
- func BeaconByID(id string) (*models.Beacon, error)
- func BeaconTaskByEnvelopeID(beaconID string, envelopeID int64) (*models.BeaconTask, error)
- func BeaconTaskByID(id string) (*models.BeaconTask, error)
- func BeaconTasksByBeaconID(beaconID string) ([]*models.BeaconTask, error)
- func CanaryByDomain(domain string) (*models.DNSCanary, error)
- func CountTasksByBeaconID(beaconID uuid.UUID) (int64, int64, error)
- func DeleteKeyValue(key string, value string) error
- func GetKeyValue(key string) (string, error)
- func HostByHostID(id uuid.UUID) (*models.Host, error)
- func HostByHostUUID(id string) (*models.Host, error)
- func IOCByID(id string) (*models.IOC, error)
- func ImplantBuildByName(name string) (*models.ImplantBuild, error)
- func ImplantBuildNames() ([]string, error)
- func ImplantBuilds() ([]*models.ImplantBuild, error)
- func ImplantConfigByECCPublicKeyDigest(publicKeyDigest [32]byte) (*models.ImplantConfig, error)
- func ImplantConfigByID(id string) (*models.ImplantConfig, error)
- func ImplantConfigWithC2sByID(id string) (*models.ImplantConfig, error)
- func ImplantProfileByName(name string) (*models.ImplantProfile, error)
- func ImplantProfileNames() ([]string, error)
- func ImplantProfiles() ([]*models.ImplantProfile, error)
- func ListBeacons() ([]*models.Beacon, error)
- func ListCanaries() ([]*models.DNSCanary, error)
- func ListHosts() ([]*models.Host, error)
- func OperatorAll() ([]*models.Operator, error)
- func OperatorByToken(value string) (*models.Operator, error)
- func PendingBeaconTasksByBeaconID(id string) ([]*models.BeaconTask, error)
- func ProfileByName(name string) (*models.ImplantProfile, error)
- func RenameBeacon(id string, name string) error
- func Session() *gorm.DB
- func SetKeyValue(key string, value string) error
- func UpdateBeaconCheckinByID(id string, next int64) error
- func WGPeerIPs() ([]string, error)
- func WebsiteByName(name string) (*models.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 BeaconByID ¶
BeaconByID - Select a Beacon by ID
func BeaconTaskByEnvelopeID ¶
func BeaconTaskByEnvelopeID(beaconID string, envelopeID int64) (*models.BeaconTask, error)
BeaconTasksByEnvelopeID - Select a (sent) BeaconTask by its envelope ID
func BeaconTaskByID ¶
func BeaconTaskByID(id string) (*models.BeaconTask, error)
BeaconTaskByID - Select a specific BeaconTask by ID, this will fetch the full request/response
func BeaconTasksByBeaconID ¶
func BeaconTasksByBeaconID(beaconID string) ([]*models.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 CountTasksByBeaconID ¶
CountTasksByBeaconID - Select a (sent) BeaconTask by its envelope ID
func DeleteKeyValue ¶
DeleteKeyValue - Delete a key/value pair
func GetKeyValue ¶
GetKeyValue - Get a value from a key
func HostByHostID ¶
HostByHostID - Get host by the session's reported HostUUID
func HostByHostUUID ¶
HostByHostUUID - Get host by the session's reported HostUUID
func ImplantBuildByName ¶
func ImplantBuildByName(name string) (*models.ImplantBuild, error)
ImplantBuildByName - Fetch implant build by name
func ImplantBuildNames ¶
ImplantBuildNames - Fetch a list of all build names
func ImplantBuilds ¶
func ImplantBuilds() ([]*models.ImplantBuild, error)
ImplantBuilds - Return all implant builds
func ImplantConfigByECCPublicKeyDigest ¶
func ImplantConfigByECCPublicKeyDigest(publicKeyDigest [32]byte) (*models.ImplantConfig, error)
ImplantConfigByECCPublicKey - Fetch implant build by it's ecc public key
func ImplantConfigByID ¶
func ImplantConfigByID(id string) (*models.ImplantConfig, error)
ImplantConfigByID - Fetch implant build by name
func ImplantConfigWithC2sByID ¶
func ImplantConfigWithC2sByID(id string) (*models.ImplantConfig, error)
ImplantConfigWithC2sByID - Fetch implant build by name
func ImplantProfileByName ¶
func ImplantProfileByName(name string) (*models.ImplantProfile, error)
ImplantProfileByName - Fetch implant build by name
func ImplantProfileNames ¶
ImplantProfileNames - Fetch a list of all build names
func ImplantProfiles ¶
func ImplantProfiles() ([]*models.ImplantProfile, error)
ImplantProfiles - Fetch a map of name<->profiles current in the database
func ListCanaries ¶
ListCanaries - List of all embedded canaries
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 ProfileByName ¶
func ProfileByName(name string) (*models.ImplantProfile, error)
ProfileByName - Fetch a single profile from the database
func SetKeyValue ¶
SetKeyValue - Set the value for a key/value pair
func UpdateBeaconCheckinByID ¶
UpdateBeaconCheckinByID - Update the beacon's last / next checkin
Types ¶
This section is empty.