Commit Graph

1621 Commits

Author SHA1 Message Date
Teddy Reed
e69f72cd56 Documentation updates 2015-04-10 14:31:34 -07:00
Teddy Reed
36479bbaf6 Merge pull request #970 from theopolis/osx_managed_configuration
[Implement #879] Add managed_policies to OS X
2015-04-09 12:14:50 -07:00
Teddy Reed
dc7cf9cf59 [Implement #879] Add managed_policies to OS X 2015-04-08 21:38:56 -07:00
Teddy Reed
ea96a9d046 Merge pull request #963 from theopolis/os_version
[Fix #962] Add OS name and friendly version
2015-04-08 21:32:49 -07:00
Teddy Reed
d30455893f Merge pull request #941 from theopolis/rhel_fun
[Implement #926] RHEL6 provisioning
2015-04-08 14:37:48 -07:00
Teddy Reed
1305a2764a [Fix #964] Restrict apt-sources to arch=amd64 2015-04-08 14:13:01 -07:00
Teddy Reed
8b2dd5e328 [Fix #962] Add OS name and friendly version 2015-04-08 07:33:17 -07:00
Javier Marcos
f97ca38743 Merge pull request #960 from facebook/safari_into_internet_plugins
Renaming safari_plugins table to browser_plugins
2015-04-07 14:49:46 -07:00
Javier Marcos
dee0bd683e Renaming safari_plugins table to browser_plugins 2015-04-07 14:26:00 -07:00
Teddy Reed
75f4d6548d [Fix #953] Check sqlite predicate expression passing 2015-04-07 01:20:05 -07:00
Teddy Reed
78ec6fb305 Merge pull request #956 from sharvilshah/bug/etc_hosts_comment_parsing
[Fix #955] Fix etc_hosts hostname parsing so that inline comments are now ignored
2015-04-07 00:27:58 -07:00
Teddy Reed
5d061e7ff8 Merge pull request #947 from theopolis/update_readme_table
Update readme table
2015-04-07 00:07:05 -07:00
Teddy Reed
41ce00e573 RHEL6 provisioning 2015-04-06 23:43:01 -07:00
Sharvil Shah
e7a3d24ece Fix etc_hosts hostname parsing so that inline comments are now ignored; update tests 2015-04-06 23:32:56 -07:00
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
f1f8c57e6c Update readme table 2015-04-06 01:34:39 -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