Commit graph

9059 commits

Author SHA1 Message Date
Seth Hall
71c9945f26 Several fixes and improvements for software version parsing.
- Addresses Philip Romero's question from the Bro mailing list.
 - Adds Microsoft Edge as a detected browser.
 - We are now unescaping encoded characters in software names.
2017-07-13 02:22:03 -04:00
Johanna Amann
00d7e3a013 Update submodule
[nomail]
2017-07-11 09:57:31 -07:00
Johanna Amann
a630c61f17 Remove another reference to now removed bro-plugins. 2017-07-11 09:56:33 -07:00
Robin Sommer
8ae30d8aac Extend plugin infrastructure to catch Bro version mismatches at link
time.

People keep running into the problem that they upgrade Bro but forget
to recompile their plugins--which can lead to crashes. While the
plugins' API version was supposed to catch this, it's not reliable as
that check may come too late. This change takes a different tack: We
compile a C function into the Bro binary that has Bro's version number
encoded into its name. A plugin can then reference that function. If
the Bro version changes, the function goes away and the plugin won't
load anymore.

I've integrated that function reference into the plugin skeleton code
so that new plugins get it automatically (unless explicitly removed).
I couldn't see a way to do it transparently for already existing
plugins unfortunately.

The version number used for the function name is slightly normalized
to skip any git revision postfixes (i.e., "2.5-xxx" is always treated
as "2.5-git") so that one doesn't need to recompile all plugins after
every master commit. That seems good enough, usually people run into
this when upgrading to a new release.

If one loads an old plugin into a new Bro, the error message looks
like this:

    $ bro -NN Demo::Foo
    fatal error in /home/robin/bro/master/scripts/base/init-bare.bro, line 1:
    cannot load plugin library /home/robin/tmp/p/build//lib/Demo-Foo.linux-x86_64.so:
    /home/robin/tmp/p/build//lib/Demo-Foo.linux-x86_64.so: undefined symbol: bro_version_2_5_git_debug

Not the prettiest, but better than a crash!

TODO: I'm still unsure if we should remove the plugin API version
altogetger now. This link-time check should catch everything the API
version does, except for master commits.
2017-07-07 15:58:05 -07:00
Robin Sommer
ffa7480ce4 Fix documentation build.
(I had these locally, but not yet commited.)
2017-07-07 14:35:38 -07:00
Robin Sommer
94192989e7 Removing aux/plugins.
Most of the plugins are now Bro packages.
2017-07-07 13:48:15 -07:00
Robin Sommer
c76fc71077 Updating submodule. 2017-07-07 12:41:27 -07:00
Johanna Amann
b43ac81eea Updating CHANGES and VERSION. 2017-07-07 12:24:40 -07:00
Johanna Amann
45f46e0e83 Merge branch 'patch-3' of https://github.com/balintm/bro
* 'patch-3' of https://github.com/balintm/bro:
  Update krb-protocol.pac
  padding comes before flags
2017-07-07 12:20:19 -07:00
Daniel Thayer
d7e9060f96 Update install instructions for Debian 9 2017-07-07 14:05:14 -05:00
balintm
83ebdb65a9 Update krb-protocol.pac 2017-07-07 11:31:58 +01:00
Johanna Amann
cc90b24b1d Add new cipher suites from draft-ietf-tls-ecdhe-psk-aead-05 2017-07-06 11:13:24 -07:00
balintm
a51047ec6d padding comes before flags
I am not able to find it in RFC, but all of the pcaps I came across  (https://wiki.wireshark.org/SampleCaptures) contain padding in-front of flags.
2017-07-04 10:42:18 +01:00
Johanna Amann
b527a9870d Update submodule
[nomail]
2017-06-27 14:54:48 -07:00
Johanna Amann
b7a7e45a07 Merge remote-tracking branch 'origin/master' into topic/johanna/ocsp-sct-validate 2017-06-26 11:16:08 -07:00
Robin Sommer
ff4caaf50a Updating submodule(s).
[nomail]
2017-06-14 07:32:34 -07:00
Robin Sommer
81af788731 Updating submodule(s).
[nomail]
2017-06-14 07:27:22 -07:00
Robin Sommer
7ff5ca1df9 Merge remote-tracking branch 'origin/topic/dnthayer/ticket1821'
* origin/topic/dnthayer/ticket1821:
  Remove loading of listen.bro in tests that do not need it
  Serialize tests that load listen.bro
  Fix race condition causing some tests to fail
  Fix a race condition in some failing tests
  The broccoli-v6addrs "-r" option was renamed to "-R"
  Fix a race condition in some failing tests
2017-06-14 07:25:04 -07:00
Johanna Amann
251ed3a4d9 Add 2.5.1 news file to master. 2017-06-13 11:04:15 -07:00
Johanna Amann
303c50e867 Remove link to no longer existing myricom plugin. 2017-06-13 11:01:24 -07:00
Johanna Amann
7e651c252c Update submodule
[nomail]
2017-06-13 10:59:38 -07:00
Johanna Amann
a69f5adc64 Update submodules
[nomail]
2017-06-06 13:17:23 -07:00
Johanna Amann
046f368622 Update version and submodules. 2017-06-05 15:17:28 -07:00
Johanna Amann
f5d9f1847f Remove non-existing links; this broke documentation build. 2017-06-05 15:16:45 -07:00
Johanna Amann
1ad5b12ef8 Fix at_least in Version.bro.
at_least did extactly the opposite from what it said.
2017-06-05 15:16:41 -07:00
Jon Siwek
368a50ed6d Updating submodule(s).
[nomail]
2017-05-26 08:29:12 -05:00
Jon Siwek
23d93a3213 Updating submodule(s).
[nomail]
2017-05-25 18:39:31 -05:00
Daniel Thayer
e9102f3de4 Remove loading of listen.bro in tests that do not need it
Removed the loading of "frameworks/communication/listen" from some
tests that don't need that functionality.  This is to avoid
serializing these tests.
2017-05-24 21:28:56 -05:00
Daniel Thayer
361a5dc2d8 Serialize tests that load listen.bro
Tests that load "frameworks/communication/listen" must be serialized
to prevent other tests failing due to multiple Bro instances trying
to listen on the same port.
2017-05-24 21:25:01 -05:00
Daniel Thayer
bd2d559fbf Fix race condition causing some tests to fail
Removed loading of the "frameworks/communication/listen" script for
a couple of tests that don't need this functionality.  This was causing
failures of some broccoli-related tests in the "istate" test directory
due to two instances of Bro trying to listen on the same port.
2017-05-24 14:45:11 -05:00
Daniel Thayer
961c247777 Fix a race condition in some failing tests
Use the new "-R" option for broccoli-vectors and broping so that
they will retry connecting to Bro until the connection is established.
This avoids a race condition and eliminates the need for a "sleep"
after starting Bro.
2017-05-24 13:13:20 -05:00
Daniel Thayer
34551dda15 The broccoli-v6addrs "-r" option was renamed to "-R" 2017-05-24 13:10:26 -05:00
Jon Siwek
5540b228e5 Merge branch 'nfs_changes' of https://github.com/jwallior/bro
* 'nfs_changes' of https://github.com/jwallior/bro:
  Add nfs unittest. Includes an example for the new nfs_proc_rename.
  Added rename event to rpc/nfs protocol analyzer. 	This event identifies and reports information 	about nfs/rpc calls and replies of the type 	rename.
  Expand parsing of RPC Call packets to add Uid, Gid, Stamp, MachineName and AuxGIDs
  Fix NFS protocol parser.
2017-05-22 20:35:56 -05:00
Daniel Thayer
f336aa5084 Fix a race condition in some failing tests
The tests that were using the broccoli-v6addrs test program would
sometimes fail because broccoli-v6addrs would try to connect to Bro
and fail (presumably because Bro hadn't yet fully initialized).
Fixed by using the new broccoli-v6addrs "-r" option which will retry
upon failure to connect to Bro.
2017-05-22 14:32:59 -05:00
Jon Siwek
4d06ee85ce Merge branch 'topic/corelight/ascii-gzip' of https://github.com/corelight/bro
* 'topic/corelight/ascii-gzip' of https://github.com/corelight/bro:
  Add gzip log writing to the ascii writer.
2017-05-22 00:10:09 -05:00
Julien Wallior
9a75c52726 Add nfs unittest. Includes an example for the new nfs_proc_rename. 2017-05-18 08:41:52 -04:00
Johanna Amann
8af810e00b SCT: Fix script error when mime type of file unknown. 2017-05-14 19:53:22 -07:00
Johanna Amann
7a1ec3501d SCT: another memory leak in SCT parsing. 2017-05-14 19:38:36 -07:00
Johanna Amann
e1d42ec99c SCT validation: fix small memory leak (public keys were not freed) 2017-05-14 09:55:17 -07:00
Johanna Amann
0107ad6c31 Merge branch 'topic/johanna/ocsp-sct-validate' of ssh://git.bro.org/bro into topic/johanna/ocsp-sct-validate 2017-05-14 08:07:18 -07:00
Seth Hall
7c107f9f02 Merge remote-tracking branch 'origin/topic/johanna/notice-suppression'
* origin/topic/johanna/notice-suppression:
  Lessen cluster node of notice suppression.
2017-05-12 15:35:55 -04:00
Johanna Amann
eb50b3fed1 Change end-of-connection handling for validation
Move from using CCS (before: established) to just doing certificate
validation at the end of the connection.

This is (again) more robust in the case of aborted connection. I am
moving this into a hook because of the complexity of the
end-of-connection handling for SSL.

This should probably be extended to not just handle SSL validation, but
all other logging constructs that are currently called in _established.
2017-05-11 22:50:20 -07:00
Johanna Amann
876f492a35 OCSP/TLS/SCT: Fix a number of test failures.
These were caused by earlier code updates.

This commit also removes the ocsp stapling logging script; it was
defunctional and the information provided by it wnever really has been
especially interesting.
2017-05-06 08:01:20 -07:00
Johanna Amann
ff2c5b9345 Update submodule
[nomail]
2017-05-05 11:09:47 -07:00
Jon Siwek
874d2b9fb0 Merge branch 'topic/corelight/logging-hooks' of https://github.com/corelight/bro
* 'topic/corelight/logging-hooks' of https://github.com/corelight/bro:
  Plugin: Add hooks for log init and writing.
2017-05-04 11:44:43 -05:00
Johanna Amann
a334247478 SCT Validate: make caching a bit less aggressive.
This triggers a re-validation of the SCT when the certificate validation
status changed. This means that a SCT will show as valid if the
certificate chain could be validated and can now be used to determine
the correct issuer key hash.
2017-05-03 22:06:24 -07:00
Johanna Amann
ff998dfa43 Lessen cluster node of notice suppression.
With this commit, the data structure that is transfered for notice
suppression is much smaller than before, not including potentially
complex data structures like the fa_file record.
2017-05-03 13:28:16 -07:00
Johanna Amann
7f292dc4ad TLS: Fix compile warning (comparison between signed/unsigned).
This was introduced with the addition of new TLS1.3 extensions.
2017-05-02 11:51:55 -07:00
Jon Siwek
12e809dfa0 Merge branch 'topic/corelight/file-rename-unlink' of https://github.com/corelight/bro
* 'topic/corelight/file-rename-unlink' of https://github.com/corelight/bro:
  Add rename, unlink, and rmdir bifs.
2017-05-01 10:41:28 -05:00
Johanna Amann
684ea8aa37 Plugin: Add hooks for log init and writing.
The two hooks being added are:

void HookLogInit(const std::string& writer, const std::string& instantiating_filter, bool local, bool remote, const logging::WriterBackend::WriterInfo& info, int num_fields, const threading::Field* const* fields);

which is called when a writer is being instantiated and contains
information about the fields being logged, as well as

bool HookLogWrite(const std::string& writer, const std::string& filter, const logging::WriterBackend::WriterInfo& info, int num_fields, const threading::Field* const* fields, threading::Value** vals);

which is called for each log line being written by each writer. It
contains all the data being written. The data can be changed in the
function call and lines can be prevented from being written.

This commit also fixes a few small problems with plugin hooks itself,
and extends the tests that were already there, besides introducing tests
for the added functionality.
2017-04-24 14:02:05 -07:00