Commit Graph

5432 Commits

Author SHA1 Message Date
Teddy Reed
a9770451c5
magic: Check return from magic_file (#6363) 2020-04-05 18:50:08 -04:00
Teddy Reed
ab8c1d8d4e
macos: Use -1 for missing ppid in process_events (#6339)
Use -1 for missing ppid in process_events
2020-04-04 20:50:26 -04:00
Stefano Bonicatti
5a2ad2636d
Update OpenSSL to version 1.1.1f and fix build (#6359)
- Add fallback url to download the openssl tar.gz from the "old" archives
- Add URL_HASH to the openssl external project,
  to avoid to redownload the archive if it has been alredy downloaded
  and the integrity is verified
- Update curl_certificate table to use the newer openssl API,
  so that it builds.
2020-04-03 18:58:53 -04:00
Stefano Bonicatti
c22ab5c404
Simplify how third party libraries formula work (#6303)
Remove a level of indirection when configuring and building formulas.
This should simplify working with them and also remove some issues
encountered when trying to build on Windows.
2020-03-31 15:45:20 +02:00
Christopher Bennett
c3e052c8be
Add socket_events table for socket auditing in MacOS (#6028)
Co-authored-by: Teddy Reed <teddy@casualhacking.io>
2020-03-31 09:38:31 -04:00
kumarak
58d0671271
Extend the fields of curl_certificate table (#6176)
Co-authored-by: Stefano Bonicatti <stefano.bonicatti@gmail.com>
2020-03-31 09:34:36 -04:00
Robbie Ostrow
3486bf3a67
add status column to deb_packages table (#6341) 2020-03-31 09:32:25 -04:00
Teddy Reed
7920c2ea7d
macos: Fix processes cmdline parsing (#6340) 2020-03-30 14:22:22 -04:00
Teddy Reed
46a46da051
Return after check/dump requests in init (#6334) 2020-03-29 19:59:55 -04:00
outSH
b428e4ea55
[Table sanity check] disk_info (#6323) 2020-03-29 13:26:23 -04:00
puffyCid
d974bb34f0
Add UserAssist table (#5539) 2020-03-29 13:25:26 -04:00
Teddy Reed
bb861fb9d1
tests: Keep proc instance for test_base and test_osqueryd (#6335) 2020-03-28 12:03:58 -04:00
Stefano Bonicatti
296c6d336e
Update openssl to 1.1.1d (#6302)
- Update libarchive to build from source on Windows and macOS

- Update yara to build from source on macOS

- Update librdkafka to build from source on macOS

- Build librdkafka with SSL and SASL_SCRAM support on Linux

- Update librpm to 4.15.1 to support the newer openssl

- Update libxml2 to build from source on Windows and macOS

- Update lzma to build from source on Windows and macOS

- Use ICU library not only for boost but libxml2 too

- Implement a workaround to have Buck builds still compile
  with the old openssl version
2020-03-27 17:11:43 +01:00
Stefano Bonicatti
ef2763afbc
Hotfix a use-after-free accessing rows data (#6328)
When a query triggers multiple xFilter calls
and there's an operation that has to work on the sum of rows
resulting from all those calls, we trigger a use-after-free
when such operation tries to access the rows data.

This happens because each xFilter call we clear the rows
resulting from the previous xFilter call, and because
when returning the values of a text column we don't copy it,
but return a pointer to it.

A contrived example of a query with the issue is:
SELECT path=count(*) FROM file WHERE path = '/' OR path = '1'

This changes the last sqlite3_result_text parameter
from SQLITE_STATIC to SQLITE_TRANSIENT.

Addresses https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20833
2020-03-26 22:17:13 -04:00
Ateeq Sharfuddin
8ca769ce02
Fix: broken Unicode filename searches on Windows (#6291) 2020-03-26 20:29:37 -04:00
Stefano Bonicatti
e70de5b8a7
Fix stack overflow when parsing deeply nested configs (#6325)
Parsing a configuration file as a JSON document
which contains deeply nested elements can lead to a stack overflow
when using the recursive parser of RapidJSON.
Since the configuration isn't changed or parsed frequently,
use the slower iterative parser instead.

Copying the configuration JSON document
that contains deeply nested elements, using the CopyFrom API,
can lead to a stack overflow, due to the recursive nature
of the RapidJSON GenericValue construction.
Detect the depth/nesting level of a config document
and limit it to 32 levels.

Using an iterative parser, while it avoids stack overflows,
can cause memory exhaustion if the config size is too big.
Limit the maximum config size, stripped from its comments, to 1MiB.

Addresses https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20779
2020-03-26 20:25:42 -04:00
Stefano Bonicatti
8b8462d021
Fix chromeExtensions.test_sanity failure (#6324)
Removed the columns "script" and "match" from the test
since they do not belong to the chrome_extensions table,
they belong to chrome_extension_content_scripts.

Added the missing integration test for the table
chrome_extension_content_scripts.
2020-03-26 20:23:12 -04:00
Stefano Bonicatti
29697f6ba8
Fix TLSConfigTests.test_runner_and_scheduler failing (#6308)
Do not close the http server after 10s if there are requests coming,
since some tests may take more than 10s to run.
Reset the timer each time a request is received by the server instead.
2020-03-26 20:22:02 -04:00
Stefano Bonicatti
7ff9cf5a3f
Update osquery-toolchain to the 1.1.0 version (#6315)
This new toolchain contains a newer LLVM version (9.0.1),
a fix for the scan-build scripts and it keeps the LLVM static libraries,
necessary to implement the new BPF framework and tables.
2020-03-24 16:19:32 +01:00
Stefano Bonicatti
2e84e8cdf1
Fix parsing an invalid decorators config (#6317)
The "decorators" configuration value must be a JSON object,
otherwise we try to search through its inexistent members
and dereference a null pointer.

Added also a regression test.

Addresses https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19274
2020-03-20 08:39:08 -04:00
Stefano Bonicatti
0409360ace
Fix assert used to check the retcode in test_5_daemon_sigint (#6318)
Partially addresses #6300
2020-03-20 08:37:25 -04:00
Stefano Bonicatti
17aa6f2b4f
Azure Pipelines: Fix Python2 discovery in Buck builds (#6311)
In the past the Windows agent changed the path where Python2
was installed; a special logic was added which should've tested
if the path existed, though it wasn't correct in the case
the powershell script is configured to be aborted at the first error.

Since the old path should not be present anymore,
we simply remove the logic and use the path we expect to exist.
2020-03-19 09:54:03 -04:00
Stefano Bonicatti
58be58c29d
Azure Pipelines: reclaim disk space after building (#6307)
With the increasing size of the build and the respective ccache
and sccache caches, the disk space sometimes is not enough
and the build fails.
This deletes the build folder as the last step since it shouldn't
be necessary anymore.
2020-03-18 10:06:29 -04:00
Nick Collier
09c5246823
Make AWS kinesis status logging configurable (#6135) 2020-03-15 21:04:03 -04:00
Jason Meller
309ca4a510
Add new macOS virtual table screenlock (#6243) 2020-03-15 21:03:16 -04:00
scoders-tob
4e5dcd9832
Adding LXD tables (#6249)
Co-authored-by: Stefano Bonicatti <stefano.bonicatti@gmail.com>
2020-03-15 21:02:18 -04:00
Breakwell
aeaf6249ce
If osquery fails to get the service description log a warning message and continue (#6281) 2020-03-15 21:01:04 -04:00
Exane Server Team
f61c0cace6
Fix 5569 pci ids on redhat like v2 (#6297) 2020-03-15 20:55:35 -04:00
Alessandro Gario
7560e3c26f
libs: Update the bzip2 remote URL (#6296) 2020-03-12 13:20:40 +01:00
Ivan Tse
4a4d52dbce
Fix database_dump for rocksdb (#6272) 2020-03-07 07:50:43 -05:00
flappy-sh
d9faba2d9e
Build librdkafka on Windows (#6095) 2020-03-06 15:06:55 -05:00
seph
1374238ed7
Add link to older releases (#6283)
Add a link to the README to the older documentation.
2020-03-03 20:35:46 -05:00
seph
ae66d8f3bc
Add path to ATC generated specs (#6278)
Add the `path` column to the ATC generate specs. This matches the existing data, as it is already includes in the returned rows.
2020-03-01 08:42:21 -05:00
Teddy Reed
983d2a30a4
tests: Fix flaky ProcessOpenFilesTest.test_sanity test (#6185) 2020-02-29 07:48:41 -05:00
Teddy Reed
036ef013fb
udev: Log errno for udev ERROR messages (#6186)
Co-Authored-By: Ryan Wilson <ryantimwilson@fb.com>
2020-02-29 00:24:50 -05:00
seph
6a6d08a247
Fix initialization of profiles variable (#6277)
Fix initialization of profiles variable by moving into into the for loop.
2020-02-28 12:44:13 -05:00
seph
85ac165405
Fix link in changelog (#6275)
Fix PR link in changelog
2020-02-28 12:06:08 -05:00
Ateeq Sharfuddin
b63dc57e24
fix: on Windows use UTF-8 strings instead of system default locale strings (#6190) 2020-02-28 11:12:22 -05:00
Oleg Dolgov
d3a10a33e7
check for errors return status from extension table. (#6108) 2020-02-28 11:03:04 -05:00
Jason Meller
a7655d3e37
Add new virtual table windows_security_center (#6256) 2020-02-28 10:51:55 -05:00
Ivan Tse
5d830021ea
Update unwanted-chrome-extensions.conf queries to include all users (#6265) 2020-02-28 10:18:36 -05:00
Stefano Bonicatti
3c544388c7
Azure Pipelines: Do not ignore a build failure on Windows (#6270)
When the batch script that implements the build step has been
changed to stop the sccache server as the last command,
all build failures started to be ignored because the last command,
always succeeding, was clearing out the exit status.
Batch scripts do not have a global "exit on error" option,
so manually checking the error level and exiting with such error is needed.
2020-02-27 16:02:37 +01:00
Fritz
d727e6bd3d
Fix typing issue with CFNumber conversion (#6273)
Fix typing issue with CFNumber conversion
2020-02-26 22:51:42 -05:00
Stefano Bonicatti
edf5de0a28
Limit regex_match and regex_split regex size (#6267)
* Limit regex_match and regex_split regex size

Add a new HIDDEN_FLAG, regex_max_size, with a default of 256 bytes,
which limits the size of the regex that can be used
with regex_match and regex_split SQL functions.

This is done since it's possible to create a regex
which makes the std::regex destruction go into a stack overflow,
due to too many alternate states (|).

Add a couple of tests to verify that the limit is correctly respected.

Restore the test for regex_split that was originally hanging when using
boost.
2020-02-27 01:37:49 +01:00
seph
b85f8cb00a
Non-error status messages should be verbose (#6271)
Non-error status messages should be verbose
2020-02-25 21:18:02 -05:00
Alessandro Gario
f3ca4f54db
libs: Update cmake/source/SQLite to version 3.31.1 (#6252) 2020-02-24 11:03:12 +01:00
scoders-tob
3eae135bc1
Adding docker_container_fs_changes table (#6178)
* adding docker pip package to dockerfile

* adding docker fs changes table

Co-authored-by: scoders <sahil@cs.toronto.edu>
2020-02-24 01:00:38 +01:00
Rachel Cipkins
3de799ef07
Support for "matches" and "js" keys from "content_scripts" in the chrome_extensions table (#6140)
Co-authored-by: William Woodruff <william@yossarian.net>
2020-02-21 18:13:41 -05:00
Antoinette
57ffaa89fc
Updating memory_info_ex function call to non-deprecated function (#6259)
Swap profile.py to non-deprecated memory_info
2020-02-20 15:59:39 -05:00
seph
d3c97d4f9c
Add the TSC to the contributing file (#6253)
Adds a section on the TSC to the contributing file.
2020-02-20 14:50:22 -05:00