Commit Graph

5571 Commits

Author SHA1 Message Date
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
c08322b764
ci: Fix pip upgrade warning (#6576) 2020-08-03 10:40:03 -04:00
AE1020
7a148eea0b
CMake detect MAJOR_IN_SYSMACROS/MKDEV for librpm (#6554)
Starting in glibc 2.25, the macros `major` and `minor` were moved
from `<sys/types.h>` to `<sys/sysmacros.h>`, to stop leaking these
common words into the global namespace of those including <stdlib.h>

https://sourceware.org/bugzilla/show_bug.cgi?format=multiple&id=19239

The macros MAJOR_IN_MKDEV and MAJOR_IN_SYSMACROS would be defined if
necessary by autoconfig, and put in `config.h`. But osquery build
uses CMake instead of autotools, with a git-committed `config.h`.
This generally is all right across Ubuntu variations, as an automake
for one will likely make a config.h that works on others. However
the glibc change makes a "one-size-fits-all-Ubuntu" config impossible.

This mirrors detection done by autoconf/headers.m4 as CMake code.
It is a relatively simple patch, which unblocks building of librpm
on (K)ubuntu 20 while still working on Ubuntu 18.
2020-08-02 12:00:33 -04: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
Ahsan Athallah
1cf5b5da13
Update check array column descriptions in md_devices (#6572) 2020-07-31 23:27:38 -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
Ateeq Sharfuddin
f79d7e32ee
Define UNICODE and _UNICODE preprocessors for windows (#6338) 2020-07-23 21:23:23 -04:00
kumarak
2aa313db40
Enable yara table on windows (#6564) 2020-07-23 21:16:10 -04:00
seph
32cafe518c
Light refactor on users & groups (#5686)
This does a little refactoring on the users and groups tables, and adds test cases for more those tables.
2020-07-23 01:38:19 -04:00
nmeocisco
b8e71d949f
Add dns_cache table for Windows (#6505) 2020-07-22 10:51:12 -04:00
Omer Katz
d70417270a
Scheduler code clean up (#4633)
Co-authored-by: Teddy Reed <teddy@casualhacking.io>
2020-07-21 23:02:36 -04:00
prateeknischal
cd11220b7a
Add support for processing KILL syscall (#6435)
Add support for processing KILL, TKILL and TGKILL syscalls. The first
message of the SYSCALL message type is handled in a similar way as
EXECVE as the structure is more or less the same.

Three additional fields are parsed from the message which are "ses"
(session of the process), "comm" (the command that was executed, eg: the
script name in case of a /bin/bash invoke) and "tty" (the controlling
terminal for the process). These fields will not be published though
since the table schema doesn't support it at the moment.

The above feature is activated using the
    --audit_allow_kill_process_events=true

Sample columns:
```
"columns": {
  "atime": "1589007635",
  "auid": "4294967295",
  "btime": "0",
  "cmdline": "",
  "ctime": "1587237608",
  "cwd": "",
  "egid": "1000",
  "euid": "1000",
  "fsgid": "1000",
  "fsuid": "1000",
  "gid": "1000",
  "mode": "0755",
  "mtime": "1586904788",
  "owner_gid": "",
  "owner_uid": "",
  "parent": "4781",
  "path": "/home/USERNAME/code-server-3.1.1-linux-x86_64/node",
  "pid": "4795",
  "sgid": "1000",
  "suid": "1000",
  "syscall": "kill",
  "time": "1589052835",
  "uid": "1000",
  "uptime": "26902"
}
```

Note that the TGKILL syscall is recommended to not be used from the
linux manpages.
2020-07-20 22:02:43 -04:00
Rachel Cipkins
6096347c6b
Add startup_items table for linux (#6502) 2020-07-20 21:52:43 -04:00
kumarak
e915047bc4
Update YARA library to 4.0.2 (#6559) 2020-07-20 21:50:16 -04:00
Teddy Reed
1f5645f7f1
tables: Refactor shell_history to use generators (#6541) 2020-07-13 22:21:39 -04:00
Teddy Reed
3022689572
syslog: Replace fstream with custom non-blocking getline (#6539) 2020-07-13 22:20:37 -04:00
puffyCid
336e6b075f
Shimcache Table (#6463) 2020-07-12 21:54:37 -04:00
Teddy Reed
e8ef7b56bd
events: Only fire if publisher exists (#6553) 2020-07-12 19:28:28 -04:00
Teddy Reed
ae3d40a7c6
fsevents: Improve testing assumptions and flush fsevents when stopping (#6552) 2020-07-12 12:12:41 -04:00
Garret Reece
1f2564f532
Add windows support to test python utility (#6550) 2020-07-10 00:57:35 -04:00
Breakwell
543dcc3087
Fix: Leak in psidToString on windows 2020-07-10 00:55:10 -04:00
Teddy Reed
59a7840f5c
rpm: Fix rare memory leak in rpm_package_files (#6544) 2020-07-09 10:39:49 -04:00
Ted Reed
5c084ec231 detangle: Move init and watcher into distinct CMake lib 2020-07-09 10:38:53 -04:00
Ted Reed
2949a3e618 detangle: Remove dependency on watcher from extensions 2020-07-09 10:38:53 -04:00
Ted Reed
5cd2d6cbd3 detangle: Move platform setup and teardown out of Initializer 2020-07-09 10:38:53 -04:00
Ted Reed
89953d3340 detangle: Move start time getter and setter out of Config 2020-07-09 10:38:53 -04:00
Ted Reed
3fbe55a108 detangle: Move tooltype setter and getters out of Initializer 2020-07-09 10:38:53 -04:00
Ted Reed
96c74a99e1 detangle: Move osquery shutdown logic outside of Initializer
The goal is to have less inter-dependency within osquery components.
This is the first of several changes that take small steps towards a
simpler dependency graph.

Later we can revisit the directory structure to see if we can convey
what components are intended to be widely used and what components
are specialized.
2020-07-09 10:38:53 -04:00
Nick Anderson
b60ac312b3
wmi: adding utility function to convert datetime to FILETIME (#5901) 2020-07-07 21:33:17 -07:00
seph
40897bb29c
Change "Symlink loop" message from warning to verbose (#6545)
Change Symlink loop message to verbose from warning
2020-07-07 13:45:26 -04:00
seph
5b959e91ab
Fix logging of GLOG_WARNING (#6547)
Add missing GLOG_WARNING type
2020-07-07 08:47:37 -04:00
Teddy Reed
c250dac2e7
build: Support ASAN for boost coroutine2 using ucontext (#6531) 2020-07-01 15:45:57 -04:00
Stefano Bonicatti
8636dca164
CPack: Update and uniform instructions to build a package (#6529) 2020-06-28 17:15:23 -04:00
Stefano Bonicatti
4a03194ba3
CPack: Use specific RPM variables to set the package name (#6527) 2020-06-27 10:31:29 -04:00
Stefano Bonicatti
e17e3b659b
Azure Pipelines: Update compiler version used to v142 (#6528)
Also update the Windows Server version used from 2016 to 2019,
update Ninja to the latest stable and update the docs.
2020-06-27 10:17:23 -04:00
seph
4734cd44f4
Add additional changelog items (#6523)
Additional changelog items
2020-06-25 15:05:02 -04:00
seph
5cd213c092
Changelog for 4.4.0 (#6492) 2020-06-25 09:12:24 -04:00
Teddy Reed
6710dbd5a6
build: Add Azure tables to specs CMakeLists (#6507) 2020-06-25 09:10:17 -04:00
Stefano Bonicatti
efe9a98290
CMake: Correct macOS framework linking (#6522)
target_link_libraries correctly consider "-framework <library>"
as a library, instead of a flag; lets use that instead of
target_link_options.
2020-06-25 09:08:14 -04:00
Teddy Reed
25eb7b3aae
tables: Only populate table cache with star-like selects (#6513) 2020-06-24 22:00:34 -04:00
Stefano Bonicatti
0654c20501
CMake: Fix and cleanup compile flags (#6521)
Add a description to the function preparing the targets carrying the
main compiler and linker flags.

Convert CMake default flags to the ones we use, instead of overriding
them later via targets.
This can also avoid having us use the wrong CRT on Windows if we forget to link
against osquery_cxx_settings.

Reduce the "overriding <flagX> with <flagY>" messages on Windows by
removing the warning level from the default flags, and adding that
to the specific osquery_<c|cxx>_settings target, so that non internal
targets can choose their own level.

Minor cleanups

Fix osquery/osquery#6509
2020-06-24 21:54:47 -04:00
Teddy Reed
5bc3d806e7
docs: Add note to bump the Homebrew cask (#6519) 2020-06-24 12:03:00 -04:00