Mike Arpaia
b09031adda
Include system startup items
...
We were not parsing system startup items.
2015-09-22 15:50:55 -07:00
Mike Arpaia
4021a742df
Merge pull request #1507 from jacknagz/os_version_rhel
...
RHEL os_version fix
2015-09-21 18:03:03 -07:00
Jack Naglieri
9c1e114728
Fix os_version table regex for REDHAT_BASED systems. Updating centos6/7 and freebsd10 Vagrant boxes.
2015-09-18 14:47:08 -07:00
Teddy Reed
333f2ce8c8
[ #1506 ] Silent kext loading messages from syslog
2015-09-16 13:13:56 -07:00
Sharvil Shah
28143f64f0
Update system_info table: adds CPU type, CPU cores and total memory.
...
This change adds following columns to `system_info` table:
cpu_type, cpu_subtype, cpu_brand, cpu_physical_cores,
cpu_logical_cores, physical_memory, hardware_model
Here's an example output of those columns:
```
cpu_type = x86_64h
cpu_subtype = Intel x86-64h Haswell
cpu_brand = Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz
cpu_physical_cores = 4
cpu_logical_cores = 8
physical_memory = 17179869184
hardware_model = MacBookPro11,3
```
2015-09-10 14:44:48 -07:00
Scott Piper
5e7d0d6a37
Added system_info table
2015-09-09 10:26:16 -07:00
Teddy Reed
bb2b5f594b
Static analysis cleanups, static libmagic
2015-09-02 16:55:20 -07:00
Teddy Reed
776de9c4d1
Merge pull request #1477 from theopolis/table_xp_meta
...
XProtect meta virtual table and safari_extensions column additions
2015-08-30 21:31:35 -07:00
Javier Marcos
74be3d1da0
Removing dots at the end of log entries
2015-08-28 16:50:44 -07:00
Javier Marcos
086ab40f83
Merge pull request #1473 from javuto/this_is_real_magic
...
Adding magic table to check for libmagic data
2015-08-28 14:03:10 -07:00
Javier Marcos
1a50977a23
Adding magic table to check for libmagic data
2015-08-28 12:49:46 -07:00
Teddy Reed
88c7ad35a2
Merge pull request #1471 from theopolis/process_start_fix
...
[Fix #1453 ] Use second precision for process start times
2015-08-28 11:48:25 -07:00
Teddy Reed
2433d9e06c
[ #1418 ] Include XProtect's meta list of plugin versions, and blacklisted extensions
2015-08-28 11:46:21 -07:00
Teddy Reed
014e504fba
[ Fix #1432 ] Improve OS X USB device reporting
2015-08-27 16:36:54 -07:00
Teddy Reed
3c114c3439
[ Fix #1453 ] Use second precision for process start times
2015-08-27 15:47:06 -07:00
Teddy Reed
bdadc9753b
Additional OS X table performance improvements
2015-08-18 01:35:10 -07:00
Teddy Reed
43cf5f1a0a
Merge pull request #1448 from theopolis/strol-speedup
...
Speedup type conversions, yara, and 10.10 symbols at runtime
2015-08-14 11:01:46 -07:00
Teddy Reed
68d7a6e0be
Speedup type conversions, yara, and 10.10 symbols at runtime
2015-08-13 18:04:03 -07:00
Teddy Reed
634dfe7da1
Merge pull request #1438 from sharvilshah/fix_homebrew_version
...
[Fix #1434 ] version reporting for homewbrew_packages
2015-08-12 11:30:21 -07:00
Sharvil Shah
b190f5f99a
Fix #1433 , os_version reporting for 10.11
2015-08-11 14:03:27 -07:00
Sharvil Shah
369040e69b
Fix version reporting for homewbrew_packages. Fixes #1434
2015-08-11 01:50:40 -07:00
Sharvil Shah
64588be88b
Fix build on OS X 10.11
...
enum `SecItemClass` changed in 10.11 headers,
so don't instantiate with rvalue of int.
Update `SecKeychainSearchCreateFromAttributes` to match the stricter definition.
Fixes #1423
2015-08-05 18:29:29 -07:00
Mike Arpaia
a45c794f52
building on 10.9
2015-07-31 11:57:39 -07:00
osquery
ae8305e00e
Revert "Remove OS X 10.9 code path since we no longer support it"
...
This reverts commit 05bbe2ce06
.
2015-07-31 11:44:34 -07:00
Chris Down
260df0d6d0
linux users table: Do not drop users with duplicate UIDs
...
See Github issue #1301 . FreeBSD (which also uses this table) by default has two
users which are UID 0 -- both `toor` and `root`. 19a2d64959
made it so that we
would only get the first one from `getpwent`, but this feature is undesirable
in cases where two different users share the same UID.
2015-07-29 09:00:47 -07:00
Teddy Reed
2d7ce9341a
Remove some non-warning/error log lines from tables
2015-07-24 00:09:06 -07:00
Teddy Reed
fc24682816
Fix profile platform bug in leaks checking
2015-07-20 02:06:52 -07:00
Teddy Reed
e8cb919f03
Merge pull request #1364 from theopolis/harden_applications
...
[Fix #1357 ] Use OS X LS API for app listing
2015-07-20 01:14:07 -07:00
Mike Arpaia
5ccfe886ba
Merge pull request #1363 from theopolis/less_rows
...
[Fix #1303 ] Only emit rows when appropriate for processes/users.
2015-07-19 20:36:26 -07:00
Teddy Reed
dd7990b719
[ Fix #1357 ] Use OS X LS API for app listing
...
Attempt to use OS X's LaunchServices to get a list of applications.
Fall back to basic directory traversal of well-known application paths.
2015-07-19 20:22:48 -07:00
Teddy Reed
5249e74146
[ Fix #1303 ] Only emit rows when appropriate for processes/users.
...
When optimizing a table using query constraints an implementation should not add unneeded rows.
A user experience bug exists when selecting with an explicit non-existing pid/uid.
2015-07-19 20:20:04 -07:00
Teddy Reed
bcdbb40f0c
[ Fix #1356 ] Tokenize process environ by '\0' on Linux
2015-07-19 14:34:49 -07:00
Teddy Reed
6104aaebfe
Add optional TLS config plugin refresh
2015-07-17 14:59:08 -07:00
Teddy Reed
c36fbda274
Merge pull request #1349 from theopolis/centos_version
...
[Fix #1319 ] CentOS version reporting and file read error
2015-07-17 09:07:29 -07:00
Teddy Reed
f06820f578
[ Fix #1319 ] CentOS version reporting and file read error
...
1. Redhat-based distributions were not reporting their version correct.
2. The file read API assumed stat would return an accurate file size.
This has been replaced with an attempt to seek to the end of the file.
2015-07-16 14:16:51 -07:00
Mike Arpaia
9eeb224ce7
clang-format authorizations files
2015-07-16 11:09:16 -07:00
Tom Burgin
e8d3e45cea
Added authorization_mechanisms and authorizations tables
2015-07-15 14:25:19 -04:00
Teddy Reed
c269bbeaf3
Rollup of build changes
2015-07-14 13:45:53 -07:00
Teddy Reed
3bd6b64b8b
Silence OS X OpenSSL-related deprecations
2015-07-13 10:14:47 -07:00
Sharvil Shah
1ac6702f32
Better/faster performance when querying certificates on OS X
...
X509 parsing is now handled by OpenSSL as there does seem to be a
memory leak in SecCertificateCopyValues of Security framework which resulted
in a performance hit when querying certificates.
key_usage and key_algorithm columns now display human readable strings
(e.g. Digital Signature, CRL Sign rsaEncryption)
than the raw flags and OIDs (e.g 0x86, 1.2.840.1).
This fixes #1032
2015-07-12 11:18:53 -07:00
Mike Arpaia
4f94c0034c
Merge pull request #1290 from timzimmermann/uptime
...
Uptime
2015-07-03 00:23:44 -07:00
Tim Zimmermann
fa988b4e56
Add uptime table
...
The table contains information about the time passed since the last boot.
2015-07-02 22:32:48 -07:00
Michael O'Farrell
a712cd5036
Fix processes table to report gid correctly.
2015-07-02 17:03:25 -07:00
Teddy Reed
6437ddb82d
Merge pull request #1235 from sharvilshah/remove_os_x_10_9_code
...
Remove OS X 10.9 code path
2015-06-24 15:18:32 -07:00
Mike Arpaia
d6389dc64d
Check for nullptr in CreatePropertyFromCertificate
2015-06-23 21:45:46 -07:00
Sharvil Shah
05bbe2ce06
Remove OS X 10.9 code path since we no longer support it
2015-06-22 20:49:34 -07:00
Teddy Reed
37188f788b
Fixups in tables, add DOUBLE, shell extensions
2015-06-22 04:17:23 -04:00
Teddy Reed
55f270ff97
OS X application duti/scheme listing table
2015-06-21 14:08:21 -04:00
Mike Arpaia
be85046d32
typo in keychain_acls table where path was being returned as app_path
2015-06-21 13:52:01 -04:00
Mike Arpaia
0a83572f08
Table to enumerate keychain ACLs
2015-06-20 14:59:07 -04:00
Teddy Reed
09ea12a2a7
Add application sandbox container metadata
2015-06-19 01:53:09 -04: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
b56e9efd47
Merge pull request #1199 from theopolis/fix_open_sockets
...
Process open sockets on Linux needs '['
2015-06-07 14:04:45 -07:00
Teddy Reed
49eb22ef44
Process open sockets on Linux was added '['
2015-06-07 13:28:17 -07:00
Teddy Reed
727f5b091f
Various table perf improvements and TLS docs
2015-06-05 22:03:15 -07:00
Mike Arpaia
ea70781f25
Merge pull request #1188 from marpaia/msr_format
...
Formatting the callback function in the model_specific_register table
2015-06-04 12:17:19 -07:00
Teddy Reed
a70828c2a4
Merge pull request #1187 from sharvilshah/xattr_update
...
Extended Attributes: Use LaunchServices API for quarantine data
2015-06-03 22:38:17 -07:00
Sharvil Shah
065fe6412d
Use LaunchServices (part of CoreServices) to grab quarantine properties instead of manually parsing the colon separated attribute data.
...
Fall back to deprecated LaunchService API for OS X 10.9 Mavericks.
Added tests for extended_attributes
Better error handling and cleanup
2015-06-03 22:18:45 -07:00
Teddy Reed
8e2b7e1281
Merge pull request #1189 from theopolis/tooling
...
Update tooling/profiling paths and use a better random seed
2015-06-03 22:15:22 -07:00
Teddy Reed
c934ad0df3
Update tooling/profiling paths
2015-06-03 21:22:12 -07:00
Mike Arpaia
657731b11c
Formatting the callback function in the model_specific_register table
...
`int osquery::filter(const struct dirent*)` seemed like a pretty generic
symbol to have in our symbol table, so I changed it to
`int msrScandirFilter(const struct dirent*)`
2015-06-03 20:56:16 -07:00
Michael O'Farrell
5e9383a16b
Created a table for information in the model specific register.
...
This infomation is primarily related to the performance of processor
cores. The information given constitutes only a small portion of
the information in the model specific register, but this table
has been designed so that more information may easily be added.
The table requires osquery be run as the root, and that the msr
kernel module is loaded. The table reads the msr data from /dev
2015-06-03 15:55:57 -07:00
Teddy Reed
a105924804
Move specs to a top-level path, add query examples
...
1. Example queries will run with an (optional) integration test.
2. Fix bad accesses with OS X package BOMs
3. Move spec files from ./osquery/tables/specs to ./specs
4. Remove server parsers (netlib) from client builds.
2015-06-03 10:39:05 -07:00
Sharvil Shah
4ab79a8bd6
deallocate array with delete[] instead of delete
2015-06-02 15:09:22 -07:00
Wesley Shields
80749c3531
Chase constraint changes introduced in #1170 .
...
The changes done in #1170 broke some of the tables on FreeBSD.
2015-05-30 01:42:44 +00:00
Teddy Reed
f954e2c7e8
Merge pull request #1170 from mofarrell/exists-all
...
Constraint existence now check for constraints using specific operator types.
2015-05-29 16:10:30 -07:00
Michael O'Farrell
77aa36fa0b
Constraint existence now check for constraints using specific operator types.
...
This change allows QueryContext constraints to be checked for based on
operator type. This makes checks for the existence of an equality
operator allow enumeration.
Example:
if (context.constraints["pid"].exists(EQUALS)) {
pids = context.constraints["pid"].getAll(EQUALS);
} else {
osquery::procProcesses(pids);
}
2015-05-29 13:47:04 -07:00
Wesley Shields
6558f605ff
Implement process related tables on FreeBSD.
...
This implements the following tables on FreeBSD:
process_envs
process_memory_map
process_open_files
process_open_sockets
processes
All the heavy lifting is done with libprocstat(3). All the tables follow
the same general principle. Use the common function, getProcesses() in
procstat.cpp, to get the processes and then generate the rows for each
process returned. There is also a procstatCleanup() function commonly
used across all the tables.
The one thing I am not able to test is the process_open_sockets table on
an IPv6 machine.
2015-05-29 19:17:49 +00:00
Mark Ignacio
84f8203dfd
Converted CFAbsoluteTime in X509 certificates to UNIX time
2015-05-27 15:23:46 -07:00
Teddy Reed
ff9243bce1
Merge pull request #1159 from mofarrell/user-groups-table
...
Wrote a user_groups table for darwin and linux based system.
2015-05-27 11:38:06 -07:00
Michael O'Farrell
80356b26f0
Wrote a user_groups table for darwin and linux based system.
...
The user_groups table represents the association between user ids and group ids.
Darwin Issue:
Issues arise in darwin systems with users that are members of many groups due
to a bug in Apple's implementation of getgrouplist. If the number of groups a
user is a member of is greater than 64 a truncated association table may
be returned.
2015-05-27 10:32:46 -07:00
Teddy Reed
8b3686a58a
TLS plugin workflow tests
2015-05-26 19:55:00 -07:00
Mike Arpaia
6f30c40041
Merge pull request #1152 from sharvilshah/xattr_parse_where_from
...
More thorough where_from parsing in extended_attributes
2015-05-21 16:32:32 -07:00
Sharvil Shah
a216ef2886
Use CoreServices Metadata API to parse kMDItemWhereFroms for file xattrs and now includes non-browser values too
2015-05-20 10:50:25 -07:00
Teddy Reed
4ff2fc1db2
Merge pull request #1151 from theopolis/crontab-fix
...
Include several search paths for user contabs
2015-05-20 10:47:32 -07:00
Teddy Reed
983d107fe6
Search for cronstabs in /cron and /cron/crontabs
2015-05-19 15:51:03 -07:00
Ryan Steinmetz
949f84f3a8
Add mounts table support under FreeBSD
...
Cleanup blacklist entries for FreeBSD (mounts/users/groups)
2015-05-19 15:33:06 -07:00
Ryan Steinmetz
0777fa5fe2
- Add users/groups support for FreeBSD
2015-05-12 23:47:20 -07:00
Mike Arpaia
fff36af0af
Removing trailing whitespace
2015-05-11 23:31:13 -07:00
Teddy Reed
258dd62b24
Merge pull request #1114 from theopolis/rhel_centos_tables
...
RHEL table parity with CENTOS
2015-05-08 11:54:20 -07:00
Teddy Reed
6919065b4b
RHEL table parity with CENTOS
2015-05-07 23:23:32 -07:00
Teddy Reed
c7b9114975
Towards building on FreeBSD/ports
2015-05-07 23:12:30 -07:00
Jack Naglieri
8e3e7ef7be
Fixed crontab parsing issue in RHEL 6.5.X
2015-05-06 13:03:34 -07:00
Teddy Reed
893f678403
Linting and asan fixups
2015-05-04 11:00:21 -07:00
Teddy Reed
c63bf0451a
Various exception hardening
2015-05-03 14:18:20 -07:00
Javier Marcos
e83b813399
Support RHEL6
...
This enables support for building osquery in RHEL6
2015-04-29 18:31:13 -07:00
Teddy Reed
be65922569
Fast tests
2015-04-27 09:40:31 -07:00
Teddy Reed
a972b1b0b0
Merge pull request #1027 from sharvilshah/fde_linux
...
[Implement #933 ] Add LUKS/dm-crypt disk_encryption support for Linux
2015-04-25 12:43:05 -07:00
Teddy Reed
13d1ff031b
Add rpm_package_files table
2015-04-25 01:18:55 -07:00
Sharvil Shah
f72dcb5d96
add libcrypysetup-dev library
...
moved disk_ecryption table spec to crossplatform
link libcryptsetup
implemented get cipher type and cipher_mode:
more idiomatic c++11
no need to explicitly call std::string constructor to convert char * to std::string
update cryptsetup sources for centos
add function prototype for older libcryptsetup which is in centos6
ifdef check for centos6 which uses older libcryptsetup
remove forward declared functions defined in libcryptsetup, stylistic changes
2015-04-24 17:01:14 -07:00
Teddy Reed
ab4e78f875
Merge pull request #1005 from theopolis/osx_memmap
...
Towards OS X memory maps
2015-04-20 22:18:36 -07:00
Teddy Reed
6b9f412caa
Towards OS X memory maps
2015-04-18 14:20:40 -07:00
Teddy Reed
c59ce0e4e4
Lint fixes and clang analyze
2015-04-17 09:18:46 -07:00
Teddy Reed
c9e07ec2ba
Add launchd_overrides table
2015-04-15 23:19:23 -07:00
Teddy Reed
f7f1819a67
Fix Ubuntu-version regex
2015-04-14 22:43:44 -06:00
Teddy Reed
739d91c361
Performance linting
2015-04-11 19:50:35 -07:00
Teddy Reed
e1f0106710
Various fixes, checks
2015-04-11 15:57:12 -07:00
Teddy Reed
a8ced9a647
Merge pull request #977 from theopolis/process_parsing
...
[Fix #968 ] Refactor launchd
2015-04-11 14:18:58 -07:00
Teddy Reed
54af369702
[ Fix #968 ] Refactor launchd
2015-04-10 18:04:26 -07:00
Mitchell Grenier
41283223af
Better extended attributes
...
For the second time in a couple of weeks, I've rewritten the xattr table into
a new extended_attributes table.
If we find an attribute that we don't have a parser for, we will check if it
contains non printable characters. If it does, we'll base64 it. If it doesn't,
we will just output the unencoded string.
2015-04-10 13:17:22 -07:00