Commit graph

3113 commits

Author SHA1 Message Date
Jon Siwek
59596e0bfa Merge branch 'master' of https://github.com/ZekeMedley/zeek
* 'master' of https://github.com/ZekeMedley/zeek:
  Use the right delete and improve the leak test. Increases the size of the table being loaded in the pattern leak test and uses the right delete method.
  Fix formatting.
  Fix memory leak and add test.
  Add pattern support to input framework.
2019-06-04 19:19:19 -07:00
Jon Siwek
43104565a4 Merge remote-tracking branch 'origin/topic/timw/159-coerce-counts'
* origin/topic/timw/159-coerce-counts:
  GHI-155: set the type of a vector based on the variable's type, not the value's type
  GH-159: Allow coercion of numeric values into other types
  Allow passing a location to BroObj::Warning and BroObj::Error.
  Add CLion directories to gitignore
  Move #define outside of max_type for clarity
2019-06-04 17:57:15 -07:00
Tim Wojtulewicz
394aec5a72 GHI-155: set the type of a vector based on the variable's type, not the value's type 2019-06-04 14:59:17 -07:00
ZekeMedley
42b1f4fd2e Make paraglob serializable and copyable. 2019-06-04 14:56:48 -07:00
ZekeMedley
e1520a0d67 Initial paraglob integration. 2019-06-04 14:24:51 -07:00
Tim Wojtulewicz
76fe643c87 GH-159: Allow coercion of numeric values into other types 2019-06-04 10:08:41 -07:00
Mauro Palumbo
50f265353b add tests for ntp protocol (WIP) 2019-06-04 17:59:18 +02:00
Robin Sommer
0767598771 GH-293: Protect copy() against reference cycles.
Reference cycles shouldn't occur but there's nothing really preventing
people from creating them, so may just as well be safe and deal with
them when cloning values. While the code is a bit more cumbersome this
way, it could actually be bit faster as well as it no longer caches
non-mutable values. (I measured it with the test suite: That's about
the same in execution time, maybe tiny little bit faster now;
definitly not slower).
2019-06-03 15:20:30 +00:00
Johanna Amann
86ac468882 support the newer TLS 1.3 key_share extension.
This one adds a separate new case that has to be parsed differently - if
a hello-retry-request is sent, only the namedgroup is sent - without the
additional key material.

Support for the legacy extension is retained.
2019-06-03 14:40:33 +10:00
Johanna Amann
af59ed6bdb Merge remote-tracking branch 'origin/master' into topic/johanna/tls13-details 2019-06-03 12:19:12 +10:00
ZekeMedley
0733c857d2 Use the right delete and improve the leak test.
Increases the size of the table being loaded in the pattern leak
test and uses the right delete method.
2019-05-30 09:31:02 -07:00
Jon Siwek
1ce0fcce49 GH-387: update Broker topic names to use "zeek/" prefix 2019-05-29 15:56:37 -07:00
ZekeMedley
7584bf65e2 Fix memory leak and add test. 2019-05-29 15:29:30 -07:00
ZekeMedley
cfeb6f0f0d Add pattern support to input framework. 2019-05-29 12:19:40 -07:00
Vlad Grigorescu
2005a76896 WIP: BinPAC NTP analyzer 2019-05-29 09:37:55 -05:00
Jon Siwek
7bc9a3934d Merge remote-tracking branch 'origin/topic/vlad/rdp_bluekeep'
* origin/topic/vlad/rdp_bluekeep:
  RDP: Update existing baselines with new client_channels field
  RDP: Add parsing and logging of channels requested by the client. Can determine capabilities requested by the client, as well as attacks such as CVE-2019-0708
2019-05-28 11:33:20 -07:00
Jon Siwek
f2b7764769 Merge branch 'table-error' of https://github.com/ZekeMedley/zeek
* 'table-error' of https://github.com/ZekeMedley/zeek:
  Check table yield type on assignment.

Also extended the type checking to include sets as well as the full
table type (yield type as well as index types).
2019-05-28 10:51:50 -07:00
Vlad Grigorescu
85fc553136 RDP: Update existing baselines with new client_channels field 2019-05-28 09:31:32 -05:00
Jon Siwek
748a4f2ea2 Merge branch '001-dhcp-options' of https://github.com/jrwren/zeek
* '001-dhcp-options' of https://github.com/jrwren/zeek:
  add some dhcp options
2019-05-24 18:08:34 -07:00
Christian Kreibich
8c60f6afa6 Add input file name to additional ASCII reader warning messages
The ASCII reader had a few messages that did not indicate in which
file it notices a problem. With the input framework it simplifies
troubleshooting when that file is spelled out, because you may have
multiple such files on your system.

Includes test baseline updates.
2019-05-24 16:04:06 -07:00
Jay Wren
1eda26d16f add some dhcp options 2019-05-24 16:52:12 -04:00
Jon Siwek
d886f40728 GH-378: check validity of missing 'val' field in Input::add_table
It's only allowed to be missing when the 'destination' field is a
"set" type, but not for a "table" type.

Fixes GH-378
2019-05-24 10:30:49 -07:00
Jon Siwek
580822a32c Merge remote-tracking branch 'origin/topic/dnthayer/gh-339'
* origin/topic/dnthayer/gh-339:
  Rename all BRO-prefixed environment variables
2019-05-23 20:23:14 -07:00
Johanna Amann
38652ee8d9 Remove test-case for removed functionality 2019-05-23 18:52:33 -07:00
Jon Siwek
ce17ae8ea2 Update broker unit test output.
Due to string representation of Broker vectors changing (they now
use parentheses instead of square brackets).

Related to https://github.com/zeek/broker/issues/43
2019-05-23 18:06:47 -07:00
Tim Wojtulewicz
e10f9e4047 GH-173: Support ranges of values for value_list elements in the signature parser
This adds support for ranged values everywhere a value_list is used, not just for source port fields.
2019-05-23 10:58:04 -07:00
Johanna Amann
63e6921895 Add leak-checks for new copy operations 2019-05-22 14:57:55 -07:00
Johanna Amann
e7c80ae741 Merge remote-tracking branch 'origin/master' into topic/johanna/clone 2019-05-22 14:36:46 -07:00
Johanna Amann
74bb7716f6 Finish implementation of copy method.
All types (besides EntropyVal) now support a native copy operation,
which uses primitives of the underlying datatypes to perform a quick
copy, without serialization.

EntropyVal is the one exception - since that type is rather complex
(many members) and will probably not be copied a lot, if at all, it
makes sense to just use the serialization function.

This will have to be slightly re-written in the near-term-future to use
the new serialization function for that opaque type.

This change also introduces a new x509_from_der bif, which allows to
parse a der into an opaque of x509.

This change removes the d2i_X509_ wrapper function; this was a remnant
when d2i_X509 took non-const arguments. We directly use d2i_X509 at
several places assuming const-ness, so there does not seem to ba a
reason to keep the wrapper.

This change also exposed a problem in the File cache - cases in which an
object was brought back into the cache, and writing occurred in the
file_open event were never correctly handeled as far as I can tell.
2019-05-22 14:29:37 -07:00
Daniel Thayer
1a74516db1 Rename all BRO-prefixed environment variables
For backward compatibility when reading values, we first check
the ZEEK-prefixed value, and if not set, then check the corresponding
BRO-prefixed value.
2019-05-22 00:12:31 -05:00
Johanna Amann
2efbe76920 Checkpoint - all non-opaque-types can be cloned. 2019-05-21 15:06:39 -07:00
Jon Siwek
8d49b5abf0 Merge remote-tracking branch 'origin/topic/dnthayer/bro-to-zeek'
* origin/topic/dnthayer/bro-to-zeek:
  Additional Bro to Zeek renaming
2019-05-20 21:00:19 -07:00
Johanna Amann
d13c939233 Merge remote-tracking branch 'origin/master' into topic/johanna/clone 2019-05-20 15:18:10 -07:00
Daniel Thayer
fe3d508796 Additional Bro to Zeek renaming
Most of these changes are either cmake-related or plugin-related.
Added a new test "plugins/legacy.zeek" to test that legacy Bro plugins
still work.

Also added a symlink bro-path-dev.in because some legacy Bro packages
won't install without it.
2019-05-19 16:51:36 -05:00
Jon Siwek
dd173f4961 Always emit scripting errors to stderr during zeek_init
Otherwise, setting Reporter::errors_to_stderr=F causes important
error messages to be lost (and this setting is the default for
ZeekCtl).  E.g. now that we terminate if there's errors during
zeek_init, GH-369 shows that the only error message given was
"fatal error: errors occurred while initializing", which is not
helpful in determining the actual issue.
2019-05-17 14:18:45 -07:00
Daniel Thayer
3f9e7138bd More bro-to-zeek renaming in the unit tests 2019-05-16 02:27:54 -05:00
Jon Siwek
a8c0cd7dee Fix potential race in openflow broker plugin
Broker::subscribe() after Broker::peer() may result in losing messages,
always best to do the reverse order.

Also possibly improved chance of unstable unit test output order.
2019-05-15 10:12:32 -07:00
Jon Siwek
13867f53c3 Update btest.cfg path to use zeek-aux 2019-05-14 18:36:20 -07:00
Jon Siwek
6ad7099f7e Merge remote-tracking branch 'origin/topic/robin/gh-239'
* origin/topic/robin/gh-239:
  Undo a change to btest.cfg from a recent commit
  Updating submodule.
  Fix zeek-wrapper
  Update for renaming BroControl to ZeekControl.
  Updating submodule.
  GH-239: Rename bro to zeek, bro-config to zeek-config, and bro-path-dev to zeek-path-dev.
2019-05-14 13:27:40 -07:00
Daniel Thayer
bbaee15280 Undo a change to btest.cfg from a recent commit
Remove a line from btest.cfg that was added (probably unintentionally)
in commit 789cb376.
2019-05-12 19:17:25 -05:00
Johanna Amann
6f82899466 Merge remote-tracking branch 'origin/topic/jsiwek/gh-353'
* origin/topic/jsiwek/gh-353:
  GH-353: Add `/<re>/i` case-insensitive signature syntax
2019-05-08 08:58:41 -07:00
Jon Siwek
5484c40b1f GH-353: Add /<re>/i case-insensitive signature syntax 2019-05-06 14:22:12 -07:00
Johanna Amann
4c19e60488 Merge remote-tracking branch 'origin/master' into topic/johanna/remove-deprecated-functions-events 2019-05-03 15:15:22 -07:00
Johanna Amann
dcd6454530 Remove RemoteSerializer and related code/types.
Also removes broccoli from the source tree.
2019-05-03 15:00:13 -07:00
Jon Siwek
eda7610806 Fix sporadic openflow/broker test failure
Looked like a possible race condition in how the test was structured: an
endpoint sees its peer got lost and likewise exits immediately before
having a chance to process events the peer had sent just before exiting.
Fix is to reverse which endpoint initiates the termination sequence so
we can be sure we see the required events.
2019-05-03 11:22:56 -07:00
Jon Siwek
84ca12fdb4 Rename Zeexygen to Zeekygen 2019-05-02 21:39:21 -07:00
Jon Siwek
f2f06d66c0 Remove previously deprecated policy/protocols/smb/__load__ 2019-05-02 20:50:30 -07:00
Jon Siwek
1a77c1b287 Merge remote-tracking branch 'origin/topic/johanna/remove-deprecated-functions-events'
* origin/topic/johanna/remove-deprecated-functions-events:
  Remove deprecated functions/events
2019-05-02 19:18:45 -07:00
Johanna Amann
6d47077222 Merge remote-tracking branch 'origin/topic/jsiwek/gh-340'
* origin/topic/jsiwek/gh-340:
  GH-340: Improve IPv4/IPv6 regexes, extraction, and validity functions
2019-05-02 12:28:31 -07:00
Johanna Amann
5d44735209 Remove deprecated functions/events
This commit removed functions/events that have been deprecated in Bro
2.6. It also removes the detection code that checks if the old
communication framework is used (since all the functions that are
checked were removed).

Addresses parts of GH-243
2019-05-02 12:06:39 -07:00