Commit Graph

1606 Commits

Author SHA1 Message Date
Teddy Reed
f3c875fe5d Merge pull request #951 from wxsBSD/doc_fixes
Remove MATCHES from docs.
2015-04-06 21:25:47 -07:00
Wesley Shields
c2c6dbd216 Remove MATCHES from docs.
This is not a valid ConstraintOperator.
2015-04-06 20:43:56 -04:00
Mitchell Grenier
8da5f34486 Merge pull request #950 from jedi22/config_folder_fix
[Fix #945] Fix crashes from bad JSON
2015-04-06 16:28:32 -07:00
Mitchell Grenier
f5b7f921d3 Fing crashes from bad JSON
There are a couple places where this was an issue.

The first place was in the filesystem plugin where it was only checked that it
existed, and not that it was an actual file.

The second was a lack of try and catch on the parse call in config.cpp.

Both of those issues are addressed in this diff.
2015-04-06 16:00:26 -07:00
Mitchell Grenier
1455b66dd0 Merge pull request #949 from jedi22/file_changes_paths_single_file_fix
[Fix #948] Absolute paths in wildcard resolution
2015-04-06 15:48:51 -07:00
Mitchell Grenier
a6a8cc596b Fixed a bug that would prevent single files from showing up in wildcard resolutions 2015-04-06 15:21:17 -07:00
Teddy Reed
a94bff9ebf Merge pull request #946 from theopolis/master
Add some osquery-theme to API docs
2015-04-06 10:56:13 -07:00
Teddy Reed
2df9a6558e Add some osquery-theme to API docs 2015-04-06 01:21:10 -07:00
Teddy Reed
a38b1d3f30 Merge pull request #935 from theopolis/more_prov
Update provision.sh and os-specific deps
2015-04-04 16:48:21 -07:00
Teddy Reed
e87ab14246 Update provision.sh and os-specific deps
Remove some repeated or unused conditionals.
Make sure autoconf is at least version 2.69.
2015-04-04 16:15:40 -07:00
Teddy Reed
3b40140eaa Merge pull request #922 from theopolis/events_time
Fix event subscriber time
2015-04-04 15:00:32 -07:00
Teddy Reed
090f7e71f1 Fix event subscriber time 2015-04-04 13:28:45 -07:00
Mike Arpaia
367d695d77 Merge pull request #938 from facebook/theopolis-patch-1
[Fix #937] Return non-0 for status
2015-04-04 00:12:52 -07:00
Mike Arpaia
91e70d1df3 Merge pull request #928 from theopolis/config_check_pp
[#915] Skip daemon initialization if checking config
2015-04-04 00:12:12 -07:00
Javier Marcos
a46c852746 Merge pull request #936 from facebook/building_rhel6
Support for RHEL building
2015-04-03 18:14:10 -07:00
Javier Marcos
d4a0f6cf56 Fixing ubuntu FINALLY 2015-04-03 17:38:39 -07:00
Javier Marcos
49758bb13f Fix broken ubuntus, oops again 2015-04-03 17:24:18 -07:00
Teddy Reed
652ca19862 [Fix #937] Return non-0 for status 2015-04-03 17:24:10 -07:00
Javier Marcos
060f95a975 Fix broken everything, oops 2015-04-03 17:18:27 -07:00
Javier Marcos
b0e69b7074 Support for RHEL building 2015-04-03 16:53:06 -07:00
Teddy Reed
0e2c4a8a89 Merge pull request #924 from theopolis/yara2
YARA Integration
2015-04-03 09:26:06 -07:00
Teddy Reed
ddc02f6867 Update provisioning to include yara installs 2015-04-03 00:49:29 -07:00
Wesley Shields
4fea1bba7c Fix broken YARA table.
After the merge you need to include yara.h after fsevents.h on OS X.

Apaprently DECLARE_SUBSCRIBER() was dropped during the merge, which
meant that attempts to find the subscriber would fail, throwing an
unhandled exception.

Fix the table spec to use the new table name.

Must use recursive on Linux.

In order to watch a directory you must set recursive to true in
SubscriptionContext under Linux.
2015-04-03 00:48:13 -07:00
Teddy Reed
2b20d3dde0 Merge yara subscribers 2015-04-03 00:48:13 -07:00
Wesley Shields
a9644d22c2 Implement YARA table.
Currently only for OS X, will port to others soon.

Also need to add tests.

Remove old comment and add loading message.

Implement YARA table for Linux.

Use mask properly.

Use the various masks to specify the kinds of events we are interested
in. This removes the need to do the dirty "DELETED" check when the event
fires.

Make getYARAFiles return a const map.

Switch to LOG(WARNING) and emit error number.

Add vim .swp files to .gitignore.

Add yara_utils.(c|h).

Start to condense common code between the Linux and Darwin YARA tables
into a yara_utils.h. Right now it includes a function to compile rules
and store the results back in the map, indexed by category. It also has
the callback used by YARA when a rule is processed. I can not move much
more than that for the row creation code because the structures used in
the event callback are slightly different.

Include a better error message.

The errors are still printed by the compiler callback, but this will
allow my future work to return a Status from the event initialization to
print a useful message in summary.

Make Subscriber init() return Status.

Each EventSubscriber::init() now returns a Status. If the init() fails
for any reason the EventSubscriber is still stored but the failure is
tracked.

EventSubscribers now have a state member, which represents the current
state of the subscriber. The current supported states are:
uninitialized, running, paused, failed. Currently the only meaningful
ones are running and failed, but I put paused in there as a
forward-looking feature.

Subscriptions now have a subscriber_name member. This is used in
EventPublisherPlugin::fire() as a lookup to get the EventSubscriber and
check the state. If the EventSubscriber is not running the event will
not fire.

Only the EventSubscribers on OS X are using this. I'll do the Linux
implementation next.

Chase the init() changes to Linux.

This brings the Linux YARA table in line with the OS X one.

Require a EventSubscriberID when creating a subscription.

Now that Subscriptions are "tied" to EventSubscribers you must create a
Subscription with the name of the Subscriber it is for. This is because
when the event fires the list of Subscriptions is walked and the name is
used to lookup the EventSubscriber and make sure it is in the running
state.

Fix various tests.

Some tests would fire an event with only a Subscription, which is no
longer a valid thing to do. For these tests an EventSubscription is
created and registered in the EventFactory.

When Subscriptions are created pass the name of the EventSubscriber to
them. In some cases where no event is ever fired it is fine to pass a
bogus name.

Fix inotify tests.

Move a test down so the class is defined and make sure to create an
EventSubscriber and use it properly.

Add support for yara to provision.sh.

Right now this grabs yara 3.3.0 and applies the patch to fix min() and max(),
which is commit fc4696c8b725be1ac099d340359c8d550d116041 in the yara repo.

This has been tested under Ubuntu 14.04 only.

Remove NOMINMAX.

This is no longer necessary after the patch was backported to 3.3.0.

Revert "Add support for yara to provision.sh."

This reverts commit a8bd371498c0979f070adeff23d05571882ac3f1.

Use vendored YARA code in third-party.

This switches to using the YARA code contained in third-party, including
the patch to fix min/max macros.

Fix mismerge.

Remove unused function after merge.

Well, soon to be unused as soon as I fix up the Linux YARA table. ;)

Chase config changes.

Make the Linux YARA table use ConfigDataInstance along with files() and
yaraFiles().
2015-04-03 00:47:39 -07:00
Javier Marcos
d19eef1c76 Merge pull request #934 from facebook/provision_break_up
Breaking provision.sh into multiple scripts
2015-04-02 22:07:13 -07:00
Teddy Reed
d8d1ee7072 Move disk_encryption spec to OS X 2015-04-02 21:50:58 -07:00
Javier Marcos
4a1aced53a Breaking provision.sh into multiple scripts 2015-04-02 21:34:55 -07:00
Teddy Reed
dce4b6ca71 Merge pull request #913 from sharvilshah/filevault
[#911] Implement FDE status
2015-04-02 20:28:15 -07:00
Sharvil Shah
7b5ffefa21 add encrypted column to block_devices table and implement is_encrypted on each block device (OS X) by querying IORegistry
properly query IORegistry

remove fde_status implementation from block_devices

scaffolding for disk_encryption table

add disk_encryption table schema

implement disk_enryption table for OS X

clang-format the source

add newline at the end of disk_encryption.table

add device prefix to the bsd_name

provide link to apple's open source

renamed fde_status to disk_encryption, more readable code

preserve alphabetical ordering

tiny formatting fix

change header comment back to original
2015-04-02 17:28:50 -07:00
Mitchell Grenier
c4d32498c1 Merge pull request #930 from jedi22/opera
Adding Opera support by cookie cutting Chrome
2015-04-02 17:11:42 -07:00
Mitchell Grenier
b67ca8598b Adding Opera support by cookie cutting Chrome
Apparently if it ain't broke, don't fix it. Opera support seems to be exactly
the same as Chrome except changing the path. The file is basically just copied
with Chrome replaced with Opera + path change.

Added cross platform functionality to chrome and opera. Plus abstracted it in
more general functions that can be used for other chrome based browsers.
2015-04-02 15:22:54 -07:00
Mitchell Grenier
59d79ee385 Merge pull request #927 from jedi22/xattr_plist
eXtended attribute table optimization
2015-04-02 14:46:48 -07:00
mtmcgrew
da0ce578da correct chkconfig level
3 is not needed twice
2015-04-02 13:53:25 -07:00
Teddy Reed
6dd92bd051 [#915] Skip daemon initialization if checking config 2015-04-02 13:31:51 -07:00
Mitchell Grenier
9a1fdf0cbe eXtended attribute table optimization attack surface minification
The extended attributes table used to have its own parsing algorithm
and functions. These are unnecessary because osquery has built in PLIST parsing
provided by the operating system. Thus, I've moved the code to using that and
removed the xattr tests because they only tested the now non-existant parsing.

Further, the files have been renamed so they should now play nice with the
included profiler.
2015-04-02 13:27:12 -07:00
Mitchell Grenier
1a7dce6453 Merge pull request #917 from jedi22/firefox_plugins
Adding the ability to get addons in Ubuntu
2015-04-02 10:45:08 -07:00
Javier Marcos
796259a36e Merge pull request #925 from maus-/patch-2
Cleaned up Vagrantfile
2015-04-01 13:59:20 -07:00
maus-
e9631bd823 Update Vagrantfile
Forgive me as I've forgotten how to read
2015-04-01 13:22:22 -07:00
maus-
fc950e702b Update Vagrantfile 2015-04-01 12:25:10 -07:00
maus-
6c3ef967b5 Cleaned up Vagrantfile
Forgot a line, my bad!
2015-04-01 12:22:40 -07:00
Mitchell Grenier
560bfcdc02 Adding the ability to get addons in Ubuntu
I added a couple preprocessor macros so the table can be used under all linux distros
 as well
2015-04-01 10:41:56 -07:00
Teddy Reed
b1640a9c0c Merge pull request #906 from eastebry/902_clean_option
Added clean options, general osqueryctl cleanups
2015-03-31 22:17:38 -07:00
Bryan Eastes
afe76d4f6e Added clean options, general osqueryctl cleanups 2015-03-31 21:50:28 -07:00
Teddy Reed
8482b618e3 Merge pull request #918 from maus-/patch-1
Cleaned up Vagrantfile
2015-03-31 20:31:35 -07:00
maus-
016fe5a0d5 Cleaned up Vagrantfile 2015-03-31 19:53:29 -07:00
Mitchell Grenier
4c1d25bc12 Merge pull request #921 from jedi22/keychain_seg_fix
[Fix #919] Fixing segfault for non-existent path in keychain_items
2015-03-31 18:42:06 -07:00
Mitchell Grenier
57afea9449 Quick segfault fix 2015-03-31 18:20:27 -07:00
maus-
d033190cbf Cleaned up Vagrantfile 2015-03-31 16:57:25 -07:00
Teddy Reed
800dc7745e [#907] Bump tp to prefer non-execl logs 2015-03-30 15:36:56 -07:00