Commit graph

11634 commits

Author SHA1 Message Date
Johanna Amann
65434dd518 Update external test suites for hash changes. 2020-05-12 03:44:06 +00:00
Johanna Amann
27d87919a1 Hashing: Remove unnecessary include 2020-05-12 00:30:33 +00:00
Johanna Amann
a259e8bbda Merge remote-tracking branch 'origin/master' into topic/johanna/hash-unification 2020-05-12 00:29:02 +00:00
Johanna Amann
330b997e3a Add highwayhash in a more cmake-y way 2020-05-11 17:19:31 -07:00
Johanna Amann
536fda2e22 Remove highwayhash submodule.
It is moving to 3rdparty...
2020-05-11 16:01:38 -07:00
Michael Dopheide
32653230b7 Log services with unknown protocols 2020-05-11 17:58:45 -05:00
Tim Wojtulewicz
f539723e8e Merge remote-tracking branch 'origin/topic/jsiwek/mmdb-msg-limit'
* origin/topic/jsiwek/mmdb-msg-limit:
  Limit rate at which MMDB error/status messages are emitted
2020-05-11 11:12:12 -07:00
Jon Siwek
61ce1b18fb Limit rate at which MMDB error/status messages are emitted
If there's some bad state we can be in where MMDB lookup/open operations
consistently fail, then the volume of associated reporter messages can
get overwhelmingly large especially if a lookup operation is being done
for each network connection.

This adds a limit of an arbitrary 20 messages every 5 minutes, which
should be enough information to understand the overall
open/close/lookup-failure pattern.
2020-05-08 13:05:24 -07:00
Jon Siwek
73a57335db Merge remote-tracking branch 'origin/topic/timw/unordered-lists'
* origin/topic/timw/unordered-lists:
  Review fixups
  Change timer_list in BroList to be an unordered list.
  Add ability for List to be ordered/unordered
  Add unit testing for List
  Fix bug with List where replace() doesn't work with non-pointer types
2020-05-08 11:52:03 -07:00
Jon Siwek
b5531ecbd3 Merge branch 'set_to_regex-docs' of https://github.com/jlagermann/zeek
- Adjusted the formatting during merge

* 'set_to_regex-docs' of https://github.com/jlagermann/zeek:
  added examples to set_to_regex comments Signed-ff-by: James Lagermann <james.lagermann@corelight.com>
2020-05-08 11:48:44 -07:00
Tim Wojtulewicz
690061b01c Review fixups 2020-05-08 10:46:03 -07:00
James Lagermann
2c04a56236
added examples to set_to_regex comments
Signed-ff-by: James Lagermann <james.lagermann@corelight.com>
2020-05-08 12:31:56 -05:00
Johanna Amann
695457fe44 Unbreak build on Fedora 32 (gcc 10.0.1)
It requires cstdint in a few more headers.
2020-05-07 22:18:04 -07:00
Jon Siwek
9babb7d39f Merge remote-tracking branch 'origin/topic/johanna/958'
- Extended the improved error to cover miss-typed identifiers, too

* origin/topic/johanna/958:
  Fix crash when trying to redef non-existing enum
2020-05-07 17:15:53 -07:00
Johanna Amann
9c44403c62 Fix crash when trying to redef non-existing enum
Fixes GH-958
2020-05-07 14:57:03 -07:00
Johanna Amann
04ed125941 Merge remote-tracking branch 'origin/master' into topic/johanna/hash-unification 2020-05-06 23:18:33 +00:00
Tim Wojtulewicz
8ac591c9f5 Revert addition of final modifier to JSON formatter 2020-05-06 10:40:48 -07:00
Jon Siwek
39c00c9966 Updating CHANGES and VERSION. 2020-05-06 10:04:47 -07:00
Jon Siwek
280bf56786 Fix global buffer over-read in POP3 analyzer
Report and patch by Justin Azoff
2020-05-06 10:00:58 -07:00
Jon Siwek
b749dda520 Fix SSL scripting error leading to access of unitialized field
Reported by Justin Azoff
2020-05-06 09:52:31 -07:00
Johanna Amann
43c0cf1e3d Update submodule
[nomail]
2020-05-05 21:59:21 +00:00
Johanna Amann
7d28a6ee9a Remove outdated comment on set_to_regex.
We can add patterns at runtime since 2.6.
2020-05-05 14:23:33 -07:00
Jon Siwek
156686b237 Correct spelling of DCE/RPC operation string NetrLogonSameLogonWithFlags
Fixes GH-952
2020-05-04 18:03:14 -07:00
Jon Siwek
eff11c5ef4 Merge branch 'network-time-init' of https://github.com/J-Gras/zeek
- Minor whitespace/format adjustments

* 'network-time-init' of https://github.com/J-Gras/zeek:
  Fix documentation for network_time_init.
  Improve network_time_init() test and add baseline.
  Add network_time_init() event.
  Add test for network_time behavior.
2020-05-04 17:51:39 -07:00
Jon Siwek
2d0b8c0b8e Use zeek::detail namespace for fuzzer utils 2020-05-04 17:37:11 -07:00
Jon Siwek
5a2d25c954 Set terminating flag during fuzzer cleanup 2020-05-04 17:29:21 -07:00
Jon Siwek
62ec60b96f Merge remote-tracking branch 'origin/topic/jazoff/avoid-redundant-inactivity-timers'
- Changed the logic significantly to just guarantee there's only ever a
  single inactivity timer per connection

- Updated language.expire_subnet btest which is unduly sensitive to
  timer-related changes

* origin/topic/jazoff/avoid-redundant-inactivity-timers:
  avoid scheduling redundant inactivity timers
2020-05-04 17:12:36 -07:00
Jon Siwek
a2f2f7a0dd Prevent IP fragment reassembly on packets without minimal IP header
The IP fragment reassembly process assumes a packet contains at least
the minimum IP header, but such a check did not previously occur,
resulting in a heap buffer over-read.  For example, a self-reported
IPv4 IHL field with a value less than minimum IPv4 header length of
20 bytes.  Such packets likely aren't routable on their own, but one
can create an artifical pcap like that or possibly encapsulate it
within another protocol to trigger this bug.
2020-05-04 12:41:53 -07:00
V
45a5b1b0cf Remove dupplicate DCE-RPC endpoint 2020-05-04 18:02:04 +02:00
V
7cf8c7a6d2 Add DCE-RPC constants from BZAR project 2020-05-04 17:15:27 +02:00
Jan Grashoefer
0c47b6098b Fix documentation for network_time_init. 2020-05-02 18:29:19 +02:00
Jon Siwek
1fe5454603 Merge remote-tracking branch 'origin/topic/jsiwek/ci-libmaxminddb'
* origin/topic/jsiwek/ci-libmaxminddb:
  Extend CI config to cover building with libmaxminddb support
2020-05-01 17:46:43 -07:00
Jon Siwek
8c4e9d05bd Merge remote-tracking branch 'origin/topic/timw/packet-source-suspension'
* origin/topic/timw/packet-source-suspension:
  Ensure time continues moving forward if a pcap source is suspended
2020-05-01 17:44:58 -07:00
Jon Siwek
d449682ff0 Add missing include to standalone fuzzer driver 2020-05-01 13:47:36 -07:00
Tim Wojtulewicz
2c8d0f60da Ensure time continues moving forward if a pcap source is suspended 2020-05-01 12:36:57 -07:00
Tim Wojtulewicz
5377dd446d Merge remote-tracking branch 'origin/topic/jsiwek/gh-938-pcap-source-always-ready'
* origin/topic/jsiwek/gh-938-pcap-source-always-ready:
  GH-938: fix IO loop iterations sometimes skipping offline pcap sources
2020-05-01 09:45:00 -07:00
Justin Azoff
751ea5edd7 avoid scheduling redundant inactivity timers
When setting the inactivity timeout, don't schedule a new timer if the
new one would be redundant.
2020-05-01 09:36:50 -04:00
Jon Siwek
c94638a9aa Update submodule(s)
[nomail]
2020-04-30 18:30:51 -07:00
Jon Siwek
009c1488fc Update submodule(s)
[nomail]
2020-04-30 16:41:05 -07:00
Jon Siwek
1b190906c7 GH-938: fix IO loop iterations sometimes skipping offline pcap sources 2020-04-30 16:19:30 -07:00
Tim Wojtulewicz
499a3353b5 Change timer_list in BroList to be an unordered list.
This type is used by Conn and Analyzer to hold onto timers being added and removed. We
don't expect the elements in those lists to maintain an order as the list is being
modified.
2020-04-30 15:23:48 -07:00
Tim Wojtulewicz
28e5100842 Add ability for List to be ordered/unordered
This fixes a "bug" with List where remove_nth() can be an O(n) operation when it doesn't
need to be. remove_nth for lists that don't necessarily need to keep an order can be an
O(1) operation instead.
2020-04-30 15:23:48 -07:00
Tim Wojtulewicz
0558a7bfed Add unit testing for List 2020-04-30 15:23:48 -07:00
Tim Wojtulewicz
615f8cd443 Fix bug with List where replace() doesn't work with non-pointer types 2020-04-30 15:23:48 -07:00
Jon Siwek
787ebd369e Improve standalone fuzzer driver error messages 2020-04-30 13:43:57 -07:00
Johanna Amann
3bce313b12 Switch file UID hashing from md5 to highwayhash.
This commit switches UID hashing from md5 to a highway hash. It also
moves the salt value out of the file plugin - and makes it
installation-specific instead - it is moved to the global namespace.

There now are digest hash functions to make "static"
installation-specific hashes that are stable over workers available to
everyone; hashes can be 64, 128 or 256 bits in size.

Due to the fact that we switch the file hashing algorithm, all file
hashes change.

The underlyigng algorithm that is used for hashing is highwayhash-128,
which is significantly faster than md5.
2020-04-30 10:20:09 -07:00
Jon Siwek
fda9498276 Merge remote-tracking branch 'origin/topic/seth/more-file-type-ident'
* origin/topic/seth/more-file-type-ident:
  Adds a note in NEWS about the signature addition and restructuring
  Fixes a small bug in one signature with a duplicate name.
  Organized and added to the shipped file identification signatures.
2020-04-29 16:32:41 -07:00
Johanna Amann
bc546634d1 Switch most internal md5 calls to digest calls.
The places that used md5 basically already used it as a digest
algorithm. Switching to a digest just means that the internal values
used to not change between runs - which is actually wanted in these
cases.

This commit also removes our special cmake subdirectory. We don't expose
highwayhash in headers anymore - so we can just treat it as an internal
implementation choice that is not directly exposed to plugins.
2020-04-29 16:05:31 -07:00
Jon Siwek
ccdaf5f111 Merge branch 'stats-logging-fix' of https://github.com/brittanydonowho/zeek
- Added test case and adjusted whitespace in merge

* 'stats-logging-fix' of https://github.com/brittanydonowho/zeek:
  Fixed stats.zeek to log all data before zeek terminates rather than return too soon
2020-04-29 15:58:35 -07:00
Jon Siwek
a08b1ff56f Add warning message for unknown Broker statuses
There's now a couple placeholder/unimplemented status values in Broker
related to upcoming routing features that we don't want to handle
explicitly for compatibility reasons, but also don't want the compiler
warning about unhandled values in the switch.
2020-04-29 15:28:18 -07:00