Commit graph

9059 commits

Author SHA1 Message Date
Vlad Grigorescu
10109b6b93 RDP: Add weird if specification violated for max channels allowed. 2019-05-29 08:25:08 -05:00
Jon Siwek
574d2c363a Merge remote-tracking branch 'origin/topic/jsiwek/broker-less-copies'
* origin/topic/jsiwek/broker-less-copies:
  Reduce data copying in Broker message processing
2019-05-28 17:58:59 -07:00
Jon Siwek
ebbeb4517b Merge remote-tracking branch 'origin/topic/jsiwek/broker-store-process-n'
* origin/topic/jsiwek/broker-store-process-n:
  Improve Broker I/O loop integration: less mutex locking
  Improve processing of broker data store responses
2019-05-28 17:43:52 -07:00
Jon Siwek
4ff473a596 Updating submodule(s).
[nomail]
2019-05-28 14:07:35 -07:00
Jon Siwek
f88843c5e9 Updating submodule(s).
[nomail]
2019-05-28 13:33:46 -07: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
Vlad Grigorescu
8eb14fcb83 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 09:25:50 -05:00
Zeke Medley
4ae764f74b Check table yield type on assignment. 2019-05-25 12:53:36 -07: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
Jon Siwek
9192d9289e Merge branch 'topic/christian/inputframework-reporter-filenames' of https://github.com/ckreibich/zeek
* 'topic/christian/inputframework-reporter-filenames' of https://github.com/ckreibich/zeek:
  Add input file name to additional ASCII reader warning messages
2019-05-24 17:06:39 -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
88278214a9 Fix memory leak when no protocol_violation event handler exists 2019-05-24 09:01:45 -07:00
Daniel Thayer
5a253d355b Rename directories from bro to zeek 2019-05-24 03:32:14 -05:00
Jon Siwek
7f0fb49612 Add an internal getenv wrapper function: zeekenv
It maps newer environment variable names starting with ZEEK to the
legacy names starting with BRO.
2019-05-23 20:42:42 -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
9f4749adce Remove const from ShallowClone.
It was not actually const due to Ref-ing.
2019-05-23 18:52:53 -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
Jon Siwek
30db17464d Merge remote-tracking branch 'origin/topic/timw/173-port-ranges'
* origin/topic/timw/173-port-ranges:
  GH-173: Support ranges of values for value_list elements in the signature parser
  GH-173: Modify the signature parser so ID components (such as variable names) can't start with numbers
2019-05-23 13:05:50 -07:00
Jon Siwek
812ca7d2ab Remove redundant RecordVal::record_type member
Val objects already store a reference to the type, no need for another.
2019-05-23 12:12:48 -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
Tim Wojtulewicz
42f7be0473 GH-173: Modify the signature parser so ID components (such as variable names) can't start with numbers 2019-05-23 10:58:04 -07:00
Jon Siwek
8d6dbc2d46 Fix parse-time RecordVal tracking containing duplicates
The same RecordVal was unintentionally being added to the list within
a loop over its fields instead of just once per ctor.
2019-05-23 10:54:04 -07:00
Johanna Amann
da9bf96242 Merge remote-tracking branch 'origin/master' into topic/johanna/remove-serializer 2019-05-23 07:37:56 -07:00
Jon Siwek
0f2e778216 Merge remote-tracking branch 'origin/topic/johanna/clone'
* origin/topic/johanna/clone:
  Add leak-checks for new copy operations
  Finish implementation of copy method.
  Checkpoint - all non-opaque-types can be cloned.
  Reimplement copy().

Fixed a couple leaks during merge.
2019-05-22 23:59:21 -07:00
Johanna Amann
7ae5c7d1b4 Merge remote-tracking branch 'origin/master' into topic/johanna/remove-serializer
# Conflicts:
#	src/File.cc
#	src/File.h
#	src/StateAccess.h
#	src/bro.bif
2019-05-22 15:16:31 -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
d6096b1618 Remove state_dir and state_write_delay options
Since associated functionality was already removed
2019-05-21 09:19:28 -07:00
Jon Siwek
f0c266eac1 Remove a reference to &synchronized from docs 2019-05-21 09:15:22 -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
Jon Siwek
9d67870a81 Merge remote-tracking branch 'origin/topic/johanna/deprecated-attributes'
* origin/topic/johanna/deprecated-attributes:
  Remove deprecated attributes.
2019-05-20 16:21:00 -07:00
Johanna Amann
d13c939233 Merge remote-tracking branch 'origin/master' into topic/johanna/clone 2019-05-20 15:18:10 -07:00
Johanna Amann
1ff2894af2 Remove deprecated attributes.
To be more exact: &encrypt, &mergeable, &rotate_interval, &rotate_size

Also removes no longer used redef-able constants:
log_rotate_interval, log_max_size, log_encryption_key

GH-243
2019-05-20 14:17:03 -07:00
Jon Siwek
ef484c388a Updating submodule(s).
[nomail]
2019-05-20 13:23:38 -07:00
Johanna Amann
824ccde6fc Merge remote-tracking branch 'origin/master' into topic/johanna/243 2019-05-20 10:14:11 -07:00
Johanna Amann
0080c5ea09 Merge remote-tracking branch 'origin/topic/jsiwek/krb-optional-fields'
* origin/topic/jsiwek/krb-optional-fields:
  Add missing &optional attr to KRB record fields
2019-05-20 09:33:13 -07:00
Johanna Amann
85e2a6ad90 Update binpac submodule.
[nomail]
2019-05-20 09:07:48 -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
Johanna Amann
ffa173abc0 Implement a Shallow Clone operation for types.
This is needed to track name changes for the documentation.

With this things, which do not need val-cloning, generally seem to work
again. There are a whole bunch of test failures at the moment.
2019-05-17 11:13:04 -07:00
Jon Siwek
9d07e4f0b8 Merge remote-tracking branch 'origin/topic/dnthayer/bro-renaming'
* origin/topic/dnthayer/bro-renaming:
  More bro-to-zeek renaming in scripts and other files
  More bro-to-zeek renaming in the unit tests
2019-05-16 13:37:49 -07:00
Jon Siwek
f8d7aa2387 Add missing &optional attr to KRB record fields
The KRB parser allowed for the following types/fields to be left
uninitialized, so an &optional attribute was added to reflect that:

  - KRB::Error_Msg
    - pvno
    - msg_type
    - server_time
    - service_realm
    - service_name

  - KRB::KDC_Request
    - kdc_options
    - service_realm
    - till
    - nonce
    - encryption_types

Usages have also been adapted to perform existence checks.
2019-05-16 08:52:04 -07:00