Commit graph

13262 commits

Author SHA1 Message Date
Johanna Amann
8972676e92 GH-1634: Address feedback
This commit addreses feedback for GH-1643, changing typos and renaming
one of the fields in x509.log.
2021-07-02 15:12:58 +01:00
Johanna Amann
2cee2a7fa0 Update submodule
[nomail]
2021-07-02 13:06:35 +01:00
Johanna Amann
6eff0594f3 Merge remote-tracking branch 'origin/topic/johanna/undate-cert-stuff'
* origin/topic/johanna/undate-cert-stuff:
  Update Mozilla CA list and CT anchors.
2021-07-02 13:05:04 +01:00
Johanna Amann
a6144c521e Update submodule
[nomail]
2021-07-02 12:59:38 +01:00
Dominik Charousset
fbd95973b4 Update Broker submodule 2021-07-02 13:17:56 +02:00
Christian Kreibich
63259ef9fa Use mallinfo2() instead of mallinfo() when available
glibc 2.33 deprecates mallinfo in favor of a struct that returns
its members as size_ts instead of ints.
2021-07-01 16:40:28 -07:00
Tim Wojtulewicz
727fca26e3 Minor NEWS formatting fixes 2021-07-01 09:24:55 -07:00
Tim Wojtulewicz
0b342b7bfa Merge remote-tracking branch 'origin/topic/vern/CPP-workflow2'
* origin/topic/vern/CPP-workflow2:
  low-level coding style fixes
  support for standalone compiled scripts to export globals with module qualifiers
  updates for documentation of functionality for compiling scripts to C++
  fixes for standalone C++ scripts making types & variables/functions available
  fixed bug limiting availability of load_CPP() BiF
  updates to development helper scripts to support new workflow
  simpler workflow for -O gen-C++ ; also some hooks for -O gen-standalone-C++
  ReplaceBody now deletes a body if the replacement is nil
  removal of can't-actually-be-executed code
2021-07-01 08:46:53 -07:00
Christian Kreibich
181063634d Merge branch 'topic/christian/input-framework-unset-field-fix'
* topic/christian/input-framework-unset-field-fix:
  Update NEWS [skip ci]
  Skip input framework entries with missing but non-optional fields
  Fix segfault in input framework when reading unset fields
2021-06-30 20:33:51 -07:00
Christian Kreibich
16e04cb53e Update NEWS [skip ci] 2021-06-30 20:32:08 -07:00
Christian Kreibich
937bdccab5 Skip input framework entries with missing but non-optional fields
The framework so far populated data structures with missing fields
even when those fields are defined without the &optional
attribute. When using the attribute, such entries continue to get
populated.

Update tests to reflect focus on unset fields.
2021-06-30 20:02:26 -07:00
Christian Kreibich
ef08605877 Fix segfault in input framework when reading unset fields
Unset fields could trigger unexpected null pointers in the input
manager. This also adds a warning such fields come up.
2021-06-30 20:02:25 -07:00
zeek-bot
38d4907903 Update doc submodule [nomail] [skip ci] 2021-07-01 00:36:49 +00:00
Tim Wojtulewicz
3c0bb8f1dd Merge remote-tracking branch 'origin/topic/seth/small-builtin-plugin-fixes'
* origin/topic/seth/small-builtin-plugin-fixes:
  Fix tests
  Removed a non-functional builtin plugin preload loading mechanism
  Load the builtin-plugin preload files and fix the dev path.
2021-06-30 14:11:10 -07:00
Seth Hall
6c66f6ede5 Fix tests 2021-06-30 19:22:19 +00:00
Seth Hall
c118d1c2f4 Removing a fix from another branch 2021-06-30 17:46:41 +00:00
Tim Wojtulewicz
83fcf23f16 Merge remote-tracking branch 'origin/topic/timw/1500-thread-sanitizer'
* origin/topic/timw/1500-thread-sanitizer:
  GH-1500: Mark BasicThread::Done to be ignored by ThreadSanitizer
2021-06-30 08:50:51 -07:00
Tim Wojtulewicz
0c8a594d6f GH-1500: Mark BasicThread::Done to be ignored by ThreadSanitizer
There's a known false positive with the atomic variables in this method
that triggers a complaint from ThreadSanitizer. Marking it as ignored
avoids the warning.
2021-06-30 08:50:14 -07:00
Johanna Amann
6a6961b474 Small indentation fixes in ssl-log-ext.zeek 2021-06-30 15:16:49 +01:00
Johanna Amann
a193b08ecf Update Mozilla CA list and CT anchors.
This commit switches to only allowing the CT logs that are currently
accepted by Google Chrome - which makes much more sense for us since
this is (potentially) used for validation.

Additional CT logs can be added in user-scripts.
2021-06-30 15:14:22 +01:00
Johanna Amann
09229c58d7 Update submodule
This updates the bundled SQLite to 3.36.0.

 [nomail]
2021-06-30 13:19:19 +01:00
Johanna Amann
509b501e1b Merge remote-tracking branch 'origin/master' into topic/johanna/gh-859 2021-06-30 10:36:54 +01:00
Johanna Amann
4ad5d2031b Fix memory leak in x509_check_cert_hostname bif 2021-06-30 10:16:38 +01:00
Robin Sommer
40923fdd65 Merge remote-tracking branch 'origin/topic/robin/gh-1406-m1-tests'
* origin/topic/robin/gh-1406-m1-tests:
  Fix SMB tests on Apple M1.
2021-06-30 07:52:44 +02:00
Vern Paxson
30cb91fe35 low-level coding style fixes 2021-06-29 15:17:34 -07:00
Robin Sommer
369e42a6e4 Fix SMB tests on Apple M1.
Due to different double precision on M1, file IDs for SMB could end up
changing on M1 because the access time of a file goes into their
computation. The real solution for this would be changing Zeek's
internal "time" representation to uint64; that's planned, but requires
major surgery. For now, this PR changes the SMB code to also pass SMB's
original time representation (which is a uint64) into script-land, and
then use that for computing the file ID.

Closes #1406
2021-06-29 20:17:02 +02:00
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