SQL powered operating system instrumentation, monitoring, and analytics.
Go to file
Mike Arpaia 8fea488f1c Merge pull request #346 from zwass/gitignore
Add common Emacs/Vim tempfile entries to .gitignore
2014-11-03 11:23:21 -08:00
.idea Support for CLion C/C++ IDE 2014-09-09 00:10:20 -07:00
CMake checking for libraries 2014-09-23 19:44:58 -07:00
doxygen updating docs header 2014-09-21 14:30:28 -07:00
include/osquery Fix #328, add gflags defines for shell-internal flags 2014-11-02 15:40:35 -08:00
osquery changed comments to // from /* , char* to std::string consts, and ran clang-format on the file 2014-11-02 21:09:04 -07:00
site updating the username and repo [skip ci] 2014-10-28 19:32:24 -04:00
third-party@414ab7df32 updating third-party commit hash 2014-09-23 23:21:16 -07:00
tools changed lspci to be a linux only virtual table, and added udev dependency to provisions.sh 2014-11-02 21:07:35 -07:00
.clang-format [format] Remove SpacesInAngles 2014-11-03 10:00:49 -08:00
.gitignore Add common Emacs/Vim tempfile entries to .gitignore 2014-11-03 11:20:52 -08:00
.gitmodules removing lib submodule 2014-09-23 18:50:10 -07:00
.travis.yml Fixed Mac broken build and added building capabilities for Linux 2014-10-02 23:25:39 +00:00
CMakeLists.txt Change make format to use git-clang-format 2014-11-02 11:30:56 -08:00
CONTRIBUTING.md contributing docs 2014-10-09 18:39:00 -07:00
Doxyfile update include paths 2014-09-15 23:52:31 -07:00
LICENSE legal stuff 2014-10-07 00:07:32 -07:00
Makefile Cleanup linux build dir with distclean 2014-11-03 03:33:22 -08:00
osquery.supp cleaning up some memory leak supps 2014-10-09 22:06:55 -07:00
PATENTS legal stuff 2014-10-07 00:07:32 -07:00
README.md Update README.md 2014-11-03 01:50:54 -08:00
requirements.txt bump 2014-10-31 17:50:02 -07:00
Vagrantfile Deb package creation for Ubuntu 2014-09-23 17:03:30 -07:00

osquery

osquery is an operating system instrumentation framework for OSX and Linux. osquery makes low-level operating system analytics and monitoring both performant and intuitive.

osquery exposes an operating system as a high-performance relational database. This allows you to write SQL-based queries to explore operating system data. With osquery, SQL tables represent abstract concepts such as

  • running processes
  • loaded kernel modules
  • open network connections

SQL tables are implemented via an easily extendable API. A variety of tables already exist and more are being written.

To best understand the expressiveness that is afforded to you by osquery, consider the following SQL queries:

--------------------------------------------------------
-- get the name, pid and attached port of all processes 
-- which are listening on all interfaces
--------------------------------------------------------
SELECT DISTINCT 
  process.name, 
  listening.port, 
  process.pid
FROM processes AS process
JOIN listening_ports AS listening
ON process.pid = listening.pid
WHERE listening.address = '0.0.0.0';
--------------------------------------------------------
-- find every launchdaemon on an OS X host which 
--   * launches an executable when the operating 
--     system starts
--   * keeps the executable running 
-- return the name of the launchdaemon and the full 
-- path (with arguments) of the executable to be ran.
--------------------------------------------------------
SELECT 
  name, 
  program || program_arguments AS executable 
FROM launchd 
WHERE 
  (run_at_load = 'true' AND keep_alive = 'true') 
AND 
  (program != '' OR program_arguments != '');

These queries can be:

  • performed on an ad-hoc basis to explore operating system state
  • executed via a scheduler to monitor operating system state across a distributed set of hosts over time
  • launched from custom applications using osquery APIs

Install

OS X

The easiest way to install osquery on OS X is via Homebrew. Check the Homebrew homepage for installation instructions.

Run the following:

brew update
brew install osquery

To update osquery:

brew update
brew upgrade osquery

Linux

We don't currently supply pre-built osquery packages for Linux. We do, however, provide Vagrant VMs which allow you to easily create packages for Ubuntu 12.04+ and CentOS 6.5. Check out the wiki's installation guide for more information.

If you're trying to build osquery on a different, currently unsupported operating system, please refer to the building the code guide for help.

Learn more

Read the launch blog post for background on the project.

If you're interested in learning more about osquery, visit the wiki.