Commit graph

2220 commits

Author SHA1 Message Date
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
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
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
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
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
Johanna Amann
c868a19a28 Add gzip log writing to the ascii writer.
This feature can be enabled globally for all logs by setting
LogAscii::gzip_level to a value greater than 0.

This feature can be enabled on a per-log basis by setting gzip-level in
$confic to a value greater than 0.
2017-04-24 13:15:32 -07:00
Johanna Amann
333bb71ed1 Add rename, unlink, and rmdir bifs. 2017-04-24 11:58:05 -07:00
Robin Sommer
bf15ff4c83 Merge remote-tracking branch 'origin/topic/johanna/tls13-extensions'
* origin/topic/johanna/tls13-extensions:
  Add support for two TLS 1.3 extensions.
2017-04-21 14:15:23 -07:00
Johanna Amann
9e302c7e89 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix some failing tests
2017-04-10 13:31:17 -07:00
Daniel Thayer
817b9e01a3 Fix some failing tests
Increase delay time before launching 2nd process to give bro more of a
chance to startup.
2017-04-10 15:24:21 -05:00
Johanna Amann
a3b664c77d Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix the test group name in some broker test files
2017-04-07 10:33:47 -07:00
Johanna Amann
bdc693e72a NetControl: small rule_error changes
* add rule_error test for acld plugin

* add namespace for rule_error calls in OpenFlow
2017-04-07 10:26:34 -07:00
Daniel Thayer
fcbf54f697 Fix the test group name in some broker test files
Some broker leak tests were being ignored because the test group
name was incorrect.
2017-04-07 12:24:29 -05:00
Johanna Amann
6c9449c780 Add support for two TLS 1.3 extensions.
New events:

event ssl_extension_supported_versions(c: connection, is_orig: bool, versions: index_vec)

event ssl_extension_psk_key_exchange_modes(c: connection, is_orig: bool, modes: index_vec)
2017-04-05 11:55:40 -07:00
Johanna Amann
0cd0ffed13 SSL: update dpd signature for TLS1.3
The dpd signature missed a few cases that are used for TLS 1.3,
especially when draft versions (which are all that we are seeing at the
moment) are being negotiated.

This fix mostly allows draft versions in the server hello (identified by
7F[version]; since we do not know how many drafts there will be, we are
currently allowing a rather safe upper limit.
2017-04-05 08:58:08 -07:00
Daniel Thayer
ca51dfc9c7 Fix a test that was failing on some platforms
Fixed by sorting the .stderr file, since the ordering of lines was
not consistent on all platforms.
2017-03-22 14:37:37 -05:00
Johanna Amann
6544e36564 Remove cluster catch and release.
This test keeps failing intermittently because of timing issues that are
surprisingly hard to fix.
2017-03-15 08:00:36 -07:00
Seth Hall
ffdd684eaa Merge remote-tracking branch 'origin/master' into topic/seth/input-thread-behavior 2017-03-09 12:18:41 -05:00
Johanna Amann
b6e6302b40 Ascii reader error changes - fix small bugs
The changes are now a bit more succinct with less code changes required.
Behavior is tested a little bit more thoroughly and a memory problem
when reading incomplete lines was fixed. ReadHeader also always directly
returns if header reading failed.

Error messages now are back to what they were before the change, if the
new behavior is not used.

I also tweaked the documentation text a bit.
2017-03-03 12:42:44 -08:00
Seth Hall
1c973f4adf Merge branch 'master' of ssh://git.bro-ids.org/bro 2017-02-28 12:40:12 -05:00
Seth Hall
01a3943635 Do some updates to remove build time warnings.
The linker was complaining about linking files that didn't
have any symbols.  These were actually empty files so I just
got rid of them and removed references to them.
2017-02-28 12:40:01 -05:00
Robin Sommer
38d9f07bbd Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix a test that sometimes fails on FreeBSD
2017-02-28 08:00:24 -08:00
Seth Hall
b89fe748c9 Merge remote-tracking branch 'origin/topic/robin/broker-logging'
* origin/topic/robin/broker-logging:
  Another fix for the new Broker-based remote logging.
  Fix some minor issues.
  Adding Broker ifdefs for new remote logging code.
  Changing semantics of Broker's remote logging to match old communication framework.
2017-02-27 15:10:36 -05:00
Robin Sommer
58a2d06c93 Another fix for the new Broker-based remote logging. 2017-02-27 08:22:16 -08:00
Daniel Thayer
0f695a7316 Fix a test that sometimes fails on FreeBSD 2017-02-25 21:53:02 -06:00
Seth Hall
5078159080 Tiny fix to correct a warning message. 2017-02-23 23:13:48 -05:00
Seth Hall
75744d22bc Input's ascii reader is now more resilient.
By default, the ASCII reader does not fail on errors anymore.
If there is a problem parsing a line, a reporter warning is
written and parsing continues.  If the file is missing or can't
be read, the input thread just tries again on the next heartbeat.

Options have been added to recreate the previous behavior...

const InputAscii::fail_on_invalid_lines: bool;
and
const InputAscii::fail_on_file_problem: bool;

They are both set to `F` by default which makes the input readers
resilient to failure.
2017-02-23 23:13:12 -05:00
Johanna Amann
ae6dbf17a2 Input Manager: tiny error message fix. 2017-02-23 10:00:52 -08:00
Seth Hall
7bbaa911b0 I missed one test I needed to update for the kerberos commit that I just pushed. 2017-02-22 00:02:51 -05:00
Seth Hall
f562989aa3 Merge remote-tracking branch 'origin/topic/vladg/krb5-ticket-tracking'
* origin/topic/vladg/krb5-ticket-tracking:
  Kerberos ciphertext had some additional ASN.1 content being lumped in.
2017-02-22 00:01:20 -05:00
Seth Hall
623ebea655 Rework the RADIUS base script.
- This fixes BIT-1769 by logging all requests even in the absence of a
   reply.  The way that request and replying matching were being handled
   was restructured to mostly ignore the transaction ids because they
   aren't that helpful for network monitoring and it makes the script
   structure more complicated.
 - Add `framed_addr` field to the radius log to indicate if the radius
   server is hinting at an address for the client.
 - Add `ttl` field to indicate how quickly the radius server is replying
   to the network access server.
 - Fix a bunch of indentation inconsistencies.
2017-02-20 00:07:14 -05:00
Seth Hall
0b8b76cfab Refactor base krb scripts and update tests. 2017-02-18 13:55:39 -05:00
Robin Sommer
524002eefa Merge remote-tracking branch 'origin/master' into topic/robin/broker-logging 2017-02-17 16:30:17 -08:00
Johanna Amann
5f910e1005 Merge remote-tracking branch 'origin/topic/jsiwek/bit-1785'
* origin/topic/jsiwek/bit-1785:
  BIT-1785: fix scripts able to access uninitialized variables.

BIT-1785 #merged
2017-02-15 16:19:21 -08:00
Johanna Amann
7c7e12ab94 Merge remote-tracking branch 'origin/topic/seth/BIT-1480'
* origin/topic/seth/BIT-1480:
  Small change to avoid potentially over reading memory.
  Implement ERSPAN support.

BIT-1480 #merged
2017-02-15 15:32:47 -08:00
Johanna Amann
2b694a1881 Update failing intel framework test. 2017-02-11 08:36:47 -08:00
Robin Sommer
a5e9a535a5 Changing semantics of Broker's remote logging to match old communication framework.
Broker had changed the semantics of remote logging: it sent over the
original Bro record containing the values to be logged, which on the
receiving side would then pass through the logging framework normally,
including triggering filters and events. The old communication system
however special-cases logs: it sends already processed log entries,
just as they go into the log files, and without any receiver-side
filtering etc. This more efficient as it short-cuts the processing
path, and also avoids the more expensive Val serialization. It also
lets the sender determine the specifics of what gets logged (and how).

This commit changes Broker over to now use the same semantics as the
old communication system.

TODOs:
     - The new Broker code doesn't have consistent #ifdefs yet.

     - Right now, when a new log receiver connects, all existing logs
     are broadcasted out again to all current clients. That doesn't so
     any harm, but is unncessary. Need to add a way to send the
     existing logs to just the new client.
2017-02-10 18:46:45 -08:00
Seth Hall
ffa34180df Merge branch 'topic/jgras/bit-1790' of https://github.com/J-Gras/bro into topic/seth/BIT-1790 2017-02-10 09:39:27 -05:00
Jan Grashoefer
c6b16ad2ca Updated expiration test case to cover reinsertion.
Addresses BIT-1790
2017-02-09 19:40:25 +01:00
Jon Siwek
c857f5c4dd BIT-1785: fix scripts able to access uninitialized variables. 2017-02-06 23:30:54 -06:00
Seth Hall
3cfe8cd294 Merge branch 'master' of ssh://git.bro-ids.org/bro 2017-02-06 10:18:05 -05:00
Robin Sommer
d942b0e8e1 Merge branch 'master' of git.bro.org:bro 2017-02-03 16:39:13 -08:00