Commit graph

14939 commits

Author SHA1 Message Date
Christian Kreibich
ce4494d8d3 Given the -C flag, set script-layer ignore_checksums to true. 2023-04-24 21:19:05 -07:00
Christian Kreibich
1a1feec887 Add btest for "-C" flag vs the script-layer ignore_checksums global. 2023-04-24 21:19:05 -07:00
zeek-bot
cb9379b44d Update doc submodule [nomail] [skip ci] 2023-04-25 00:24:45 +00:00
Tim Wojtulewicz
5041efd8e7 Remove references to bro_broker in broker/Manager.h 2023-04-24 15:21:09 -07:00
Arne Welzel
1b69b4d26f Merge branch 'topic/amazingpp/irc-fuid-missing' of github.com:AmazingPP/zeek
* 'topic/amazingpp/irc-fuid-missing' of github.com:AmazingPP/zeek:
  Add irc_dcc_send_ack event and fix missing fields

I've moved IRC_Data back into the zeek::analyzer::file namespace, but
we did move the declaration from protocol/file/File.h to protocol/irc/IRC.h.
But, if someone actually customized IRC_Data and didn't include protocol/irc/IRC.h
for other reasons, I'll be surprised (and also just suggest to update the include).
2023-04-24 18:22:50 +02:00
Dominik Charousset
1715028986 Propagate zeek-version.h skip via CMake properties
Add a define for `ZEEK_CONFIG_SKIP_VERSION_H` to static plugins as well
as to dynamic plugins that we build alongside Zeek. When including
`zeek-config.h` with this macro defined, the header skips including
`zeek-version.h`.
2023-04-24 17:51:25 +02:00
Arne Welzel
9b1bfe63f4 Merge remote-tracking branch 'origin/topic/awelzel/replace-more-bro-plugin-install-path'
* origin/topic/awelzel/replace-more-bro-plugin-install-path:
  cmake: Fixup BRO_PLUGIN_INSTALL_PATH references
2023-04-24 14:36:53 +02:00
Arne Welzel
2891b8af44 cmake: Fixup BRO_PLUGIN_INSTALL_PATH references
Commit 19cbb328a9 removed setting of
BRO_PLUGIN_INSTALL_PATH in favor of ZEEK_PLUGIN_DIR. Replace left-over
references the former.
2023-04-24 12:15:37 +02:00
Arne Welzel
1b710d5534 Merge remote-tracking branch 'origin/topic/neverlord/plugin-dir'
* origin/topic/neverlord/plugin-dir:
  Fix install directory for plugins
2023-04-24 10:33:40 +02:00
Arne Welzel
ffb73e4de9 Merge remote-tracking branch 'origin/topic/awelzel/add-community-id'
* origin/topic/awelzel/add-community-id:
  testing/external: Bump hashes for community_id addition
  NEWS: Add entry for Community ID
  policy: Import zeek-community-id scripts into protocols/conn frameworks/notice
  Add community_id_v1() based on corelight/zeek-community-id
2023-04-24 10:12:56 +02:00
Arne Welzel
0bbd7cab1b testing/external: Bump hashes for community_id addition 2023-04-24 09:43:22 +02:00
Arne Welzel
547e1b6280 NEWS: Add entry for Community ID 2023-04-24 09:43:22 +02:00
Christian Kreibich
b90351b7e6 policy: Import zeek-community-id scripts into protocols/conn frameworks/notice
Slightly adapted for indentation.
2023-04-24 09:43:19 +02:00
Fupeng Zhao
161ffb4192 Add irc_dcc_send_ack event and fix missing fields 2023-04-24 07:29:51 +00:00
Arne Welzel
0b22f792a5 Merge remote-tracking branch 'origin/topic/awelzel/file-analysis-manager-runstate-include'
* origin/topic/awelzel/file-analysis-manager-runstate-include:
  file_analysis/Manager: Remove RunState.h include
2023-04-24 09:24:42 +02:00
Dominik Charousset
19cbb328a9 Fix install directory for plugins 2023-04-22 16:12:22 +02:00
zeek-bot
3f0eee5d9d Update doc submodule [nomail] [skip ci] 2023-04-22 00:22:52 +00:00
Christian Kreibich
4ab7ff262f Merge branch 'topic/jgras/cluster-init' of github.com:/J-Gras/zeek
* 'topic/jgras/cluster-init' of github.com:/J-Gras/zeek:
  Update NEWS to cover cluster framework changes.
  Add cluster_started restart tests.
  Add basic cluster_started tests.
  Add cluster_started and node_fully_connected events.
  Add hook into cluster connection setup.
  Add broadcast_topics set.
  Generalize Cluster::worker_count.
2023-04-21 14:05:19 -07:00
Christian Kreibich
99de7b7526 Add community_id_v1() based on corelight/zeek-community-id
"Community ID" has become an established flow hash for connection correlation
across different monitoring and storage systems. Other NSMs have had native
and built-in support for Community ID since late 2018. And even though the
roots of "Community ID" are very close to Zeek, Zeek itself has never provided
out-of-the-box support and instead required users to install an external plugin.

While we try to make that installation as easy as possible, an external plugin
always sets the bar higher for an initial setup and can be intimidating.
It also requires a rebuild operation of the plugin during upgrades. Nothing
overly complicated, but somewhat unnecessary for such popular functionality.

This isn't a 1:1 import. The options are parameters and the "verbose"
functionality  has been removed. Further, instead of a `connection`
record, the new bif works with `conn_id`, allowing computation of the
hash with little effort on the command line:

    $ zeek -e 'print community_id_v1([$orig_h=1.2.3.4, $orig_p=1024/tcp, $resp_h=5.6.7.8, $resp_p=80/tcp])'
    1:RcCrCS5fwYUeIzgDDx64EN3+okU

Reference: https://github.com/corelight/zeek-community-id/
2023-04-21 20:44:09 +02:00
Jan Grashoefer
2cf16ccf81 Update NEWS to cover cluster framework changes. 2023-04-21 19:04:52 +02:00
Jan Grashoefer
893d31e1aa Add cluster_started restart tests. 2023-04-21 19:04:52 +02:00
Jan Grashoefer
2dcca004d3 Add basic cluster_started tests. 2023-04-21 19:04:52 +02:00
Jan Grashoefer
0cd32ba07c Add cluster_started and node_fully_connected events. 2023-04-21 19:04:52 +02:00
Jan Grashoefer
88c86cc7d4 Add hook into cluster connection setup. 2023-04-21 19:04:52 +02:00
Jan Grashoefer
c7626d797f Add broadcast_topics set.
This set contains the topics to reach all cluster nodes. Due to broker's
forwarding mechanism, we cannot define a single broadcast topic, as it
would create routing loops.
2023-04-21 19:04:52 +02:00
Jan Grashoefer
3db8bb4a44 Generalize Cluster::worker_count. 2023-04-21 19:04:39 +02:00
Christian Kreibich
379624404c Merge branch 'topic/christian/news-edits'
* topic/christian/news-edits:
  Edit pass over the current 6.0 NEWS entries. [nomail] [skip ci]
2023-04-20 16:04:18 -07:00
Christian Kreibich
1c047786b4 Edit pass over the current 6.0 NEWS entries. [nomail] [skip ci] 2023-04-20 15:59:52 -07:00
zeek-bot
32926e8def Update doc submodule [nomail] [skip ci] 2023-04-20 00:34:37 +00:00
Arne Welzel
ba085630b3 Merge remote-tracking branch 'origin/topic/awelzel/2935-publish-hrw-rr-type-check'
* origin/topic/awelzel/2935-publish-hrw-rr-type-check:
  zeek.bif: Remove cat_sep() fully var_arg changes
  broker/messaging: Runtime type checks for pool
  bifcl: Bump for runtime-type checks in var_arg bifs
2023-04-19 20:05:41 +02:00
Arne Welzel
10dc1c4bc2 zeek.bif: Remove cat_sep() fully var_arg changes
These were introduced to better catch type violations at runtime. With
bifcl doing these checks, revert to a better documented version.
2023-04-19 19:30:46 +02:00
Arne Welzel
f44279cc3e broker/messaging: Runtime type checks for pool
publish_hrw() and publish_rr() are excluded from type checking due to their
variadic nature. Passing a wrong type for the pool argument previously triggered
an abort, now the result is runtime errors. This isn't great, but it's
better than crashing Zeek.

Closes #2935
2023-04-19 19:30:46 +02:00
Arne Welzel
5aae4381d7 bifcl: Bump for runtime-type checks in var_arg bifs 2023-04-19 19:30:41 +02:00
Tim Wojtulewicz
71109a13f8 Merge remote-tracking branch 'origin/topic/timw/2485-script-profile-call-stacks'
* origin/topic/timw/2485-script-profile-call-stacks:
  Add call stacks to script profiler output
2023-04-19 09:15:15 -07:00
Tim Wojtulewicz
4b69baa522 Add call stacks to script profiler output 2023-04-19 08:45:17 -07:00
Arne Welzel
ed169b537c file_analysis/Manager: Remove RunState.h include
The file_analysis/Manager.h header only needs run_state::terminating, so
declare just that similar to what Val.h does. This breaks ZBody compilation
due to OP_READING_LIVE_TRAFFIC_V and OP_READING_TRACES_V accessing
run-state::reading_live and run_state::reading_traces. Add the include to
ZBody.cc as a fix.

This may break external plugins, too, but then they didn't have the
right includes setup to begin with.
2023-04-19 15:53:33 +02:00
Arne Welzel
89c828ac14 Merge remote-tracking branch 'origin/topic/vern/record-optimizations.Apr23B'
* origin/topic/vern/record-optimizations.Apr23B:
  different fix for MSVC compiler issues
  more general approach for addressing MSVC compiler issues with IntrusivePtr
  restored RecordType::Create, now marked as deprecated tidying of namespaces and private class members simplification of flagging record field initializations that should be skipped address peculiar MSVC compilation complaint for IntrusivePtr's
  clarifications and tidying for record field initializations
  optimize record construction by deferring initializations of aggregates
  compile-scripts-to-C++ speedups by switching to raw record access
  logging speedup by switching to raw record access
  remove redundant record coercions

Removed the `#if 0` hunk during merging: Probably could have gone with a
doctest instead.
2023-04-19 11:59:56 +02:00
Arne Welzel
683cb80f61 Merge remote-tracking branch 'origin/topic/neverlord/gh-2953'
* origin/topic/neverlord/gh-2953:
  Improve CMake variables, update cmake submodule
  Fix builds with plugins that use zeek-config

Bumped cmake and used update-changes with explicit -p because
it wasn't detecting the right commit to start with. Suspect
something went off with the last bump.
2023-04-19 10:14:33 +02:00
Vern Paxson
11dc4c8ce9 different fix for MSVC compiler issues 2023-04-18 17:12:52 -07:00
Vern Paxson
1f61afa56b more general approach for addressing MSVC compiler issues with IntrusivePtr 2023-04-18 15:48:22 -07:00
Dominik Charousset
12ea6ed478 Improve CMake variables, update cmake submodule 2023-04-18 21:17:33 +02:00
Tim Wojtulewicz
f222c15374 Merge remote-tracking branch 'origin/topic/awelzel/2885-log-caching-cluster-flaky'
* origin/topic/awelzel/2885-log-caching-cluster-flaky:
  log-caching-cluster: Wait for X509::known_log_certs to populate
2023-04-18 11:11:53 -07:00
Vern Paxson
c19eba62d6 restored RecordType::Create, now marked as deprecated
tidying of namespaces and private class members
simplification of flagging record field initializations that should be skipped
address peculiar MSVC compilation complaint for IntrusivePtr's
2023-04-18 09:41:45 -07:00
Arne Welzel
4bcf5f4b76 NEWS: Add entry for ZeekControl and multi-loggers 2023-04-18 15:41:46 +02:00
Arne Welzel
1b1d4c47c7 Bump zeekctl to multi-logger version 2023-04-18 15:41:36 +02:00
Arne Welzel
a9a37c865e log-caching-cluster: Wait for X509::known_log_certs to populate
The known_log_certs table is populated asynchronously via broker after a
Broker::peer_added. It may take a variable amount of time depending on where
we run this test and it has been observed flaky specifically for the
arm_debian11 task. Instead of racing, give worker-2 3 seconds for receiving
the expected table content before continuing.

Fixes #2885
2023-04-18 15:19:12 +02:00
Arne Welzel
d89f16dfc9 logging: Support rotation_postprocessor_command_env
This new table provides a mechanism to add environment variables to the
postprocessor execution. Use case is from ZeekControl to inject a suffix
to be used when running with multiple logger.
2023-04-17 13:10:14 +00:00
Vern Paxson
ee358affda clarifications and tidying for record field initializations 2023-04-15 20:12:49 -07:00
Dominik Charousset
1d81fb4fb0 Fix builds with plugins that use zeek-config
When building plugins externally with `zeek-config` (as opposed to using
`ZEEK_DIST`), they point into the install prefix. There, we add a new
file `ZeekPluginBootstrap.cmake` that helps `ZeekPlugin.cmake` to find
everything else it needs from there.

Our template for plugins generates a `configure` script that sets
various variables with values from `zeek-config`. We only need
`BROKER_ROOT_DIR` with the new bootstrapping logic. Everything else, we
can get from the new bootstrapping file and from the CMake package file
for Zeek.
2023-04-15 00:08:42 +02:00
Arne Welzel
75245bd365 Merge remote-tracking branch 'origin/topic/awelzel/javascript'
* origin/topic/awelzel/javascript:
  ci/debian-11: Install libnode-dev, too
  CMakeLists: Convert string append to list append
  Add experimental JavaScript support when libnode is available
2023-04-14 13:02:57 +02:00