Skip to main content

OSCtrl

OSCtrl is an open-source osquery management and orchestration platform that enables security teams to deploy, manage, and query osquery agents across their entire infrastructure. OSCtrl provides centralized fleet management capabilities for querying endpoint telemetry data in real-time across macOS, Linux, and Windows systems.

info

OSCtrl has its own guide: Endpoint Control (osctrl). This page summarises the connection settings.

CategoryDevice management
DirectionQuery source
Sign-inNone
Query languagesSQLite
Tables282
Query templates1
Websiteosctrl.net

Before you start​

OSCtrl asks for no credentials in Huntbase.

Connect OSCtrl​

  1. Go to Connections and click New connection, or click New connection on the OSCtrl product page.
  2. On Product, pick OSCtrl and choose the Owner.
  3. On Details, give the connection a Name and, optionally, a Description.
  4. On Verify, review the summary and click Create & check.

For everything else on the setup page — saving a draft, I'll do this later, and what each check result means — see Connections.

Query it​

Once connected, OSCtrl can serve these languages in a query tab, and Scout can use it when you ask in Auto:

LanguageUse it for
SQLiteSQL over the 282 tables listed below, alongside every other connected source.

OSCtrl ships with 1 query template. Find them in Library › Queries — see Query templates.

What syncs automatically​

OSCtrl comes with a content pack. These queries run on a schedule on each new connection so the entities they find appear in the Activity Feed without you asking. You can turn syncing off from the connection's Synchronisation Settings card.

QueryFinds
Sync endpoint local usersuser

Tables​

OSCtrl adds 282 tables. Browse their columns from Schema in the query bar's ⋯ menu.

All 282 tables
TableContains
account_policy_dataAdditional macOS user account data from the AccountPolicy section of OpenDirectory.
acpi_tablesFirmware ACPI functional table common metadata and content.
ad_configmacOS Active Directory configuration.
alfmacOS application layer firewall (ALF) service details.
alf_exceptionsmacOS application layer firewall (ALF) service exceptions.
alf_explicit_authsALF services explicitly allowed to perform networking. Not supported on macOS 15+ (returns no results).
app_schemesmacOS application schemes and handlers (e.g., http, file, mailto).
apparmor_eventsTrack AppArmor events.
apparmor_profilesTrack active AppArmor profiles.
appcompat_shimsApplication Compatibility shims are a way to persist malware. This table presents the AppCompat Shim information from the registry in a nice format. See http://files.brucon.org/2015/Tomczak_and_Ballenthin_Shims_for_the_Win.pdf for more details.
appsmacOS applications installed in known search paths (e.g., /Applications).
apt_sourcesCurrent list of APT repositories or software channels.
arp_cacheAddress resolution cache, both static and dynamic (from ARP, NDP).
aslQueries the Apple System Log data structure for system events.
augeasConfiguration files parsed by augeas.
authenticodeFile (executable, bundle, installer, disk) code signing status.
authorization_mechanismsmacOS Authorization mechanisms database.
authorizationsmacOS Authorization rights database.
authorized_keysA line-delimited authorized_keys table.
autoexecAggregate of executables that will automatically execute on the target machine. This is an amalgamation of other tables like services, scheduled_tasks, startup_items and more.
azure_instance_metadataAzure instance metadata.
azure_instance_tagsAzure instance tags.
background_activities_moderatorBackground Activities Moderator (BAM) tracks application execution.
batteryProvides information about the internal battery of a laptop. Note: On Windows, columns with Ah or mAh units assume that the battery is 12V.
bitlocker_infoRetrieve bitlocker status of the machine.
block_devicesBlock (buffered access) device file nodes: disks, ramdisks, and DMG containers.
bpf_process_eventsTrack time/action process executions.
bpf_socket_eventsTrack network socket opens and closes.
browser_pluginsAll C/NPAPI browser plugin details for all users. C/NPAPI has been deprecated on all major browsers. To query for plugins on modern browsers, try: chrome_extensions firefox_addons safari_extensions.
carbon_black_infoReturns info about a Carbon Black sensor install.
carvesList the set of completed and in-progress carves. If carve=1 then the query is treated as a new carve request.
certificatesCertificate Authorities installed in Keychains/ca-bundles. NOTE: osquery limits frequent access to keychain files on macOS. This limit is controlled by keychain_access_interval flag.
chassis_infoDisplay information pertaining to the chassis and its security status.
chocolatey_packagesChocolatey packages installed in a system.
chrome_extension_content_scriptsChrome browser extension content scripts.
chrome_extensionsChrome-based browser extensions.
connected_displaysProvides information about the connected displays of the machine.
connectivityProvides the overall system's network state.
cpu_infoRetrieve cpu hardware info of the machine.
cpu_timeDisplays information from /proc/stat file about the time the cpu cores spent in different parts of the system.
cpuidUseful CPU features from the cpuid ASM call.
crashesApplication, System, and Mobile App crash logs.
crontabLine parsed values from system and user cron/tab.
cups_destinationsReturns all configured printers.
cups_jobsReturns all completed print jobs from cups.
curlPerform an http request and return stats about it.
curl_certificateInspect TLS certificates by connecting to input hostnames.
deb_package_filesInstalled files from DEB packages that are currently installed on the system.
deb_packagesThe installed DEB package database.
default_environmentDefault environment variables and values.
device_fileSimilar to the file table, but use TSK and allow block address access.
device_firmwareA best-effort list of discovered firmware versions.
device_hashSimilar to the hash table, but use TSK and allow block address access.
device_partitionsUse TSK to enumerate details about partitions on a disk device.
deviceguard_statusRetrieve DeviceGuard info of the machine.
disk_encryptionDisk encryption status and information.
disk_eventsTrack DMG disk image events (appearance/disappearance) when opened.
disk_infoRetrieve basic information about the physical disks of a system.
dns_cacheEnumerate the DNS cache using the undocumented DnsGetCacheDataTable function in dnsapi.dll.
dns_lookup_eventsDNS lookups performed through the Windows DNS stack.
dns_resolversResolvers used by this host. Note: On Windows this data is available in the interface_details table.
docker_container_envsDocker container environment variables.
docker_container_fs_changesChanges to files or directories on container's filesystem.
docker_container_labelsDocker container labels.
docker_container_mountsDocker container mounts.
docker_container_networksDocker container networks.
docker_container_portsDocker container ports.
docker_container_processesDocker container processes.
docker_container_statsDocker container statistics. Queries on this table take at least one second.
docker_containersDocker containers information.
docker_image_historyDocker image history information.
docker_image_labelsDocker image labels.
docker_image_layersDocker image layers information.
docker_imagesDocker images information.
docker_infoDocker system information.
docker_network_labelsDocker network labels.
docker_networksDocker networks information.
docker_versionDocker version information.
docker_volume_labelsDocker volume labels.
docker_volumesDocker volumes information.
driversDetails for in-use Windows device drivers. This does not display installed but unused drivers.
ec2_instance_metadataEC2 instance metadata.
ec2_instance_tagsEC2 instance tag key value pairs.
es_process_eventsProcess execution events from EndpointSecurity.
es_process_file_eventsFile integrity monitoring events from EndpointSecurity including process context.
etc_hostsLine-parsed /etc/hosts.
etc_protocolsLine-parsed /etc/protocols.
etc_servicesLine-parsed /etc/services.
event_tapsReturns information about installed event taps.
extended_attributesReturns the extended attributes for files (similar to Windows ADS).
fan_speed_sensorsFan speeds.
fileInteractive filesystem attributes and metadata.
file_eventsTrack time/action changes to files specified in configuration data.
firefox_addonsFirefox browser extensions, webapps, and addons.
gatekeepermacOS Gatekeeper Details.
gatekeeper_approved_appsGatekeeper apps a user has allowed to run.
groupsLocal system groups.
hardware_eventsHardware (PCI/USB/HID) events from UDEV or IOKit.
hashFilesystem hash data.
homebrew_packagesThe installed homebrew package database.
ibridge_infoInformation about the Apple iBridge hardware controller.
ie_extensionsInternet Explorer browser extensions.
intel_me_infoIntel ME/CSE Info.
interface_addressesNetwork interfaces and relevant metadata.
interface_detailsDetailed information and stats of network interfaces.
interface_ipv6IPv6 configuration and stats of network interfaces.
iokit_devicetreeThe IOKit registry matching the DeviceTree plane.
iokit_registryThe full IOKit registry without selecting a plane.
iptablesLinux IP packet filtering and NAT tool.
jetbrains_pluginsJetBrains IDEs plugins.
kernel_extensionsmacOS's kernel extensions, both loaded and within the load search path.
kernel_infoBasic active kernel information.
kernel_keysList of security data, authentication keys and encryption keys.
kernel_modulesLinux kernel modules both loaded and within the load search path.
kernel_panicsSystem kernel panic logs.
keychain_aclsApplications that have ACL entries in the keychain. NOTE: osquery limits frequent access to keychain files. This limit is controlled by keychain_access_interval flag.
keychain_itemsGeneric details about keychain items. NOTE: osquery limits frequent access to keychain files. This limit is controlled by keychain_access_interval flag.
known_hostsA line-delimited known_hosts table.
kva_speculative_infoDisplay kernel virtual address and speculative execution information for the system.
lastSystem logins and logouts.
launchdLaunchAgents and LaunchDaemons from default search paths.
launchd_overridesOverride keys, per user, for LaunchDaemons and Agents.
listening_portsProcesses with listening (bound) network sockets/ports.
load_averageDisplays information about the system wide load averages.
location_servicesReports the status of the Location Services feature of the OS.
logged_in_usersUsers with an active shell on the system.
logical_drivesDetails for logical drives on the system. A logical drive generally represents a single partition.
logon_sessionsWindows Logon Session.
lxd_certificatesLXD certificates information.
lxd_clusterLXD cluster information.
lxd_cluster_membersLXD cluster members information.
lxd_imagesLXD images information.
lxd_instance_configLXD instance configuration information.
lxd_instance_devicesLXD instance devices information.
lxd_instancesLXD instances information.
lxd_networksLXD network information.
lxd_storage_poolsLXD storage pool information.
magicMagic number recognition library table.
managed_policiesThe managed configuration policies from AD, MDM, MCX, etc.
md_devicesSoftware RAID array settings.
md_drivesDrive devices used for Software RAID.
md_personalitiesSoftware RAID setting supported by the kernel.
mdfindRun searches against the spotlight database.
mdlsQuery file metadata in the Spotlight database.
memory_array_mapped_addressesData associated for address mapping of physical memory arrays.
memory_arraysData associated with collection of memory devices that operate to form a memory address.
memory_device_mapped_addressesData associated for address mapping of physical memory devices.
memory_devicesPhysical memory device (type 17) information retrieved from SMBIOS.
memory_error_infoData associated with errors of a physical memory array.
memory_infoMain memory information in bytes.
memory_mapOS memory region map.
mountsSystem mounted devices and filesystems (not process specific).
msrVarious pieces of data stored in the model specific register per processor. NOTE: the msr kernel module must be enabled, and osquery must be run as root.
nfs_sharesNFS shares exported by the host.
npm_packagesNode packages installed in a system.
ntdomainsDisplay basic NT domain information of a Windows machine.
ntfs_acl_permissionsRetrieve NTFS ACL permission information for files and directories.
ntfs_journal_eventsTrack time/action changes to files specified in configuration data.
nvramApple NVRAM variable listing.
oem_stringsOEM defined strings retrieved from SMBIOS.
office_mruView recently opened Office documents.
os_versionA single row containing the operating system name and version.
osquery_eventsInformation about the event publishers and subscribers.
osquery_extensionsList of active osquery extensions.
osquery_flagsConfigurable flags that modify osquery's behavior.
osquery_infoTop level information about the running version of osquery.
osquery_packsInformation about the current query packs that are loaded in osquery.
osquery_registryList the osquery registry plugins.
osquery_scheduleInformation about the current queries that are scheduled in osquery.
package_bommacOS package bill of materials (BOM) file list.
package_install_historymacOS package install history.
package_receiptsmacOS package receipt details.
password_policyPassword Policies for macOS.
patchesLists all the patches applied. Note: This does not include patches applied via MSI or downloaded from Windows Update (e.g. Service Packs).
pci_devicesPCI devices active on the host system.
physical_disk_performanceProvides provides raw data from performance counters that monitor hard or fixed disk drives on the system.
pipesNamed and Anonymous pipes.
platform_infoInformation about EFI/UEFI/ROM and platform/boot.
plistRead and parse a plist file.
portage_keywordsA summary about portage configurations like keywords, mask and unmask.
portage_packagesList of currently installed packages.
portage_useList of enabled portage USE values for specific package.
power_sensorsMachine power (currents, voltages, wattages, etc) sensors.
powershell_eventsPowershell script blocks reconstructed to their full script content, this table requires script block logging to be enabled.
preferencesmacOS defaults and managed preferences.
prefetchPrefetch files show metadata related to file execution.
process_envsA key/value table of environment variables for each process.
process_etw_eventsWindows process execution events.
process_eventsTrack time/action process executions.
process_file_eventsA File Integrity Monitor implementation using the audit service.
process_memory_mapProcess memory mapped files and pseudo device/regions.
process_namespacesLinux namespaces for processes running on the host system.
process_open_filesFile descriptors for each process.
process_open_pipesPipes and partner processes for each process.
process_open_socketsProcesses which have open network sockets on the system.
processesAll running processes on the host system.
programsRepresents products as they are installed by Windows Installer. A product generally correlates to one installation package on Windows. Some fields may be blank as Windows installation details are left to the discretion of the product author.
prometheus_metricsRetrieve metrics from a Prometheus server.
python_packagesPython packages installed in a system. NOTE: when querying on windows, even without a users cross join, all user installed python packages will be returned. This special behavior is to not break original functionality.
quicklook_cacheFiles and thumbnails within macOS's Quicklook Cache.
recent_filesRecently files (as displayed in Start Menu or File Explorer).
registryAll of the Windows registry hives.
routesThe active route table for the host system.
rpm_package_filesInstalled files from RPM packages that are currently installed on the system.
rpm_packagesRPM packages that are currently installed on the host system.
running_appsmacOS applications currently running on the host system.
safari_extensionsSafari browser extension details for all users. This table requires Full Disk Access (FDA) permission.
sandboxesmacOS application sandboxes container details.
scheduled_tasksLists all of the tasks in the Windows task scheduler.
screenlockmacOS screenlock status. Note: only fetches results for osquery's current logged-in user context. The user must also have recently logged in.
seccomp_eventsA virtual table that tracks seccomp events.
securebootSecure Boot UEFI Settings.
security_profile_infoInformation on the security profile of a given system by listing the system Account and Audit Policies. This table mimics the exported securitypolicy output from the secedit tool.
selinux_eventsTrack SELinux events.
selinux_settingsTrack active SELinux settings.
servicesLists all installed Windows services and their relevant data.
shadowLocal system users encrypted passwords and related information. Please note, that you usually need superuser rights to access /etc/shadow.
shared_foldersFolders available to others via SMB or AFP.
shared_memoryOS shared memory regions.
shared_resourcesDisplays shared resources on a computer system running Windows. This may be a disk drive, printer, interprocess communication, or other sharable device.
sharing_preferencesmacOS Sharing preferences.
shell_historyA line-delimited (command) table of per-user .*_history data.
shellbagsShows directories accessed via Windows Explorer.
shimcacheApplication Compatibility Cache, contains artifacts of execution.
signatureFile (executable, bundle, installer, disk) code signing status.
sip_configApple's System Integrity Protection (rootless) status.
smbios_tablesBIOS (DMI) structure common details and content.
smc_keysApple's system management controller keys.
socket_eventsTrack network socket bind, connect, and accepts.
ssh_configsA table of parsed ssh_configs.
startup_itemsApplications and binaries set as user/login startup items.
sudoersRules for running commands as other users via sudo.
suid_binsuid binaries in common locations.
syslog_eventsCREATE TABLE IF NOT EXISTS syslog_events (
system_controlssysctl names, values, and settings information.
system_extensionsmacOS (>= 10.15) system extension table.
system_infoSystem information for identification.
system_profilerQuery system_profiler data types and return the full result as JSON. Returns only the data types specified in the constraints. See available data types with system_profiler -listDataTypes.
systemd_unitsTrack systemd units.
temperature_sensorsMachine's temperature sensors.
timeTrack current date and time in UTC.
time_machine_backupsBackups to drives using TimeMachine. This table requires Full Disk Access (FDA) permission.
time_machine_destinationsLocations backed up to using Time Machine. This table requires Full Disk Access (FDA) permission.
tpm_infoA table that lists the TPM related information.
ulimit_infoSystem resource usage limits.
unified_logQueries the OSLog framework for entries in the system log. The maximum number of rows returned is limited for performance issues. Use timestamp > or >= constraints to optimize query performance. This table introduces a new idiom for extracting sequential data in batches using multiple queries, ordered by timestamp. To trigger it, the user should include the condition "timestamp > -1", and the table will handle pagination. Note that the saved pagination counter is incremented globally across all queries and table invocations within a query. To avoid multiple table invocations within a query, use only AND and = constraints in WHERE clause.
uptimeTrack time passed since last boot. Some systems track this as calendar time, some as runtime.
usb_devicesUSB devices that are actively plugged into the host system.
user_eventsTrack user events from the audit framework.
user_groupsLocal system user group relationships.
user_interaction_eventsTrack user interaction events from macOS' event tapping framework.
user_ssh_keysReturns the private keys in the users ~/.ssh directory and whether or not they are encrypted.
userassistUserAssist Registry Key tracks when a user executes an application from Windows Explorer.
usersLocal user accounts (including domain accounts that have logged on locally (Windows)).
video_infoRetrieve video card information of the machine.
virtual_memory_infoDarwin Virtual Memory statistics.
vscode_extensionsLists all vscode extensions.
wifi_networksmacOS known/remembered Wi-Fi networks list.
wifi_statusmacOS current WiFi status.
wifi_surveyScan for nearby WiFi networks.
winbaseobjLists named Windows objects in the default object directories, across all terminal services sessions. Example Windows ojbect types include Mutexes, Events, Jobs and Semaphors.
windows_crashesExtracted information from Windows crash logs (Minidumps).
windows_eventlogTable for querying all recorded Windows event logs.
windows_eventsWindows Event logs.
windows_firewall_rulesProvides the list of Windows firewall rules.
windows_optional_featuresLists names and installation states of windows features. Maps to Win32_OptionalFeature WMI class.
windows_searchRun searches against the Windows system index database using Advanced Query Syntax. See https://learn.microsoft.com/en-us/windows/win32/search/-search-3x-advancedquerysyntax for details.
windows_security_centerThe health status of Window Security features. Health values can be "Good", "Poor". "Snoozed", "Not Monitored", and "Error".
windows_security_productsEnumeration of registered Windows security products. Note: Not compatible with Windows Server.
windows_update_historyProvides the history of the windows update events.
wmi_bios_infoLists important information from the system bios.
wmi_cli_event_consumersWMI CommandLineEventConsumer, which can be used for persistence on Windows. See https://www.blackhat.com/docs/us-15/materials/us-15-Graeber-Abusing-Windows-Management-Instrumentation-WMI-To-Build-A-Persistent%20Asynchronous-And-Fileless-Backdoor-wp.pdf for more details.
wmi_event_filtersLists WMI event filters.
wmi_filter_consumer_bindingLists the relationship between event consumers and filters.
wmi_script_event_consumersWMI ActiveScriptEventConsumer, which can be used for persistence on Windows. See https://www.blackhat.com/docs/us-15/materials/us-15-Graeber-Abusing-Windows-Management-Instrumentation-WMI-To-Build-A-Persistent%20Asynchronous-And-Fileless-Backdoor-wp.pdf for more details.
xprotect_entriesDatabase of the machine's XProtect signatures.
xprotect_metaDatabase of the machine's XProtect browser-related signatures.
xprotect_reportsDatabase of XProtect matches (if user generated/sent an XProtect report).
yaraTriggers one-off YARA query for files at the specified path. Requires one of sig_group, sigfile, or sigrule.
yara_eventsTrack YARA matches for files specified in configuration data.
ycloud_instance_metadataYandex.Cloud instance metadata.
yum_sourcesCurrent list of Yum repositories or software channels.

Next steps​