Commit Graph

847 Commits

Author SHA1 Message Date
Teddy Reed
46ae4a6e7a Use a force remove for non-UTF8 files in glibc (#2315) 2016-08-02 01:45:41 -07:00
Tony
487051614f Rename main function, remove ruby-irb (#2314) 2016-08-01 18:47:01 -07:00
Zohaib Sharani
08e5bfbf29 Rename the function main_arch() to distro_main() (#2313) 2016-08-01 18:45:54 -07:00
Teddy Reed
9a26e75ea3 Bump LLVM to revision 1 and build with clang-rt (#2310) 2016-08-01 00:05:59 -07:00
Teddy Reed
e4dd78ec10 Build documentation for brew-based build (#2305) 2016-07-31 17:10:13 -07:00
Teddy Reed
7c1ecc6871 Brew-based build redesign (#2251) 2016-07-31 11:32:31 -07:00
yying
4f5f3f0795 Test for Windows osquery daemon (#2300) 2016-07-29 12:06:13 -07:00
Nick Anderson
5463a7d15c Adding CLI compile script for windows (#2295) 2016-07-25 21:51:37 -07:00
yying
2fb3797c53 Changes to support building a osquery Windows service. (#2278) 2016-07-22 13:29:37 -07:00
Nick Anderson
673f39e86f fixed provision script path in make-win64-dev-env (#2271) 2016-07-21 11:15:49 -07:00
Teddy Reed
172363d3f5 Fix debug-kernel build and deploy dependencies (#2266) 2016-07-20 17:21:20 -07:00
amironenko
575314bf61 Ubuntu + Debian build fixes (#2247) (#2248) 2016-07-20 17:02:40 -07:00
Nick Anderson
00935e28cc Moved windows provisioning script (#2257) 2016-07-19 16:47:51 -07:00
Tony
c1d004ed1f Better fault-tolerant defaults for systemd service (#2255) 2016-07-17 18:56:00 -07:00
DaanDeMeyer
0544b50530 Cleaned up arch provisioning (#2239) 2016-07-12 11:51:35 -07:00
Tony
aa714d4c77 Add ability to provision Arch Linux (#2215) 2016-07-06 15:02:58 -07:00
Omer Katz
2eb4a75884 Bump AWS SDK to 0.12.17 (#2214) 2016-07-05 20:26:24 -07:00
Teddy Reed
24f757850e Add link_whole to generated TARGETS file (#2219) 2016-07-05 17:58:06 -07:00
Teddy Reed
3b2c489374 Use libuuid from e2fsprogs for codegen TARGETS (#2213) 2016-07-01 11:36:42 -07:00
Teddy Reed
753c023640 Fix milli/micro conversion when waiting for active plugins (#2205) 2016-06-30 13:31:32 -07:00
Teddy Reed
3422a44d83 Run profile on all POSIX tables (#2202) 2016-06-30 11:58:55 -07:00
artemdinaburg
b7aad5a2c3 Install new requires packages and link to them in CMake (#2183) 2016-06-24 08:47:48 -07:00
artemdinaburg
d4a3fe2452 Windows Daemon/Shell: Initial support for Windows tables (#2182)
Preparation for Windows Tables. We need a Windows process table so that the daemon will run
2016-06-23 16:04:11 -07:00
Teddy Reed
9a4b6ba1a8 [Fix #2161] Remove space and quotes from launch daemon (#2174) 2016-06-19 23:25:09 -07:00
Gary
498f64437a Copy service unit configuration to Ubuntu Xenial default location (#2163) 2016-06-15 13:21:33 -07:00
Gary
5eee608f62 Fixed bash griefing over postifx-compatible conditional compounds (#2159) 2016-06-10 16:37:56 -07:00
Nick Anderson
cf30388705 Moved test_utils to it's own directory out of core. Updated references (#2154) 2016-06-09 10:49:26 -07:00
Teddy Reed
866ff13fc3 Fix OS X kernel extension autoload (#2151) 2016-06-08 11:14:36 -07:00
Teddy Reed
63db493e4f Update AWS-SDK build to 0.12.5 (#2148) 2016-06-07 19:04:22 -07:00
Ryan Holeman
5dd2a54f39 Ability to add default configs and postinstall scripts to deb/rpm packages (#2142) 2016-06-07 15:09:08 -07:00
Nick Anderson
5d072cd080 Added except for lsb_release not existing on system (#2143)
Added an exception case for OSError when the lsb_release command isn't found on hosts.
2016-06-07 12:52:51 -07:00
Zachary Wasserman
0ec094c27c Update version for AWS SDK 0.12.4 (#2139) 2016-06-06 16:43:01 -07:00
Teddy Reed
763f4e9437 Use SQLite 3.14.0 to support LIKE and EQUALS (#2137)
This commit bumps the third-party SQLite to the 3.14.0 pre-release (18:59).
With 3.14.0 the LIKE and EQUALS constraint operators may be mixed within a
query. Previously these would fail to produce a valid set.

As part of the support, each virtual table should choose to bypass rowid-based
deduplication using the new "WITHOUT ROWID" create table epilog. This will
be appended to the schema if the table defines a PRIMARY KEY using index=True.
2016-06-06 09:36:53 -07:00
Teddy Reed
597c7d5c02 Add systemd service to Xenial (#2134) 2016-06-03 09:09:09 -07:00
Teddy Reed
af1a8d8ad6 Check for none in linked_keg (#2133) 2016-06-02 16:10:26 -07:00
Teddy Reed
4704ccd6c9 Use local AWS-SDK formula for OS X (#2132)
Thus begins our need to include local (modified) brew formulas.
This commit adds a new provision library method: local_brew. Use this function
within provision scripts to install packages that are not appropriate for
homebrew-core.
2016-06-02 14:58:43 -07:00
Justin Gerace
d27930b4ea Fix Scientific Linux build process (#2130) 2016-06-01 16:59:55 -07:00
Nick Anderson
3422100578 Updated the get_platform.py script to be Python 3 compatible (#2122)
Added in future imports to make the script forwards compatible and updated print functions.
2016-05-31 09:10:53 -07:00
Teddy Reed
a9ed73c68d Add removeService to Dispatcher API (#2116)
With a removeService method, combined with the abstracted thread start in
the Dispatcher API, services auto-remove when finished.

This will un-break the kernel communication tests. These tests only stop
when all their producer threads/services have ended.

This also promotes the OS X kernel build to 10.11.
2016-05-27 11:17:06 -07:00
Sharvil Shah
8b0e6e138f Fix benchmark target and bump version of google-benchmark to 1.0.0 (#2065) 2016-05-19 11:56:54 -07:00
Teddy Reed
c4acfe89e5 Introduce table aliases (#2104) 2016-05-19 09:40:43 -07:00
Teddy Reed
df7003e708 Use ruby/gem ABI version 1.9.1 on 12.04 (#2106) 2016-05-18 22:21:06 -07:00
Teddy Reed
869993b543 Fix Ubuntu 15.04 build (#2105) 2016-05-18 20:48:26 -07:00
Teddy Reed
b28c4d8d0f Introduce table options (#2101)
Table options includes a change to the Registry::call API for TablePlugins.
When requesting route information or the 'columns' action, a new 'op' key is included.
2016-05-18 12:23:52 -07:00
yying
26ad131c38 Building osquery unit tests on Windows 10 (#2100)
Integrated process abstraction code into more locations
Defined new macros for abstracting across various platforms
Added GLOG_NO_ABBREVIATED_SEVERITIES for glog to support Windows
Fixed some minor CMake issues involving thrift
Updated gflags package; reflecting change in provision script
Preparing CMake config files for WIN32 support
2016-05-17 12:39:11 -07:00
Teddy Reed
314e3467bc Check for systemd service in osqueryctl (#2090) 2016-05-13 19:48:22 -07:00
Teddy Reed
e61116f5db Add Ubuntu Xenial 16.04 build support (#2089)
The current Ubuntu-provided Xenial does not mount a shared folder.
2016-05-12 08:47:05 -07:00
Christian McHugh
1f4d4f6965 - Install CMake on all Debian versions- Only install Ruby 1.8's development package on Wheeze
- Install CMake on all Debian versions
- Only install Ruby 1.8's development package on Wheezy
2016-05-12 08:45:33 -07:00
Teddy Reed
d49c401324 Add decorators to example config (#2082) 2016-05-10 10:07:25 -07:00
Teddy Reed
947799d28e Introduce within-query caching (#2077)
This adds a new optimization feature that allows expensive tables to cache
their results between JOINs. Consider JOINing a list of open sockets, for each
process, then requesting to hash each process path. This query may hash
the same path multiple times.

Within-query caching allows the hash table to respond with the previous
result of the hash request as long as the requested computation was the result
of a single query. Subsequent queries will perform subsequent hashing.
2016-05-09 10:32:33 -07:00
Zachary Wasserman
9fd807df54 Add --build-bottle argument to AWS SDK install (#2066) 2016-05-03 14:25:29 -07:00
Zachary Wasserman
262833c86a Add AWS Kinesis and Firehose logger plugins (#2045)
This commit adds logger plugin implementations for the Amazon
Kinesis (https://aws.amazon.com/kinesis/) and Kinesis
Firehose (https://aws.amazon.com/kinesis/firehose/) services. To support
these plugins there are a number of utility classes and functions for
AWS authentication, configuration and API integration. The logger plugin
implementations take advantage of the BufferedLogForwarder base class
for reliable buffering and batch sending of logs. In their current
implementations, the logger plugins only support sending of result logs
to these AWS services.
2016-04-25 16:19:51 -07:00
Zachary Wasserman
31748d249b Add AWS C++ SDK to provision scripts (#2046) 2016-04-25 09:01:29 -07:00
Teddy Reed
87f7b32d0a Fix make_package build for OS X/Linux (#2049)
There seems to have been a regression in package building.
The ./tools/lib.sh script now overloads the SCRIPT_DIR variable,
which is also used in the package build scripts.

This changes the file-local variable in ./tools/lib.sh.
2016-04-22 11:15:26 -07:00
yying
18013da24b Initial support for building on Windows (#2015)
* Committing changes related to our experimentation with a "pure" Win64 build

* Placates CMake such that a Visual Studio 14 x64 solution is generated!

* Updated changes to fix the issue of GFlags not being found.

* Added cases to handle Win64 specific CMake options such as include/link
directories and compiler options

* Comment change in CMakeList.txt

* Changed wording of get_platform error message. Adding Powershell
provisioning script.

* Finalized provision powershell script

* Added a deployment XML file for insuring C++ support exists for VS2015

* Added admin check and resolved some potential PATH issues.

* Fixed some potential bugs in VS2015 automated install

* Adding a wrapper for provision.ps1 so people don't need to know obscure
powershell syntax

* Fixing a bug with third-party archive extraction

* Ignoring the updating of pip for now...

* Fix invocation of choco.exe

* Resolved pip install issues

* Removed some debugging residue

* Changing get_platform.py from tabs to spaces

* Added distro detection for ubuntu and darwin

* Using 4 spaces

* Added a newline after powershell invocation

* Added OS detection for freebsd and fedora

* Fixed bug with freebsd

* Adding arguments parsing to prepare for modularizing platform detection

* Removing bash platform detection logic and forwarding the task to
get_platform.py

* Removing get_platform support in provision.sh since it doesn't appear to
be used anywhere now

* Fixed some comment/spacing issues. Made a few efficiency changes

* A few bug fixes, revereted back to WIN32 variable for now

* Added Facebook copyright information.

* Fixed boost and rocksdb library paths

* Added support for installing our custom chocolatey packages

* Fixed path to ignore the symlink

* Force environment variable propagation

* Forgot to add new line after make-win64-dev-env.bat

* Added error handling for choco install failures

* Handles download and python/pip errors

* When chocolatey is not detected, refreshenv.bat is not found in the PATH.
Hardcode the PATH as per chocolatey install instructions

* Takes care of updating git submodules in third-party\

* Fixes a bug in which Linux provisioning fails because of unset FAMILY
env var.
2016-04-15 14:01:16 -07:00
Teddy Reed
192953bcd3 [Fix #2030] Add generate_foreign and --enable_foreign (#2034) 2016-04-11 09:33:45 -07:00
Teddy Reed
fd53f7ce6c Remove devel switch for brew's cpp-netlib package 2016-04-10 19:34:33 -07:00
Teddy Reed
97690b1b95 Merge pull request #1983 from theopolis/decorators
Introduce decorator queries
2016-03-30 21:04:31 -07:00
Justin Gerace
bdb17d7418 Add build support for Scientific Linux 2016-03-29 22:25:59 -07:00
himanshudas
10211d938b Merge missing package dependencies for Debian wheezy 2016-03-29 11:49:57 -07:00
Teddy Reed
fd0e520d20 Remove bashisms from CentOS7 systemd service 2016-03-29 10:12:04 -07:00
Teddy Reed
2379493721 Introduce decorator queries 2016-03-29 10:03:50 -07:00
Teddy Reed
d71fa5b46a Remove forking from systemd service 2016-03-27 15:11:20 -07:00
Matt Moran
f1bdf23d88 systemd properly supervised 2016-03-25 14:12:48 -07:00
Scott J. Roberts
9653b81833 Inconsistant Pathing
When I added the flag file switch it was aimed at `/var/osquery`, but the package is built such that everything exists in `/private/var/osquery`. This simply makes this more consistent.
2016-03-25 13:55:52 -04:00
Teddy Reed
27f4754e5e [Fix #1928] Reorder deps installs to build all with clang 2016-03-20 19:15:44 -07:00
Teddy Reed
0ab1a156cd Merge pull request #1882 from waywardmonkeys/patch-1
Fix typos in example conf.
2016-03-20 12:02:23 -07:00
Teddy Reed
15a998e54f Use the default shutdown flow within extensions 2016-03-20 01:45:49 -07:00
Teddy Reed
9f5de79af1 Fixup Debian package builds 2016-03-18 16:59:59 -07:00
Teddy Reed
c62a0f41b6 Various cleanups 2016-03-18 10:40:07 -07:00
Teddy Reed
621f1bd3a9 [Fix #1896] Gate additional and kernel tests/benchmarks 2016-03-15 23:05:37 -07:00
Teddy Reed
bb20a968d9 Merge pull request #1930 from theopolis/debug
Build debug packages
2016-03-15 11:12:56 -07:00
Teddy Reed
42222bd4a5 Build debug packages 2016-03-15 08:58:01 -07:00
Teddy Reed
0ba2861cf9 [Fix #1920] Detach thread before joining/clearing (terminate) 2016-03-13 12:15:18 -07:00
Teddy Reed
3de52846d0 Remove boost::thread 2016-03-11 11:50:44 -08:00
Teddy Reed
d3786c45a3 Merge pull request #1916 from theopolis/deps_updates
Several package updates within provision code
2016-03-10 20:26:04 -08:00
Teddy Reed
32efa9a09b Several package updates within provision code
1. Update boost to 1.60 from 1.55 on Linux platforms
2. Add asio (1.11.0) to the deps set
3. Update snappy to 1.1.3 on Linux platforms
4. Update cpp-netlib to 0.12.0-rc1 from 0.11 on Linux platforms
 - OS X and brew also include 0.12.0-rc1 as a devel option
5. Update libapt to 1.2.6 from 0.8.6 on Ubuntu/Debian
 - This adds lzma as a dependent link
2016-03-10 19:40:15 -08:00
readshaw
d0b16e37c4 Add option to specify and bundle TLS server cert chain file; and osqueryd is restarted in installation postinstall. 2016-03-10 10:12:34 +10:00
Teddy Reed
d8650c7630 Minor changes to support a Windows build 2016-03-08 10:47:38 -08:00
Teddy Reed
b5defa7436 Allow extensions to use the backing store 2016-03-08 08:56:03 -08:00
Teddy Reed
53c108d02e Merge pull request #1902 from theopolis/remove_glog
Remove Glog from third-party build
2016-03-07 14:53:32 -08:00
Teddy Reed
956ce75601 Remove Glog from third-party build 2016-03-07 12:54:00 -08:00
Teddy Reed
5f8fa32e21 [Fix #1901] Tear down TLS server runner 2016-03-07 09:38:37 -08:00
Teddy Reed
677c448dea Merge pull request #1897 from theopolis/remove_rdb
Refactor backing storage
2016-03-06 21:09:23 -08:00
Teddy Reed
afd17f8134 1. Reorganize RocksDB database handle into a plugin
2. Introduce a SQLite-based database plugin
3. Refactor database usage to include local 'fast-calls'
4. Introduce an 'ephemeral' database plugin for testing (like a mock)
2016-03-06 20:40:16 -08:00
Teddy Reed
5fbde8ec4f [Fix #1892] Build devmapper statically 2016-03-04 20:09:43 -08:00
Bruce Mitchener
2f61e18e56 Fix typos in example conf. 2016-03-01 13:07:07 +07:00
Matt Michie
b806529313 Update initd script to respect LSB values
The LSB init syntax is different than chkconfig, this was breaking Debian installation.
2016-02-24 13:59:10 -08:00
Teddy Reed
c314428c66 Merge pull request #1871 from theopolis/more_tests
Add fstests and reduce SQLite scope
2016-02-23 23:54:25 -08:00
Teddy Reed
897b2225b1 Add fstests and reduce SQLite scope 2016-02-23 17:09:02 -08:00
Teddy Reed
08a1d852a2 Add CXXFLAGS to deps build 2016-02-22 22:12:06 -08:00
Lex Neva
bcc901780f fix typo in config example 2016-02-22 11:37:29 -05:00
Teddy Reed
69e08f994e Allow build.sh target overrides 2016-02-22 00:10:48 -08:00
Teddy Reed
4d41f7e5ba [Fix #1746] Add SNI options for TLS plugins 2016-02-19 22:39:29 -08:00
Baraa Hamodi
21c2237eca [osquery] Update copyright headers to new format. 2016-02-11 11:48:58 -08:00
Teddy Reed
4031e299bb Cleanup/stabilize file_events-related APIs 2016-02-10 22:50:38 -08:00
Teddy Reed
02eb57fc47 Merge pull request #1832 from theopolis/pack_valid
Valid bool in packs for shard/plaform/version checking
2016-02-06 20:29:55 -08:00
Teddy Reed
cf22d4c60e Fix -A/.all contention via do_meta_command 2016-02-06 19:20:25 -08:00
Teddy Reed
a2754a01ef Valid bool in packs for shard/plaform/version checking 2016-02-06 17:54:56 -08:00
Teddy Reed
7f37304c77 Refactor dispatcher shutdown logic 2016-02-05 01:29:42 -08:00
Teddy Reed
5394fe62ec Add debug_package for OS X 2016-02-01 16:51:43 -08:00
Teddy Reed
3c09d69ef0 Remove deps and release from PR builds 2016-01-21 09:37:10 -08:00
Teddy Reed
d664c53ed0 Merge pull request #1784 from theopolis/docs_debug
Rollup of several docs and build fixes.
2016-01-20 15:56:53 -08:00
Teddy Reed
e4a8d74523 Fix RHEL7 systemd service 2016-01-20 14:31:02 -08:00
Teddy Reed
80a2e6f723 Merge pull request #1789 from theopolis/fix_1788
[Fix #1788] Use an array for the 'data' key in TLS logs
2016-01-20 12:18:21 -08:00
Teddy Reed
b9117b17a1 [Fix #1788] Use an array for the 'data' key in TLS logs 2016-01-20 11:59:14 -08:00
Scott J Roberts
1f0d5fb059 modified osqueryctl for flags based deploys 2016-01-20 13:00:49 -05:00
Teddy Reed
dfa32d9e7e Update OS X kernel building to include distro 2016-01-19 16:20:16 -08:00
Teddy Reed
e4593f86dc Update OS X package build script to use 10.11 2016-01-19 14:03:32 -08:00
Teddy Reed
1a12b41d76 Promote 10.11 to default darwin package builder 2016-01-16 15:47:26 -08:00
Teddy Reed
30b1627038 Merge pull request #1771 from theopolis/improve_tls
Improve TLS logging memory
2016-01-15 00:50:56 -08:00
Teddy Reed
d6e91c81e9 Improve TLS logging memory 2016-01-15 00:22:31 -08:00
Teddy Reed
ec119f852f Merge pull request #1766 from sharvilshah/wifi_plist_parsing_fix
[Fix #1760] Fix wifi_networks for OS X 10.9
2016-01-14 00:58:09 -08:00
Sharvil Shah
826643adf8 [Fix #1760] wifi_networks now takes into account slight differences b/w OS X 10.9 and later 2016-01-13 22:52:52 -08:00
Teddy Reed
0ff07096bd [#1641] Add CentOS 7 systemd service and sysconfig 2016-01-13 09:27:54 -08:00
Teddy Reed
18528e7750 Merge pull request #1761 from theopolis/fix_benchmarks
Unify build script and fix EVENTS benchmarks
2016-01-12 18:11:24 -08:00
Teddy Reed
832c3cfcce Unify build script and fix EVENTS benchmarks 2016-01-12 17:09:52 -08:00
Teddy Reed
21b3af199e Allow packs to add file_path categories 2016-01-08 17:59:19 -08:00
Teddy Reed
7c38cf17d9 Add support for make packages on Debian 2016-01-07 23:50:31 -08:00
Sharvil Shah
82995771e1 Build on Debian 7 (Wheezy)
Install GCC 4.8.4 from source, so that we have C++11 features
and can build RocksDB

Fix #1745
2016-01-05 16:31:20 -08:00
Teddy Reed
41b5ca545f [Fix #1736] Do not cache TLS node key within enroll plugin 2015-12-17 16:44:30 -08:00
Teddy Reed
2ec5d34291 Bump non-OS X TSK builds to 4.2.0 2015-12-14 23:43:08 -08:00
Teddy Reed
fbc8fb92dc Allow --config_dump with watcher 2015-12-14 16:19:37 -08:00
Teddy Reed
1636abeed6 Update Fedora to use dnf, RocksDB to 4.1 2015-12-14 15:24:11 -08:00
Teddy Reed
2fe800d9b8 Add ASAN blacklists for GFlags and RocksDB 2015-12-14 15:09:46 -08:00
Teddy Reed
9d394065e3 [#1636] Add simple sharding to packs and pack queries 2015-12-10 10:01:53 -08:00
Teddy Reed
b88d6816f3 Additional TSK tables 2015-12-07 08:36:22 -08:00
Teddy Reed
c020bb87b4 Merge pull request #1705 from theopolis/dump
[#1702] Add config and database dumping to stdout
2015-12-06 21:41:31 -08:00
pathcl
6c8cc20117 PEP8 Compliance && Python 3.X compatibility
Signed-off-by: Teddy Reed
Merge-conflicts-by: Teddy Reed

Closes: #1586
2015-12-06 20:57:30 -08:00
Teddy Reed
9ebd292eb6 [#1648] Support multiple loggers 2015-12-06 11:10:10 -08:00
Teddy Reed
fef53fa0d0 Add config and database dumping to stdout 2015-12-06 11:01:26 -08:00
Teddy Reed
1acba4dfa6 Merge pull request #1700 from theopolis/tsk2
TSK integration and example tables
2015-12-04 11:26:03 -08:00
Teddy Reed
f687a84840 [Fix #1689] Remove C-style comments from config examples 2015-12-04 11:08:54 -08:00
Teddy Reed
373ce339dc TSK integration and example tables 2015-12-04 11:08:51 -08:00
Teddy Reed
e5bc6410ba Merge pull request #1697 from theopolis/fix_1660
[Fix #1660] Prevent spurious NETLINK recv retries
2015-12-02 23:56:39 -08:00
Teddy Reed
4dc6b9f0a3 [Fix #1660] Prevent spurious NETLINK recv retries 2015-12-02 23:33:20 -08:00
Teddy Reed
ffb5b7020e [Fix #1693, #1527] Add osquery-specific query planner output 2015-12-02 19:57:24 -08:00
Mykola Kokalko
652e5a24f3 [Fixed] build for lucid
[Added] python packages which are not installable via pip on lucid

[Moved] installing latest bison and openssl right before thrift building for lucid

[Fixed] package bison installation for not lucid

[Added] OpenSSL dependency for lucid

[Changed] prefix to /usr/local

[Fixed] wrong file for checking if dependency is intalled
2015-11-30 17:49:31 +01:00
Teddy Reed
44286eb611 Add hardware/internal (monitoring) packs and reduce FPs, duplicate queries 2015-11-26 16:00:53 -08:00
Teddy Reed
204b16a946 Merge pull request #1675 from theopolis/planner_or
Fix constraints stacking
2015-11-24 12:25:15 -08:00
Teddy Reed
3221fbd9b3 Fix constraints stacking 2015-11-22 22:53:23 -08:00
Teddy Reed
a3a05e7e1e [#1527] Add a --profile option to the shell, replace 'run' 2015-11-21 22:45:40 -08:00
Teddy Reed
98f212e7a9 Add a SQLite query planner for type detection 2015-11-15 13:56:16 -08:00
Teddy Reed
cef8f59054 Merge pull request #1639 from theopolis/cache
Table results caching
2015-11-14 16:22:24 -08:00
Teddy Reed
e1d7511600 Remove column type string representations 2015-11-14 15:57:30 -08:00
Teddy Reed
c2be670806 Table results caching
1. Table implementations (spec files) can mark the table as 'cachable'.
2. Cached results depend on the shortest/quickest interval of scheduled
queries that act on results of the table.
3. The table API generator blocks caching on index/additional/required
table column options.
2015-11-14 15:57:23 -08:00
Andrew Dunham
4ccdcc7864 Allow setting the mode of log files
This also sets the appropriate flags in glog
2015-11-11 11:37:55 -08:00
Teddy Reed
28bdcecc19 Custom flaky test marker 2015-11-08 02:29:49 -08:00
Teddy Reed
b29168a7b7 Use a null DB for the run test binary 2015-11-04 10:39:40 -08:00
Teddy Reed
5aa225d4c3 Merge pull request #1619 from sharvilshah/wifi
Implement wifi_networks tables for OS X
2015-11-02 16:11:21 -08:00
Teddy Reed
15215cdbc0 Add persistent splays 2015-11-02 14:10:04 -08:00
Teddy Reed
6aae4c9aa0 Fix tests and shell escape errors (faults) 2015-11-02 10:57:01 -08:00
Teddy Reed
50550e607a Build and provision edits for FreeBSD CI 2015-11-02 01:47:09 -08:00
Sharvil Shah
9a6d6d1293 Implement wifi_networks tables for OS X
If the option of remembering known Wi-Fi networks is enabled on a system,
they are persisted to disk as a preferences property list file.
This table is populated by parsing that file.
2015-11-01 16:53:51 -08:00
Teddy Reed
6a07135648 Passing clang Address/Leak Sanitize version 3.7 2015-11-01 04:00:21 -08:00
Teddy Reed
cd8f42844a Mark flaky integration tests 2015-10-28 09:40:17 -07:00
Teddy Reed
8ca2925ef0 [Fix #1583] Require osqueryd to have R/W access to RocksDB 2015-10-27 16:09:24 -07:00
Teddy Reed
654830cf11 Merge pull request #1594 from rcseacord/additional-sign-fixes
eliminated some warnings from Clang 3.7 analyze mode
2015-10-23 13:03:54 -03:00
Robert C. Seacord
1d9695ac31 eliminated some warnings from Clang 3.7 analyze mode 2015-10-21 06:02:58 +00:00
Teddy Reed
7ba87a88bb Merge pull request #1585 from rcseacord/additional-sign-fixes
Additional sign fixes
2015-10-19 11:25:18 -07:00
Scott J Roberts
1258800279 basic flag added
wrong thing on the clipboard

updated to ProgramArguments vs Program per theopolis
2015-10-19 11:56:12 -04:00
Robert C. Seacord
acb2f6f628 eliminating diagnostics, mostly for comparisons between signed and unsigned operations 2015-10-16 16:10:37 +00:00
Teddy Reed
c26f7bf8da Merge pull request #1565 from PickmanSec/master
added comment parsing for profile.py
2015-10-15 12:19:59 -07:00
Teddy Reed
2e7415f871 Convert wiki to UNIX format and refresh most content 2015-10-15 12:18:16 -07:00
Michael George
ed00e54aa7 added comment parsing
added packs to profiling

added comment scrubing.
2015-10-14 17:04:38 -07:00
Luis San Martin
0f0d873a96 sudo added as requeriment 2015-10-14 20:05:12 -03:00
Teddy Reed
1c12d274f4 Minor fix, return an empty query data 2015-10-13 09:25:10 -07:00
Teddy Reed
0440bb970f Fix test_5_daemon_sigint, and hardware_events tests 2015-10-13 08:40:23 -07:00
Javier Marcos
7442392c7f Fixing default configuration syntax, trailing comma 2015-10-09 14:50:00 +02:00
Mike Arpaia
5789d889f4 Merge pull request #1538 from marpaia/discovery_queries
[fix #1536] Schedule iteration pass-by-reference
2015-09-30 15:50:05 -07:00
Mike Arpaia
65df593d33 [fix #1536] Schedule iteration pass-by-reference
There was a bug in the `osquery::Schedule` container object such that,
when the iteration through the schedule occured, pack objects were being
passed by value (copied) instead of passed by reference. Thus, the
discovery query would be executed, the object's cache would be updated,
and then the object would go out of scope and be destructed, thus
leaving the original object without ever having ran the discovery query.
This caused discovery queries to thrash. Bad times.

I added a new test so that we don't regress here as well as const'd a
few functions that should have been const in `osquery::Pack`.
2015-09-30 15:41:43 -07:00
Teddy Reed
ad4b41cb84 Merge pull request #1524 from mathieuk/build_on_debian_wheezy_with_benchmark_change
Build on debian wheezy with recent changes
2015-09-30 13:32:55 -07:00
Mathieu Kooiman
d26d12a63c Make osquery build on debian again 2015-09-30 19:37:56 +02:00
Teddy Reed
bb65ec49ac [#1488] Shutdown Linux event publishers responsibly 2015-09-22 23:06:23 -07:00
Teddy Reed
7852c356ec Merge pull request #1494 from theopolis/signals
[#1488] Use signal handlers for teardown and reloading
2015-09-15 16:14:40 -07:00
Teddy Reed
7c2a625ef2 Use signal handlers for teardown and reloading 2015-09-14 16:57:00 -07:00
Teddy Reed
944e3de206 Merge pull request #1496 from theopolis/events_table
[#1487] Add osquery_events table to track pubsub stats
2015-09-14 15:27:35 -04:00
Mike Arpaia
aaa03a1058 Distributed queries client-side 2015-09-08 13:33:48 -07:00
Teddy Reed
b57040db60 Add osquery_events table to track pubsub stats 2015-09-03 15:10:53 -07:00
Teddy Reed
2813d3ab87 Add a Linux audit event publisher 2015-09-03 08:45:02 -07:00
Mike Arpaia
a140333441 [fix #1390] query pack re-org
This commit contains the features specified in #1390 as well as a
refactoring of the general osquery configuration code.

The API for the config plugins hasn't changed, although now there's a
`genPack` method that config plugins can implement. If a plugin doesn't
implement `genPack`, then the map<string, string> format cannot be used.
The default config plugin, the filesystem plugin, now implements
`genPack`, so existing query packs code will continue to work as it
always has.

Now many other config plugins can implement custom pack handling for
what makes sense in their context. `genPacks` is not a pure virtual, so
it doesn't have to be implemented in your plugin if you don't want to
use it. Also, more importantly, all config plugins can use the standard
inline pack format if they want to use query packs. Which is awesome.

For more information, refer to #1390, the documentation and the doxygen
comments included with this pull requests, as well as the following
example config which is now supported, regardless of what config plugin
you're using:

```json
{
  "options": {
    "enable_monitor": "true"
  },
  "packs": {
    "core_os_monitoring": {
        "version": "1.4.5",
        "discovery": [
          "select pid from processes where name like '%osqueryd%';"
        ],
        "queries": {
          "kernel_modules": {
              "query": "SELECT name, size FROM kernel_modules;",
              "interval": 600
          },
          "system_controls": {
              "query": "SELECT * FROM system_controls;",
              "interval": 600,
              "snapshot": true,
          },
          "usb_devices": {
              "query": "SELECT * FROM usb_devices;",
              "interval": 600
          }
        }
    },
    "osquery_internal_info": {
        "version": "1.4.5",
        "discovery": [
          "select pid from processes where name like '%osqueryd%';"
        ],
        "queries": {
          "info": {
              "query": "select i.*, p.resident_size, p.user_time, p.system_time, time.minutes as counter from osquery_info i, processes p, time where p.pid = i.pid;",
              "interval": 60,
              "snapshot": true
          },
          "registry": {
              "query": "SELECT * FROM osquery_registry;",
              "interval": 600,
              "snapshot": true
          },
          "schedule": {
              "query": "select name, interval, executions, output_size, wall_time, (user_time/executions) as avg_user_time, (system_time/executions) as avg_system_time, average_memory from osquery_schedule;",
              "interval": 60,
              "snapshot": true
          }
        }
    }
  }
}
```

The `osquery_packs` table was modified to remove the superfluous
columns which could already have been found in `osquery_schedule`. Two
more columns were added in their place, representing stats about pack's
discovery query execution history.

Notably, the internal API for the `osquery::Config` class has changed
rather dramatically as apart of the refactoring. We think this is an
improvement. While strictly adhering to the osquery config plugin
interface will have avoided any compatibility errors, advanced users may
notice compilation errors if they access config data directly. All
internal users of the config have obviously been updated. Yet another
reason to merge your code into mainline; we update it for you when we
refactor!
2015-09-02 10:56:26 -07:00
Teddy Reed
d63510f8bd Remove benchmark from third-party, prefer deps-build 2015-08-31 15:01:13 -07:00
Teddy Reed
4dd77a43a7 Remove cpp-netlib from third-party, prefer deps-build 2015-08-31 09:27:01 -07:00
Javier Marcos
1a50977a23 Adding magic table to check for libmagic data 2015-08-28 12:49:46 -07:00
Dave Gosselin
6899127e1e Add support for building on Fedora 21 2015-08-25 11:10:56 -04:00
Mathieu Kooiman
b151ecedc2 Refs https://github.com/facebook/osquery/issues/320
Add provisioning scripts to build osquery on Debian Wheezy and Debian Jessie.
2015-08-20 20:57:22 +02:00
Teddy Reed
73da2f1448 Merge pull request #1443 from sharvilshah/libressl
[#1329] Statically link against brew bottled libressl on OS X
2015-08-18 01:09:45 -07:00
Teddy Reed
fb93b73253 Merge pull request #1450 from eastebry/fix-package-dependencies
Fix lucid package building
2015-08-17 16:04:00 -07:00
Teddy Reed
5bf30a779d RocksDB usage speedups 2015-08-15 20:43:53 -07:00
Bryan Eastes
1ac7c5d21a Installing specific FPM version 2015-08-15 15:11:29 -07:00
Sharvil Shah
ccc086f050 Statically link against brew bottled libressl on OS X
* It wasn't straightforward to get OpenSSL building
 without avx/vxoprs optimizations on 10.10
* libressl is essentially a modern/lean-ish drop-in replacement for OpenSSL
and can build without avx optimizations to support older Macs

This change:

* Installs libressl (builds a bottle) using homebrew
* And statically links `libcrypto.a` and `libssl.a` unless
`BUILD_LINK_SHARED` is requested.

Fixes #1329
2015-08-13 15:31:26 -07:00
Javier Marcos
ee98bbde67 Fix for the version variable 2015-08-13 07:02:24 +02:00
Teddy Reed
251aded11c Merge pull request #1442 from javuto/darwin_package_10.9
Updating the script to create packages for 10.9 building
2015-08-12 18:16:36 -07:00
Teddy Reed
fd1b4b06e8 Merge pull request #1436 from theopolis/pack_place
[#1402] Add notes around pack paths in example.conf
2015-08-12 18:15:50 -07:00
Teddy Reed
b9ded9e7af [#1402] Add notes around pack paths in example.conf 2015-08-12 17:15:42 -07:00
Javier Marcos
861e0e4273 Using the code in lib.sh 2015-08-13 00:53:44 +02:00
Javier Marcos
54cb08c193 Updating the script to create packages for 10.9 building 2015-08-12 20:34:50 +02:00
Teddy Reed
ea0ca195f6 Update build/test for 10.9 (do not test extension)
OS X 10.9 should not build/test a kernel extension yet. The MAC policy framework is slightly different and the APIs/version dependencies need to be tested.
2015-08-12 10:40:53 -07:00
Sharvil Shah
e4f52589f5 Remove -mtune compile flag
Having `-mtune=i386` is causing compilation failure for gflags on ubuntu.
This change removes the `mtune` compile flag.
`-march` flag is already set to `x86-64` and according to gcc doc,
Specifying `-march=cpu-type` implies `-mtune=cpu-type.`

Fixes #1428
2015-08-06 17:14:33 -07:00
Teddy Reed
67b0f51ab5 Several small optimizations around internal SQL queries 2015-08-03 07:56:55 -07:00
Michael O'Farrell
dda11ce74a Executable size benchmark change. 2015-07-30 15:44:25 -07:00
Michael O'Farrell
346743e87f Benchmark using mean across 5 runs. 2015-07-29 16:50:19 -07:00
Michael O'Farrell
5956e685e9 Report bytes using word count 2015-07-29 15:10:20 -07:00
Michael O'Farrell
46ee4b491c Benchmark stripped binary size. 2015-07-29 11:35:04 -07:00
Michael O'Farrell
0cb5730d55 Added benchmark for executable size. 2015-07-28 22:34:22 -07:00
Teddy Reed
ff9cb71628 Various additional tests and benchmarks 2015-07-28 12:26:17 -07:00
Elan Ruusamäe
bb40956844 don't qualify any system with lsb-release as ubuntu 2015-07-25 14:52:59 +03:00
Michael O'Farrell
66b075a685 Merge pull request #1377 from mofarrell/benchmark
Added benchmarking targets.
2015-07-23 17:37:56 -07:00
Michael O'Farrell
a65f8dd93c Added benchmarking targets. 2015-07-23 17:07:42 -07:00
Teddy Reed
f03ec9ddac [Fix #1368] Restore autostart post-install scripts 2015-07-21 19:09:24 -07:00
Teddy Reed
fc24682816 Fix profile platform bug in leaks checking 2015-07-20 02:06:52 -07:00
Teddy Reed
95775be1d9 [Fix #1355] Allow plist keys with '.'
Boost property trees are level delimited using '.' characters.
An Apple property list may contain keys with '.' characters, so the plist conversion must use iterators and raw node appends.
2015-07-19 16:24:43 -07:00
Teddy Reed
a713d09f0e Install additional configs for HB/packages 2015-07-17 16:07:22 -07:00
Teddy Reed
270b4da540 [Fix #1339] Add kernel-build to packages when used 2015-07-16 15:23:29 -07:00
Javier Marcos
7241becda1 Fix tables JSON file name 2015-07-16 13:38:31 -07:00
Javier Marcos
84e0c77a98 Generation of table docs with packages and docs targets 2015-07-16 12:23:44 -07:00
Javier Marcos
01fabf910d Merge pull request #1343 from javuto/generate_tables_output
Adding support to generate documentation to external files
2015-07-15 17:10:27 -07:00
Javier Marcos
ba69bf8efa Adding support to generate documentation to external files 2015-07-15 13:18:41 -07:00
Teddy Reed
341245f751 Build/install gflags' static library on build hosts.
As of [homebrew #41151](https://github.com/Homebrew/homebrew/pull/41151) gflags is not installed with a static library.
Our build hosts must have static versions of gflags.
2015-07-14 17:20:55 -07:00
Teddy Reed
c269bbeaf3 Rollup of build changes 2015-07-14 13:45:53 -07:00
Teddy Reed
19d7a9e735 Merge pull request #1328 from mofarrell/kernel
Fixed cleanup in testing script in failure cases.
2015-07-13 16:41:44 -07:00
Michael O'Farrell
b2b1f0483d Fixed cleanup in testing script in failure cases. 2015-07-13 16:11:45 -07:00
Teddy Reed
0e49a3a9a1 Build separate OS X packages 2015-07-13 15:44:16 -07:00
Michael O'Farrell
dd1f0af0ff Build system changes for kernel extension testing and deployment. 2015-07-09 11:50:23 -07:00
Michael O'Farrell
0284b9e60d Merge branch 'master' into kernel
Conflicts:
	mkdocs.yml
2015-07-08 10:26:32 -07:00
Teddy Reed
f48619ed28 [#1285, #1276] Faster, optimized subscriber results 2015-07-07 00:59:28 -07:00
Matthew White
11f447a959 Minor fixes to support building on Ubuntu 10.04 2015-07-06 15:18:11 -07:00
Teddy Reed
7aac5fd358 Replace custom wildcarding with POSIX-glob
POSIX-globbing will allow event publishers/subscribers to post-check
results against glob-syntax, fnpath matching, and POSIX C-regex.
These checks are anecdotally speedy.
2015-07-02 13:53:16 -07:00
Teddy Reed
64e4afa136 Merge pull request #1294 from theopolis/relax_test_timesouts
Relax extensions and shell timeouts
2015-07-02 13:50:07 -07:00
Teddy Reed
89e5b6c729 Relax extensions and shell timeouts 2015-07-02 12:14:44 -07:00
Mike Arpaia
ba89b67cc5 Install snappy headers instead of just the library
We found that not installing the headers for snappy caused RocksDB's
snappy detection to not find that snappy was installed:
https://goo.gl/YOWJl0

The snippet there requires that the headers are installed, not just the
library. By installing the headers, we can ensure that snappy is linked.

OR, alternatively, we could just leave it and not link snappy. It's
uncertain what the specific benefits of including snappy are for our
use-case. (CC @igorcanadi)
2015-07-01 16:14:06 -07:00
Michael O'Farrell
a7bd4bd3db Merge pull request #1278 from facebook/master
Merge branch 'master' into kernel
2015-06-30 13:12:16 -07:00
Teddy Reed
757940fe6f Towards CMake-powered kernel extension building 2015-06-30 00:49:16 -07:00
Mike Arpaia
06793f9d00 Merge pull request #1267 from marpaia/osquery-latest-no-more
Remove "latest" from the osquery package names
2015-06-29 15:09:31 -07:00
Teddy Reed
0d6ab16281 Yara events was not building 2015-06-29 14:45:31 -07:00
Mike Arpaia
d6719f9ef7 Remove "latest" from the osquery package names 2015-06-29 11:18:49 -07:00
Teddy Reed
8db6ca4a3f [Fix #1198] Add a small retry to ext watcher 2015-06-28 02:12:50 -07:00
Teddy Reed
5566d8cd96 Merge pull request #1194 from theopolis/lucid-build
Loose support for building on Ubuntu 10.04
2015-06-27 20:47:53 -07:00
Teddy Reed
e7ed68e187 [Fix #1198] Faster death/timeout checks in extensions tests 2015-06-25 02:53:53 -07:00
Sharvil Shah
368517c6a6 Use psutil's Process.children() instead of Process.get_children() as the latter has been deprecated.
Process.get_children() had been deprecated in psutil 2.x and is compeletely removed in 3.x versions
in favor of Process.children().

This fixes #1220.
2015-06-23 16:44:05 -07:00
Mike Arpaia
2b9bbb6bd4 Merge pull request #1223 from marpaia/yara-3.4.0
updating yara to 3.4.0
2015-06-22 09:33:25 -07:00
Teddy Reed
37188f788b Fixups in tables, add DOUBLE, shell extensions 2015-06-22 04:17:23 -04:00
Mike Arpaia
6f85f2f617 updating yara to 3.4.0 2015-06-21 11:40:51 -04:00
Teddy Reed
46ceb7aa6d Merge pull request #1213 from theopolis/certs2
Update testing x509 certs
2015-06-13 02:24:29 -07:00
Teddy Reed
2fb774218a Update testing x509 certs 2015-06-13 02:13:31 -07:00
Teddy Reed
e7ab2fc47b Limit scope of git/tag version defines.
Harden plist parsing against internal fuzzing tests.
Improve file/stream read speeds.
2015-06-12 10:10:20 -07:00
Teddy Reed
727f5b091f Various table perf improvements and TLS docs 2015-06-05 22:03:15 -07:00
Teddy Reed
ccb1c2cd69 Loose support for building on Ubuntu 10.04 2015-06-04 18:25:49 -07:00
Teddy Reed
4e59bcf4c1 Merge pull request #1191 from theopolis/feature-backoffs
[#1190] Schedule queries without logging removed results
2015-06-04 14:58:19 -07:00
Teddy Reed
a678f8f46a Merge pull request #1192 from theopolis/rocksdb-from-homebrew
[Fix #1185, #1183] Use RocksDB from Homebrew on OS X
2015-06-04 14:34:52 -07:00