Commit graph

2206 commits

Author SHA1 Message Date
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
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
Johanna Amann
647eb9703f Change snaplens of a few more tests.
Recent pcap versions do not like the huge snaplens that the header in
these files uses.
2017-02-03 14:10:11 -08:00
Robin Sommer
bdbbed64f1 Merge remote-tracking branch 'origin/topic/johanna/l2flip'
BIT-1787 #merged

* origin/topic/johanna/l2flip:
  Fix layer 2 connection flipping.
2017-02-03 12:31:55 -08:00
Seth Hall
59f0477d29 Implement ERSPAN support.
This is a small caveat to this implementation.  The ethernet
header that is carried over the tunnel is ignored.  If a user
tries to do MAC address logging, it will only show the MAC
addresses for the outer tunnel and the inner MAC addresses
will be stripped and not available anywhere.
2017-02-03 12:29:22 -08:00
Daniel Thayer
6812a7febe Fix to_json() to not lose precision for values of type double
Also changed a few values in the tests for better numerical diversity.
2017-02-02 13:03:05 -06:00
Daniel Thayer
65d6e5a4f7 Fix the to_json() function for bool, enum, and interval types 2017-02-02 12:09:40 -06:00
Daniel Thayer
9370db8980 Add tests for the to_json() function 2017-02-02 11:58:38 -06:00
Robin Sommer
5ab3b86c72 Merge remote-tracking branch 'origin/master' into topic/robin/file-analysis-fixes 2017-01-31 14:53:33 -08:00
Robin Sommer
e21cca4ba8 Adding test with command line that used to trigger a crash. 2017-01-31 14:52:37 -08:00
Johanna Amann
6487446f27 Change snaplen of test trace from 1,000,000 to 10,000
Recent versions of libpcap are unhappy with values bigger than 262,144
and will refuse reading the file.
2017-01-31 13:10:36 -08:00
Johanna Amann
7feaf4499f Fix layer 2 connection flipping.
If connection flipping occured in Sessions.cc code (invoked e.g. when
the original SYN is missing), layer 2 flipping was not performed. This
change switches to always use the connection flipping code in Conn.cc
which performs the switch correctly.
2017-01-30 15:13:56 -08:00
Seth Hall
08bc5ccd42 Fixing tests 2017-01-25 02:06:35 -05:00
Seth Hall
2d1f007186 Extend file extraction log.
- New fields: extracted_cutoff and extracted_size.
   These fields will be null if the file isn't extracted.

 - Extended the extraction test to test the files log too.
2017-01-25 01:16:46 -05:00
Johanna Amann
e991189fff Remove brocon event.
It make the plugins/hooks test fail, because the number of the current
year shows up in the Baseline.
2017-01-19 13:01:35 -08:00
Johanna Amann
8eddeed78f Allow access to global variables using GLOBAL:: namespace.
Addresses BIT-1758. Patch was contributed by François Pennaneach
<francois.pennaneach@free.fr>.
2016-12-07 15:28:34 -08:00