Commit Graph

3376 Commits

Author SHA1 Message Date
Teddy Reed
689a571785
carver: Improve tests by faking postCarve (#6659) 2020-09-22 08:52:58 -04:00
Teddy Reed
18319be84c
carver: Emit an error if the carve function is disabled (#6658) 2020-09-21 19:30:04 -04:00
Teddy Reed
775830270e
carver: Update table to use JSON (#6656) 2020-09-21 19:29:19 -04:00
Teddy Reed
5b8f20bfce
refactor: Move ephemeral database plugin into core and simplify tests (#6648) 2020-09-21 18:25:08 -04:00
Teddy Reed
0ed8b1b581
Fix image column within drivers table on Windows (#6652) 2020-09-18 22:12:58 -04:00
seph
d0465b1af3
Add atom_packages table to windows (#6649) 2020-09-18 16:06:01 -04:00
Teddy Reed
f4555ac0d1
Improve performance and accuracy of Windows registry querying (#6647) 2020-09-14 11:59:47 -04:00
Steve Brito
62d9a0c1fa
Fix BIOS Info table searching (#5246) 2020-09-13 10:53:07 -04:00
puffyCid
bd545631ed
Support for Office MRU (most recently used) entries (#6587) 2020-09-13 10:51:51 -04:00
kumarak
69bcf70b8c
Add sigurl column to pass yara signatures with the queries (#6607) 2020-09-11 15:14:01 -04:00
puffyCid
10b0635bc2
Support for Background Activity Moderator (#6585) 2020-09-10 22:20:34 -04:00
Teddy Reed
d7d6c56473
database: Remove read only concept (#6637) 2020-09-10 19:58:38 -04:00
kumarak
51d3833508
Parsing of user data in Windows event log (#6643) 2020-09-10 19:57:53 -04:00
Teddy Reed
c32953e139
events: Remove selectAllFrom from linux process events callback (#6638) 2020-09-08 16:16:22 -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
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
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
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
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
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
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
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
Ryan Mack
62afdbfdeb
Fix incorrect readFile params in createPidFile (#6578) 2020-08-07 23:34:50 -04:00
Ryan Mack
c1b210cfa5
Fix call to LocalFree() on uninit ptr (#6579) 2020-08-07 23:34:00 -04:00
kumarak
8389f8804e
Move the Windows Events Log parser methods (#6575) 2020-08-06 19:09:47 +02:00
Teddy Reed
ffdd5763a8
events: Memoize EventFactory::getType (#6555) 2020-08-02 11:51:06 -04:00
Ryan Mack
4be11919c1
Fix readFile to observe requested read size (#6569) 2020-08-02 11:26:41 -04:00
Animesh Tewari
dcf72523f7
curl_certificate test (#5281) 2020-07-26 16:38:59 -04:00
Animesh Tewari
6101a0aee5
Fix #5737: Add FileVersionRaw column to file table for windows (#5771) 2020-07-26 16:37:49 -04:00
Jonathan Nogueira
865078a560
Update schedule counter behavior (#6223)
Change the counter behavior so only when a differential results is
calculated the counter increments. With this new behavior the counter
represents the order in which differentials results should be replayed
to recreate state at a point in time.
2020-07-25 17:23:40 -04:00