osquery
What is osquery?
osqueryAn open-source endpoint instrumentation framework, originally from Facebook, that exposes operating-system state — processes, sockets, files, users, kernel modules — as a SQL-queryable virtual database for inventory, detection, and IR.
osquery is an open-source agent that turns operating-system state into a SQL interface. Originally developed at Facebook and released in 2014, now under the Linux Foundation, it runs on macOS, Linux, Windows, and FreeBSD and exposes hundreds of tables — `processes`, `listening_ports`, `users`, `crontab`, `kernel_extensions`, `firefox_addons`, `chrome_extensions`, `dns_resolvers`, and many more — that a defender can query with familiar SELECTs. osquery can be run interactively (`osqueryi`) or as a daemon (`osqueryd`) that streams the results of scheduled queries to a fleet manager such as Fleet, Kolide, Zentral, or commercial XDRs. Use cases include asset inventory, compliance reporting (CIS Benchmark checks via SQL), threat hunting (e.g. 'show me all processes whose binary path is in a temp directory'), incident response (rapid fleet-wide IOC search), and configuration drift detection. Because the agent does not ship its own detections — only data — osquery is often paired with a separate detection layer (ELK, Sigma, EDR) or with a managed offering. It remains one of the most widely used open-source endpoint visibility tools.
● Examples
- 01
An IR team runs `SELECT pid, name, path FROM processes WHERE path LIKE '/tmp/%';` across 30,000 hosts via a fleet manager to find suspicious dropped binaries.
- 02
A compliance team schedules a nightly osquery to report which endpoints have disk encryption enabled, mapping results to CIS Benchmark checks.
● Frequently asked questions
What is osquery?
An open-source endpoint instrumentation framework, originally from Facebook, that exposes operating-system state — processes, sockets, files, users, kernel modules — as a SQL-queryable virtual database for inventory, detection, and IR. It belongs to the Defense & Operations category of cybersecurity.
What does osquery mean?
An open-source endpoint instrumentation framework, originally from Facebook, that exposes operating-system state — processes, sockets, files, users, kernel modules — as a SQL-queryable virtual database for inventory, detection, and IR.
How does osquery work?
osquery is an open-source agent that turns operating-system state into a SQL interface. Originally developed at Facebook and released in 2014, now under the Linux Foundation, it runs on macOS, Linux, Windows, and FreeBSD and exposes hundreds of tables — `processes`, `listening_ports`, `users`, `crontab`, `kernel_extensions`, `firefox_addons`, `chrome_extensions`, `dns_resolvers`, and many more — that a defender can query with familiar SELECTs. osquery can be run interactively (`osqueryi`) or as a daemon (`osqueryd`) that streams the results of scheduled queries to a fleet manager such as Fleet, Kolide, Zentral, or commercial XDRs. Use cases include asset inventory, compliance reporting (CIS Benchmark checks via SQL), threat hunting (e.g. 'show me all processes whose binary path is in a temp directory'), incident response (rapid fleet-wide IOC search), and configuration drift detection. Because the agent does not ship its own detections — only data — osquery is often paired with a separate detection layer (ELK, Sigma, EDR) or with a managed offering. It remains one of the most widely used open-source endpoint visibility tools.
How do you defend against osquery?
Defences for osquery typically combine technical controls and operational practices, as detailed in the full definition above.
What are other names for osquery?
Common alternative names include: osqueryd, osqueryi.
● Related terms
- defense-ops№ 412
EDR (Endpoint Detection and Response)
An endpoint security technology that continuously records process, file, registry and network activity to detect, investigate and respond to threats on hosts.
- defense-ops№ 423
Endpoint Isolation
An EDR response action that severs a compromised host's network connectivity except to the security tooling, so attackers cannot move laterally while responders investigate.
- defense-ops№ 1267
Threat Hunting
Proactive, hypothesis-driven search through telemetry to uncover threats that have evaded existing detections.
- defense-ops№ 461
File Integrity Monitoring (FIM)
A security control that detects unexpected changes to critical operating-system, application, and configuration files by comparing them to a known-good cryptographic baseline.
- defense-ops№ 231
Configuration Management
The discipline of establishing, recording, and enforcing the desired state of systems and applications so configurations remain known, consistent, and secure.
- defense-ops№ 338
Detection Engineering
The discipline of designing, testing, deploying, and maintaining security detections as code, with measurable coverage of adversary techniques.