# README

DB

GORM-based database interactions.

Contents:

  • gosqlite/ - A fork of the GORM sqlite driver that uses a pure go sqlite3 implementation. This can be compiled using the Go build tag gosqlite
  • models/ - The database/GORM models
  • db.go - Primary abstraction for client and db sessions
  • helpers.go - Helper functions for querying the GORM models
  • logger.go - Database logger
  • sql_cgo.go - The CGO sqlite client
  • sql_go.go - The pure Go sqlite client
  • sql.go - Database setup and configuration

# Packages

No description provided by the author
No description provided by the author

# Functions

AddContent - Add content to website.
AddWebsite - Return website, create if it does not exist.
No description provided by the author
BeaconByID - Select a Beacon by ID.
BeaconTasksByEnvelopeID - Select a (sent) BeaconTask by its envelope ID.
BeaconTaskByID - Select a specific BeaconTask by ID, this will fetch the full request/response.
BeaconTasksByBeaconID - Get all tasks for a specific beacon by default will not fetch the request/response columns since these could be arbitrarily large.
CanaryByDomain - Check if a canary exists.
CheckKeyExReplay - Store the hash of a key exchange to prevent replays.
CountTasksByBeaconID - Select a (sent) BeaconTask by its envelope ID.
CrackFilesByType - Get all files by crack file type.
CrackFilesDiskUsage - Get all files by crack file type.
CrackstationByHostUUID - Get crackstation by the session's reported HostUUID.
CrackWordlistByName - Get all files by crack file type.
CredentialsByID.
CredentialsByHashType.
CredentialsByHashType.
No description provided by the author
DeleteKeyValue - Delete a key/value pair.
No description provided by the author
DeleteProfile - Delete a profile from the database.
GetByCrackFileByID - Get a crack task by its ID.
Certificates.
GetCrackTaskByID - Get a crack task by its ID.
GetKeyValue - Get a value from a key.
HostByHostID - Get host by the session's reported HostUUID.
HostByHostUUID - Get host by the session's reported HostUUID.
No description provided by the author
ImplantBuildByID - Fetch implant build from ID.
ImplantBuildByName - Fetch implant build by name.
ImplantBuildByPublicKeyDigest - Fetch implant build by it's ecc public key.
ImplantBuildByResourceID - Fetch implant build from resource ID.
ImplantBuilds - Return all implant builds.
ImplantConfigByID - Fetch implant config by id.
ImplantConfigWithC2sByID - Fetch implant build by name.
ImplantProfileByName - Fetch implant build by name.
ImplantProfileNames - Fetch a list of all build names.
ImplantProfiles - Fetch a map of name<->profiles current in the database.
IOCByID - Select an IOC by ID.
ListBeacons - Select a Beacon by ID.
ListCanaries - List of all embedded canaries.
No description provided by the author
No description provided by the author
ListHosts - List of all hosts in the database.
No description provided by the author
No description provided by the author
OperatorAll - Select all operators from the database.
OperatorByToken - Select an operator by token value.
PendingBeaconTasksByBeaconID - Select a Beacon by ID, ordered by creation time.
PlaintextCredentials.
ProfileByName - Fetch a single profile from the database.
No description provided by the author
No description provided by the author
RenameBeacon - Rename a beacon.
ResourceID by name.
ResourceID queries.
ResourceID by value.
No description provided by the author
No description provided by the author
No description provided by the author
SaveImplantBuild.
SaveImplantConfig.
No description provided by the author
No description provided by the author
used to prevent duplicate stager extensions.
used to prevent duplicate start session extensions.
Session - Database session.
SetKeyValue - Set the value for a key/value pair.
UpdateBeaconCheckinByID - Update the beacon's last / next checkin.
No description provided by the author
No description provided by the author
watchtower - List configurations.
WebContent by ID and path.
WebsiteByName - Get website by name.
Websites - Return all websites.
WGPeerIPs - Fetch a list of ips for all wireguard peers.

# Variables

Client - Database Client.
ErrRecordNotFound - Record not found error.