Commit Graph

5618 Commits

Author SHA1 Message Date
Teddy Reed
c32953e139
events: Remove selectAllFrom from linux process events callback (#6638) 2020-09-08 16:16:22 -04:00
Teddy Reed
4f9ab34581
libs: Set glog and gflags includes as SYSTEM (#6635) 2020-09-08 16:15:44 -04:00
Teddy Reed
aae2b809ad
tests: Fix flaky test_2_daemon_with_option (#6634) 2020-09-07 08:40:08 -04:00
Teddy Reed
3759430a87
tests: Improve the reliability of TLSServerRunner (#6632) 2020-09-07 08:38:55 -04:00
Teddy Reed
26b53c5b48
database: Move initialization retry logic into DB API (#6633) 2020-09-07 08:38:14 -04:00
Artemis Tosini
ea70cde29d libs/smartmontools: Add aarch64 support
Co-Authored-By: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-09-05 16:50:28 -04:00
Artemis Tosini
7eabe51bae libs/lzma: Add aarch64 support
Co-Authored-By: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Co-Authored-By: Alessandro Gario <alessandro.gario@gmail.com>
2020-09-05 16:50:28 -04:00
Artemis Tosini
4ea5db73a6 libs/lldpd: Add aarch64 support
Co-Authored-By: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-09-05 16:50:28 -04:00
Artemis Tosini
41f58c1e3d libs/librdkafka: Add aarch64 support
Co-Authored-By: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Co-Authored-By: Alessandro Gario <alessandro.gario@gmail.com>
2020-09-05 16:50:28 -04:00
Artemis Tosini
028810ed05 libs/libgpg-error: Add aarch64 support
Co-Authored-By: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-09-05 16:50:28 -04:00
Artemis Tosini
96000c74a0 libs/libgcrypt: Add aarch64 support
Co-Authored-By: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-09-05 16:50:28 -04:00
Artemis Tosini
79eed8b059 libs/libdpkg: Add aarch64 support
Co-Authored-By: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-09-05 16:50:28 -04:00
Artemis Tosini
89ca3f9b09 libs/libaudit: Add aarch64 support
Co-Authored-By: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-09-05 16:50:28 -04:00
Artemis Tosini
5b84482b6f libs/boost: Add aarch64 support
Co-Authored-By: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-09-05 16:50:28 -04:00
Artemis Tosini
a417b0845f libs/berkeley-db: Add aarch64 support
Co-Authored-By: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-09-05 16:50:28 -04:00
Artemis Tosini
48926e1d07 libs/aws-sdk-cpp: Add aarch64 support
Co-Authored-By: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-09-05 16:50:28 -04:00
Artemis Tosini
51a123fa2f libs/openssl: Add aarch64 support
Co-Authored-By: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-09-05 16:50:28 -04:00
Artemis Tosini
a5492c55da Make cpuid table x86_only
The instruction doesn't exist on other processors, and while there
might be ways to retrieve the equivalent information, none directly
matches the x86 "cpuid". This takes out the table completely on
non-x86_64 architectures.

Co-Authored-By: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-09-05 16:50:28 -04:00
Artemis Tosini
e324f5bc0e linux: Define __NR_perf_event_open for aarch64
Co-Authored-By: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-09-05 16:50:28 -04:00
Artemis Tosini
d12b7931f5 linux: Conditionally build x86_64-only syscalls
Some syscalls are deprecated on newer architectures, for example
fork and vfork are all variants of clone now; symlink, unlink, rename
etc... at variants of the *at() versions, dup2 of dup3, etc...

Note about the test events: Because the events are synthetic, we
only really test the parser, as such it doesn't matter if aarch64
doesn't use a snapshot of a real event. To keep things simple we
only replace the arch and syscall fields.

Co-Authored-By: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-09-05 16:50:28 -04:00
Artemis Tosini
7af153bd1b cmake: Use TARGET_PROCESSOR to set Linux .tgz name suffix
Instead of hard-wiring "x86_64"

Co-Authored-By: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-09-05 16:50:28 -04:00
Artemis Tosini
588f06b177 cmake: Add TARGET_PROCESSOR
Currently recognizes AMD64 and x86_64 for x86 and aarch64 for ARM.

Co-Authored-By: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-09-05 16:50:28 -04:00
Benjamin Herrenschmidt
dfcd537d82 events/linux: Use unistd.h
We currenty inclulde unistd_64.h which doesn't work on aarch64. Rather
add #ifdef's around it, let's just use unistd.h which should do the
right thing on all architectures.

Additionally remove the duplicate #include's from the .cpp files
2020-09-05 16:50:28 -04:00
Teddy Reed
e9f9fc5611
Remove prototype database implementations (#6622) 2020-09-05 10:53:49 -04:00
Teddy Reed
fc63cb6e31
bug: Set thread names correctly on macOS and Linux (#6627) 2020-09-05 10:53:35 -04:00
Teddy Reed
cb428e105e
Apply scheduler_timeout correctly (#6618) 2020-09-03 23:56:16 -04:00
Stefano Bonicatti
d0b4e327a2
Fix Windows build removing non existing C11 conformance (#6629)
thirdparty_librdkafka_c was failing to compile
due to the C11 keyword _Thread_local not being recognized.
2020-09-03 19:02:00 -04:00
Breakwell
6d57dc8066
Windows 32 bit Support (#6543) 2020-09-01 23:29:26 -04:00
Teddy Reed
bee63a6c06
Add check for character_frequencies size (#6625) 2020-09-01 13:35:33 -04:00
Kelechi Precious Nwachukwu
3060f54392
Improve cpu_type and cpu_subtype descriptions for processes table (#6596) 2020-08-31 22:52:07 -04:00
Teddy Reed
19b91bb2b1
bug: Fix race in removing external TablePlugins (#6623) 2020-08-31 22:49:47 -04:00
Teddy Reed
ef3b5b5af7
bug: Force shell to disable watchdog and logger (#6621) 2020-08-31 22:47:54 -04:00
Teddy Reed
b36678d707
refactor: Rename database APIs to not use DatabasePlugin class (#6620) 2020-08-31 22:45:43 -04:00
Teddy Reed
160ac6c906
refactor: Change the include path for osquery/core/plugins (#6619) 2020-08-29 20:24:39 -04:00
Teddy Reed
0d3bd8d476
database: Change reset interval from 5m to 1hr (#6614) 2020-08-29 20:22:53 -04:00
Eugene Sidorov
c799afbf91
linux: add apparmor_events table (#4982) 2020-08-29 20:22:03 -04:00
kumarak
d86e90c146
Add sigrules to pass YARA signature with query (#6568) 2020-08-29 11:41:57 -04:00
Teddy Reed
066e01c16b
docs: Replace slackin with Slack shared invite (#6617) 2020-08-29 01:57:16 -04:00
Stefano Bonicatti
d3f394026e
Restore PIE support being dropped on Linux (#6611)
CMake ignores the sysroot when testing the support of PIE,
so the link test fails when it tries to check for PIE support
and decides that it's not supported.
Therefore we tell CMake that PIE is supported when using the
osquery-toolchain and leave the automatic test for other toolchains.

Temporarily disable PIE on executables built with the
osquery-toolchain libFuzzer, since it has not been compiled with PIE/PIC
support.
2020-08-28 17:14:37 -04:00
Teddy Reed
37fd74c2f4
bug: Fix buildup of RocksDB SST files (#6606) 2020-08-28 16:19:42 -04:00
Teddy Reed
452c7e66da
shell: Return early if relative flags are used (#6605) 2020-08-28 16:15:31 -04:00
Teddy Reed
05b6c69acf
bug: Apply watcher delay each time the worker is started (#6604) 2020-08-28 16:12:58 -04:00
kumarak
c7e37c2a05
Add non-evented table for querying Windows Events Log (#6563)
The PR adds an on-demand version of the Windows events log table that can return the WEL entries from an arbitrary event provider. It supports selective filtering based on additional query parameters.  An example query:

```
osquery>  select * from windows_events_vtable where channel = 'Application' and eventid = 1000;
+-------------+--------------------------------+------+-------+----------------------------+----------------------------------------+---------+----------+--------------------+--------------------------------------------------------------------------------------------------------------------------------------------+------+------+
| channel     | datetime                       | task | level | provider_name              | provider_guid                          | eventid | recordid | keywords           | data                                            | pid  | tid  |
+-------------+--------------------------------+------+-------+----------------------------+----------------------------------------+---------+----------+--------------------+--------------------------------------------------------------------------------------------------------------------------------------------+------+------+
| Application | 2020-07-22T03:19:32.617052900Z | 0    | 4     | Microsoft-Windows-LoadPerf | {122EE297-BB47-41AE-B265-1CA8D1886D40} | 1000    | -1       | 0x8000000000000000 | {"UserData":{"EventXML":"","binaryData":"EC2C0000BC2D0000ED2C0000BD2D0000","binaryDataSize":"16","param1":"WmiApRpl","param2":"WmiApRpl"}} | 5824 | 5828 |
+-------------+--------------------------------+------+-------+----------------------------+----------------------------------------+---------+----------+--------------------+--------------------------------------------------------------------------------------------------------------------------------------------+------+------+
```
2020-08-26 14:17:29 -07:00
Ateeq Sharfuddin
a19d910d21
bug: Improve chassis_types and security_breach columns within chassis_info (#6608) 2020-08-25 22:25:21 -04:00
James Alseth
b39b1ba709
Remove ExecStartPre from systemd service unit -- do not create empty config file (#6586)
osquery does not need the config file to start. Do not create one if not already present.
2020-08-18 23:42:12 -04:00
kumarak
224423fb75
Set global output function for Thrift (#6592) 2020-08-13 13:53:13 -04:00
seph
c63709894b
Manual copyright changes (#6590) 2020-08-12 11:21:40 -04:00
seph
29f4694df2
Update copyright notices (#6589)
Bulk update copyright notices from Facebook to "The osquery authors"
2020-08-11 16:46:54 -04:00
Teddy Reed
8ee7e3a3b0
refactor: Move osquery/include files to appropriate places (#6557) 2020-08-11 11:54:54 -04:00
Alessandro Gario
6c98ab3ade
powershell_events: Fix bool type usage (#6584) 2020-08-07 23:36:18 -04:00