Commit graph

12374 commits

Author SHA1 Message Date
Christian Kreibich
8942da72b5 Merge branch 'topic/christian/gh-1626-remove-idmef'
* topic/christian/gh-1626-remove-idmef:
  Remove remaining vestigial IDMEF support code
2021-06-29 11:15:20 -07:00
Tim Wojtulewicz
19ba95b716 Merge remote-tracking branch 'origin/topic/vern/ZAM-prep'
* origin/topic/vern/ZAM-prep:
  made RecordVal::AppendField protected: it's low-level & requires knowledge of internals
2021-06-29 10:39:49 -07:00
Vern Paxson
d1334b7bca made RecordVal::AppendField protected: it's low-level & requires knowledge of internals 2021-06-29 10:24:20 -07:00
Tim Wojtulewicz
80f0b099b5 Update submodule(s) [nomail] 2021-06-29 08:43:52 -07:00
Tim Wojtulewicz
e454c886a7 Merge remote-tracking branch 'origin/topic/neverlord/ci'
* origin/topic/neverlord/ci:
  Fix package name for CMake on CentOS 8
2021-06-29 08:38:56 -07:00
Johanna Amann
93d7778f97 Small bugfix and updates for external test hashes (SSL/X509) 2021-06-29 15:25:08 +01:00
Johanna Amann
e4b2fa50a9 Merge remote-tracking branch 'origin/master' into topic/johanna/gh-859 2021-06-29 15:09:56 +01:00
Johanna Amann
6ac158dedd Baseline updates for recent SSL changes. 2021-06-29 15:03:03 +01:00
Johanna Amann
833168090a Add ability to check if hostname is valid for a specific cert
This commit adds two new bifs, x509_check_hostname and
x509_check_cert_hostname. These bifs can be used to check if a given
hostname which can, e.g., be sent in a SNI is valid for a specific
certificate.

This PR furthermore modifies the ssl logs again, and adds information
about this to the log-file. Furthermore we now by default remove the
server certificate information from ssl.log - I doubt that this is often
looked at, it is not present in TLS 1.3, we do still have the SNI, and
if you need it you have the information in x509.log.

This also fixes a small potential problem in X509.cc assuming there
might be SAN-entries that contain null-bytes.

Baseline update will follow in another commit.
2021-06-29 15:00:48 +01:00
Johanna Amann
5479ce607a Add ssl_history field to ssl.log
This is the equivalent to a connection history for SSL - and contains
information about which protocol messages were exchanged in which order.

Tests currently don't pass - I will update the ssl.log baselines after
doing another a bit invasive change that will change all the logs.
2021-06-29 14:10:02 +01:00
Dominik Charousset
6d79b2a7cc Fix package name for CMake on CentOS 8 2021-06-29 13:42:14 +02:00
Johanna Amann
e58b03a43f Add policy script suppressing certificate events
The added disable-certificate-events-known-certs.zeek disables repeated
X509 events in SSL connections, given that the connection terminates at
the same server and used the samt SNI as a previously seen connection
with the same certificate.

For people that see significant amounts of TLS 1.2 traffic, this could
reduce the amount of raised events significantly - especially when a
lot of connections are repeat connections to the same servers.

The practical impact of not raising these events is actually very little
- unless a script directly interacts with the x509 events, everything
works as before - the x509 variables in the connection records are still
being set (from the cache).
2021-06-29 11:39:18 +01:00
Johanna Amann
e310734d7b Add new ssl-log-ext policy script
This policy script significantly extends the details that are logged
about SSL/TLS handshakes.

I am a bit tempted to just make this part of the default log - but it
does add a bunch logging overhead for each connection.
2021-06-29 09:45:25 +01:00
Johanna Amann
279a060fae Deprecate extract-certs-pem.zeek and add log-certs-base64.zeek
Extract-certs-pem writes pem files to a dedicated file; since it does
not really work in cluster-environments it was never super helpful.

This commit deprecates this file and, instead, adds
log-certs-base64.zeek, which adds the base64-encoded certificate (which
is basically equivalent with a PEM) to the log-file. Since, nowadays,
the log-files are deduplicates this should not add a huge overhead.
2021-06-29 09:45:18 +01:00
Johanna Amann
dde1e2e77e Implement X509 certificate log caching
By default, each certificate is now output only once per hour. This also
should work in cluster mode, where we use the net broker-table-syncing
feature to distribute the information about already seen certificates
across the entire cluster.

Log caching is also pretty configureable and can be changed using a
range of confiuration options and hooks.

Note that this is currently completely separate from X509 events
caching, which prevents duplicate parsing of X509 certificates.
2021-06-29 09:41:40 +01:00
Johanna Amann
311e113ff6 Deprecate ICSI SSL notary script.
The ICSI notary is pretty much inactive. Furthermore - this approach
does no longer make much sense at this point of time - performing, e.g.,
signed certificate timestamp validation is much more worthwhile.
2021-06-29 09:34:29 +01:00
Johanna Amann
b02f22a667 Change SSL and X.509 logging format
This commit changes the SSL and X.509 logging formats to something that,
hopefully, slowly approaches what they will look like in the future.

X.509 log is not yet deduplicated; this will come in the future.

This commit introduces two new options, which determine if certificate
issuers and subjects are still logged in ssl.log. The default is to have
the host subject/issuer logged, but to remove client-certificate
information. Client-certificates are not a typically used feature
nowadays.
2021-06-29 09:26:43 +01:00
Johanna Amann
64ab1bbd47 Enable OCSP logging by default.
In the past I thought that this is not super interesting. However, it
turns out that this can actually contain a slew of interresting
information - like operating systems querying for the revocation of
software signing certificates, e.g.

So - let's just enable this as a default log for the future.
2021-06-29 09:26:29 +01:00
zeek-bot
d1e448ee2b Update doc submodule [nomail] [skip ci] 2021-06-29 00:33:27 +00:00
Vern Paxson
14d08116d1 Merge remote-tracking branch 'origin/master' into topic/vern/ZAM-prep 2021-06-28 16:20:12 -07:00
Christian Kreibich
712a28a813 Remove remaining vestigial IDMEF support code 2021-06-28 15:18:16 -07:00
Tim Wojtulewicz
72f576acd5 Merge remote-tracking branch 'origin/topic/timw/1216-enable-mobile-ipv6'
GH-1216: Enable Mobile IPv6 support by default (Tim Wojtulewicz, Corelight)

* origin/topic/timw/1216-enable-mobile-ipv6:
  GH-1216: Enable Mobile IPv6 support by default
2021-06-28 13:50:36 -07:00
Tim Wojtulewicz
b14cd1ef16 GH-1216: Enable Mobile IPv6 support by default
This removes the ENABLE_MOBILE_IPV6 #define variable. It also marks the
--enable-mobile-ipv6 configure argument as deprecated.
2021-06-28 11:11:55 -07:00
Tim Wojtulewicz
2e5d1d924f Merge remote-tracking branch 'origin/topic/timw/572-deprecate-memoryallocation'
* origin/topic/timw/572-deprecate-memoryallocation:
  GH-572: Mark MemoryAllocation() and related methods deprecated
2021-06-28 11:08:45 -07:00
Tim Wojtulewicz
a7fd34375f GH-572: Mark MemoryAllocation() and related methods deprecated 2021-06-28 11:07:58 -07:00
Tim Wojtulewicz
e6e41ac5d9 Merge remote-tracking branch 'origin/topic/timw/silly-coverity-fix'
* origin/topic/timw/silly-coverity-fix:
  Check for -1 return from FieldOffset() in Val::HasField()
2021-06-28 11:06:51 -07:00
Tim Wojtulewicz
98a9ae9572 Check for -1 return from FieldOffset() in Val::HasField()
Fixes Coverity 1457804
2021-06-28 11:06:16 -07:00
Tim Wojtulewicz
67b45bc502 Merge remote-tracking branch 'origin/topic/vern/ZAM-prep'
* origin/topic/vern/ZAM-prep: (45 commits)
  whoops overlooked the need to canonicalize filenames
  another set of tweaks per review comments
  addressed a number of code review comments
  baseline updates for merge
  support "any" coercions for "-O gen-C++"
  better descriptions for named record constructors
  test suite baseline updates for "-a opt" optimize-AST alternative
  test suite baseline updates for "-a xform" alternative / AST transformation
  error propagation fix for AST reduction
  updates to "-a inline" test suite alternative baseline
  updates for the main test suite baseline
  updates to test suite tests for compatibility with upcoming ZAM functionality
  "-O compile-all" option to specify compilation of inlined functions
  compile inlined functions if they're also used indirectly
  provide ZAM-generated code with low-level access to record fields
  fix for cloning records with fields of type "any"
  direct access for ZAM to VectorVal internal vector
  ZVal constructors, accessors & methods in support of ZAM
  switch ZVal representation of types from Type objects to TypeVal's
  revised error-reporting interface for ZVal's, to accommodate ZAM inner loop
  ...
2021-06-28 11:03:13 -07:00
Tim Wojtulewicz
4a674f50d7 Update submodule(s) [nomail] 2021-06-28 08:51:25 -07:00
Seth Hall
8b1259088f Update binpac pointer 2021-06-28 13:23:59 +00:00
Seth Hall
c946c4532a Update bifcl and binpac for building Zeek as a submodule 2021-06-28 13:15:04 +00:00
Tim Wojtulewicz
bea3a615b6 Merge remote-tracking branch 'origin/topic/christian/gh-1600'
* origin/topic/christian/gh-1600:
  Remove unnecessary -B arguments from Zeek invocations in testsuite
  Fix perftools-enabled build
  Minor tweaks to single-character command line option handling
2021-06-27 10:50:37 -07:00
Tim Wojtulewicz
c1b2989035 Merge remote-tracking branch 'htonl/weird_segfault'
* htonl/weird_segfault:
  Add btest test case
  Fix typo
  Fix segfault with incomplete connection
2021-06-27 10:46:30 -07:00
Luke Cesarz
70c9ae7de9 Add btest test case 2021-06-25 12:10:50 -07:00
Christian Kreibich
0b55c55140 Remove unnecessary -B arguments from Zeek invocations in testsuite
Now that Zeek no longer silently accepts -B when not compiled in debug
mode, these tests were failing.
2021-06-24 17:05:32 -07:00
Vern Paxson
50c21e8c07 made RecordVal::AppendField protected: it's low-level & requires knowledge of internals 2021-06-24 16:47:28 -07:00
Christian Kreibich
cd066f09bf Fix perftools-enabled build 2021-06-24 16:02:45 -07:00
Christian Kreibich
a2e5251796 Minor tweaks to single-character command line option handling
- Use of "-B" now triggers usage output and errors out when Zeek
  wasn't built with debugging support.

- Always keep the perftools options (-m, -M) in the optparse string,
  for consistency with other flags dependent on configuration. We
  still fall through to usage and erroring out as before.

- Minor indentation fix.
2021-06-24 16:02:45 -07:00
Seth Hall
e7f190fb6d Updated the cmake pointer 2021-06-24 17:06:36 +00:00
Seth Hall
9eb55a1da2 Merge remote-tracking branch 'origin/master' into topic/seth/subproject-build 2021-06-24 17:05:52 +00:00
Johanna Amann
b04c611058 Update submodule
[nomail]
2021-06-24 14:30:46 +01:00
Tim Wojtulewicz
b80eb6f05a Merge remote-tracking branch 'origin/topic/timw/test-catalina-build'
* origin/topic/timw/test-catalina-build:
  Call brew update-reset in ci/macos/prepare.sh
  GH-1368: Use --osx-sysroot for macOS CI builds
2021-06-23 13:54:13 -07:00
Tim Wojtulewicz
1a61771d2f Call brew update-reset in ci/macos/prepare.sh
This fixes some issues with the Catalina builds when it prepares the image
and the base Cirrus image has old recipes for Homebrew. The VM then has
to build a bunch of packages it shouldn't need to.
2021-06-23 13:09:23 -07:00
Tim Wojtulewicz
cbd4c5ebf9 GH-1368: Use --osx-sysroot for macOS CI builds 2021-06-23 13:09:00 -07:00
Seth Hall
6602b54d42 Fix the builtin plugin preload mechanism 2021-06-23 10:40:18 +00:00
Seth Hall
e9f8997029 Update submodule pointer for cmake to point at the appropriate branch 2021-06-23 10:34:25 +00:00
Seth Hall
d08230ef8c Switch to more accurate source and binary references in cmake
This is mostly involved with moving CMAKE_SOURCE_DIR and
CMAKE_BINARY_DIR to PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR because it
enables zeek to be built as a subproject of another.

There is another branch in the cmake repository with the same name that
is also required for this to fully work.
2021-06-23 10:26:17 +00:00
Seth Hall
adb8ee16cb Removed a non-functional builtin plugin preload loading mechanism 2021-06-23 10:19:20 +00:00
Seth Hall
0470b06537 Load the builtin-plugin preload files and fix the dev path. 2021-06-23 10:12:57 +00:00
Christian Kreibich
239ea51f22 Update submodules [nomail] 2021-06-22 14:14:55 -07:00