forked from zeek/zeek
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NEWS
2928 lines (2220 loc) · 118 KB
/
NEWS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
This document summarizes the most important changes in the current Zeek
release. For an exhaustive list of changes, see the ``CHANGES`` file
(note that submodules, such as Broker, come with their own ``CHANGES``.)
Zeek 3.0.0
==========
New Functionality
-----------------
- Added support for DNSSEC resource records RRSIG, DNSKEY, DS, NSEC, and NSEC3.
The associated events are:
- dns_RRSIG
- dns_DNSKEY
- dns_DS
- dns_NSEC
- dns_NSEC3
- Added support for parsing and logging DNS SPF resource records.
A new ``dns_SPF_reply`` event is also available.
- Zeek's Plugin framework now allows a patch version. If a patch version is not
provided, it will default to 0. To specify this, modify the plugin
Configuration class in your ``src/Plugin.cc`` and set
``config.version.patch``. Note that the default plugin skeleton
includes a unit test whose Baseline has the plugin version number in
it and that will now fail due to the version number now including a
patch number. For those that want to keep the unit test, simply adapt
the unit test/baseline to include the new plugin patch number.
- The default http.log not includes a field for the HTTP request Origin header.
- Support for decapsulating VXLAN tunnels.
- The for-loop syntax now allows for iterating over key-value pairs of tables.
Previously, a separate lookup within the loop was required to obtain the
value at a given index/key, but now this works::
local t: table[count] of string = table();
t[1] = "hello";
t[55] = "goodbye";
for ( key, value in t )
print key, value;
- Added options for controlling the source path/prefix for Input and
Intel framework files:
- InputAscii::path_prefix
- InputBinary::path_prefix
- Intel::path_prefix
- Support for NFLOG link-layer type.
- Support for some SMB 3.x features
- An ``smb2_transform_header`` event is raised after parsing
TRANSFORM_HEADER structures associated with encrypted messages.
- The ``SMB2::NegotiateResponse`` record now contains
``negotiate_context_count`` and ``negotiate_context_values`` fields
containing capability information found in an SMB 3.1.1 dialect's
negotiation message.
- Added a new hook, ``Intel::filter_item``, to assist in filtering and
removal of intelligence items that are about to be inserted.
- Add support for SMB filenames in the intel framework.
- Added a new event for weirdness found via file analysis: ``file_weird``.
- The conn.log "history" field supports a new character 'G' or 'g'
(capital for originator, lowercase responder) to indicate a content
gap in the TCP stream. These are recorded logarithmically.
- The ``ZEEK_DNS_RESOLVER`` environment variable now controls
the DNS resolver to use by setting it to an IPv4 or IPv6 address. If
not set, then the first IPv4 address from /etc/resolv.conf gets used.
- The ``/<re>/i`` convenience syntax for case-insensitive patterns is now
also allowed when specifying patterns used in signature files.
- New RDP functionality.
- New events:
- rdp_client_network_data
- rdp_client_security_data
- rdp_client_cluster_data
- rdp_native_encrypted_data
- Add a new "client_channels" field to rdp.log based on data parsed from
the Client Network Data (TS_UD_CS_NET) packet. The channel list is also
available in the new ``rdp_client_network_data`` event.
- Add parsing support for TLS 1.3 pre-shared key extension. This info
is available in the events: ``ssl_extension_pre_shared_key_client_hello``
and ``ssl_extension_pre_shared_key_server_hello``.
- Added/re-wrote support for NTP.
- Parsing support for modes 1-7, with parsed structures available in
the ``ntp_message`` event.
- An ntp.log is produced by default, containing data extracted from
NTP messages with modes 1-5.
- Add support for vector slicing operations. For example::
local v = vector(1, 2, 3, 4, 5);
v[2:4] = vector(6, 7, 8); # v is now [1, 2, 6, 7, 8, 5]
print v[:4]; # prints [1, 2, 6, 7]
- Add support for paraglob, a fairly quick data structure for matching a string
against a large list of patterns. For example::
local v1 = vector("*", "d?g", "*og", "d?", "d[!wl]g");
local p1 = paraglob_init(v1);
print paraglob_match(p1, "dog");
- An ``expire_func`` for a table with a multi-value-index will now unroll
the index and take one argument for each index value. For example, for a
``table[string,string] of count`` the expire function signature is:
function(t: table[string, string] of count, s: string, s2: string): interval
Changed Functionality
---------------------
- The following executable names have changed (the old names will
continue to work, but emit a deprecation warning):
- ``bro`` is now ``zeek``
- ``bro-config`` is now ``zeek-config``
- ``broctl`` is now ``zeekctl``
- ``bro-cut`` is now ``zeek-cut``
- BroControl has been completely renamed to ZeekControl. Many installation
directories and files with "broctl" in their name have been changed
to use "zeekctl" instead. It's expected this has been done in a way
that's backwards compatible with previous Bro installations. E.g.
if you made customizations to the ``broctl.cfg`` file of a previous
installation, installing the newer Zeek version over it will retain that
file and even symlink the new ``zeekctl.cfg`` to it.
- The default install prefix is now ``/usr/local/zeek`` instead of
``/usr/local/bro``. If you have an existing installation that used
the previous default and are still using the new default when upgrading,
we'll crate ``/usr/local/zeek`` as a symlink to ``/usr/local/bro``.
Certain subdirectories will also get similar treatment: ``share/bro``,
``include/bro``, and ``lib/bro``.
- ``$prefix/share/bro/site/local.bro`` has been renamed to
``local.zeek``. If you have a ``local.bro`` file from a previous
installation, possibly with customizations made to it, the new
version of Zeek will install a ``local.zeek`` file that is a symlink
to the pre-existing ``local.bro``. In that case, you may want to
just copy ``local.bro`` into the new ``local.zeek`` location to
avoid confusion, but things are otherwise meant to work properly
without intervention.
- All scripts ending in ``.bro`` that ship with the Zeek source tree have
been renamed to ``.zeek``.
- The search logic for the ``@load`` script directive now prefers files
ending in ``.zeek``, but will fallback to loading a ``.bro`` file if
it exists. E.g. ``@load foo`` will first check for a ``foo.zeek``
file to load and then otherwise ``foo.bro``. Note that
``@load foo.bro`` (with the explicit ``.bro`` file suffix) prefers
in the opposite order: it first checks for ``foo.bro`` and then
falls back to a ``foo.zeek``, if it exists.
- The for-loop index variable for vectors has been changed from
'int' to 'count' type. It's unlikely this would alter/break any
script behavior unless they were explicitly inspecting the variable's
type (and there's typically no reason to do that).
- The startup/initialization behavior has changed such that any errors
encountered while processing the ``bro_init()`` event will cause the
process to terminate rather than continue on the main run loop.
- The ``dns_state`` field within ``connection`` records has changed: the
``pending_queries`` and ``pending_replies`` fields are now ``&optional``,
and there is a new field ``pending_query`` that is populated before
``pending_queries``. If you have scripts that access the ``pending_queries``
or ``pending_replies`` fields, they will need to be updated.
This change was made to improve performance.
- The ternary operator ("<expr> ? <alt1> : <alt2>") now enforces that
if "<alt1>" and "<alt2>" are both records, they are of the same
type. It was always assumed that they were, but code might have
still worked even if not.
- The "orig_fuids", "orig_filenames", "orig_mime_types" http.log fields
as well as their "resp" counterparts are now limited to having
"HTTP::max_files_orig" or "HTTP::max_files_resp" entries, which are 15
by default. The limit can also be ignored case-by-case via the
"HTTP::max_files_policy" hook.
- The binpac library is now only compiled as a shared library by default.
To revert back to compiling only a static library, there's the
``--enable-static-binpac`` configure option.
- The Broker C++ API has some breaking changes, see it's own NEWS file for
details on how to migrate old code.
- Some Weirds associated with generic binpac parsing exceptions in analyzers
that didn't otherwise handle them (like syslog, modbus, dnp3) are now
a ProtocolViolation instead
- Weird names that contained variable content and may result in an unbounded
number of weird names have been renamed to remove the variable content
(which has been made available in the "addl" field of conn_weirds):
- "unknown_dce_rpc_auth_type_%d" -> unknown_dce_rpc_auth_type
- "gtp_invalid_info_element_%d" -> gtp_invalid_info_element
- "unknown_netbios_type:" 0x%x -> unknown_netbios_type
- "excess_netbios_hdr_len" (%d > %d) -> excess_netbios_hdr_len
- "deficit_netbios_hdr_len" (%d > %d) -> deficit_netbios_hdr_len
- "bad_RPC_program (%d)" -> bad_RPC_program
- "unknown_MOUNT_request(%u)" -> unknown_MOUNT_request
- "unknown_NFS_request(%u)" -> unknown_NFS_request
- "RPC resync: discard %d bytes\n" -> RPC_resync
- "RPC_message_too_long (%d64)" -> RPC_message_too_long
- "socks5_unsupported_authentication_method_%d" -> socks5_unsupported_authentication_method
- "socks5_unsupported_authentication_%d_%d" -> socks5_unsupported_authentication
- "ssh_unknown_kex_algorithm=%s" -> ssh_unknown_kex_algorithm
- "Encountered unknown type in server name ssl extension: %d" -> ssl_ext_unknown_server_name_type
- "UDP_datagram_length_mismatch(%d!=%d)" -> UDP_datagram_length_mismatch
- "OPENSSL Could not parse OCSP request (fuid %s)" -> openssl_ocsp_request_parse_error
- "OPENSSL Could not parse OCSP response (fuid %s)" -> openssl_ocsp_response_parse_error
- "Could not parse X509 certificate (fuid %s)" -> x509_cert_parse_error
- "Certificate with invalid BasicConstraint. fuid %s" -> x509_invalid_basic_constraint
- "Could not parse subject alternative names. fuid %s" -> x509_san_parse_error
- "DNS-field does not contain an IA5String. fuid %s" -> x509_san_non_string
- "Weird IP address length %d in subject alternative name. fuid %s" -> x509_san_ip_length
- "Could not parse time in X509 certificate (fuid %s) -- UTCTime has wrong length" -> x509_utc_length
- "Could not parse UTC time in non-YY-format in X509 certificate (x509 %s)" -> x509_utc_format
- "Could not parse time in X509 certificate (fuid %s) -- Generalized time has wrong length" -> x509_gen_time_length
- "Invalid time type in X509 certificate (fuid %s)" -> x509_invalid_time_type
- "Could not parse time in X509 certificate (fuid %s) -- additional char after time" -> x509_time_add_char
- "Could not parse time in X509 certificate (fuid %s) -- not enough bytes remaining for offset" -> x509_time_offset_underflow
- "Could not parse time in X509 certificate (fuid %s) -- unknown offset type" -> x509_time_offset_type
- "X509::GetExtensionFromBIO: %s" -> x509_get_ext_from_bio
- "unknown_mobility_type_%d" -> unknown_mobility_type
- "unknown_routing_type_%d" -> unknown_routing_type
- "unknown_protocol_%d" -> unknown_protocol
- "unknown_gre_version_%d" -> unknown_gre_version
- "unknown_gre_protocol_%u16" -> unknown_gre_protocol
- The "missed_bytes" field of conn.log can be calculated slightly differently
in some cases: ACKs that reveal a content gap, but also come at
the end of a connection (in a FIN or RST) are considered unreliable
and aren't counted as true gaps.
- The Broxygen component, which is used to generate our Doxygen-like
scripting API documentation has been renamed to Zeekygen. This likely has
no breaking or visible changes for most users, except in the case one
used it to generate their own documentation via the ``--broxygen`` flag,
which is now named ``--zeekygen``. Besides that, the various documentation
in scripts has also been updated to replace Sphinx cross-referencing roles
and directives like ":bro:see:" with ":zeek:see:".
- The catch-and-release and unified2 scripts are no longer loaded by
default. Because there was a performance impact simply from loading
them and it's unlikely a majority of user make use of their features,
they've been moved from the scripts/base/ directory into
scripts/policy/ and must be manually loaded to use their
functionality. The "drop" action for the notice framework is likewise
moved since it was implemented via catch-and-release. As a result,
the default notice.log no longer contains a "dropped" field.
If you previously used the catch-and-release functionality add this:
@load policy/frameworks/netcontrol/catch-and-release
If you previously used Notice::ACTION_DROP add:
@load policy/frameworks/notice/actions/drop
If you previously used the Unified2 file analysis support add:
@load policy/files/unified2
- The default value of ``peer_description`` has changed from "bro"
to "zeek". This won't effect most users, except for the fact that
this value may appear in several log files, so any external plugins
that have written unit tests that compare baselines of such log
files may need to be updated.
- The "remote_ip" field of "addr" type was removed from radius.log and
replaced with a field named "tunnel_client" of "string" type. The
reason for this is that the Tunnel-Client-Endpoint RADIUS attribute
this data is derived from may also be a FQDN, not just an IP address.
- The ``ssl_server_hello`` event's ``server_random`` parameter has been
changed to always include the full 32-byte field from the
ServerHello. Previously a 4-byte timestamp and 28-byte random data
were parsed separately as some TLS protocol versions specified a
separate timestamp field as part of the full 32-byte random sequence.
- The namespace used by all the builtin plugins that ship with Zeek have
changed to use "Zeek::" instead of "Bro::".
- Any Broker topic names used in scripts shipped with Zeek that
previously were prefixed with "bro/" are now prefixed with "zeek/"
instead.
In the case where external applications were using a "bro/" topic
to send data into a Bro process, a Zeek process still subscribes
to those topics in addition to the equivalently named "zeek/" topic.
In the case where external applications were using a "bro/" topic
to subscribe to remote messages or query data stores, there's no
backwards compatibility and external applications must be changed
to use the new "zeek/" topic. The thought is this change will have
low impact since most data published under "bro/" topic names is
intended for use only as a detail of implementing cluster-enabled
versions of various scripts.
A list of the most relevant/common topic names that could potentially
be used in external applications to consume/query remote data that
one may need to change:
- store names
- bro/known/services
- bro/known/hosts
- bro/known/certs
- cluster nodes
- bro/cluster/<node type>
- bro/cluster/node/<name>
- bro/cluster/nodeid/<id>
- logging
- bro/logs/<stream>
- The ``resp_ref`` argument was removed from the ``ocsp_response_bytes``
event. ``resp_ref`` was not used by anything in the codebase and could not be
passed to any other functions for further processing. The remainder of the
``ocsp_response_bytes`` is unchanged.
- For performance reasons, processing of notices is now always
performed by the node on which the notice is raised rather than
the centralized Manager node. This has potential incompatibilities
for those that relied on global state for notice policy processing.
It also introduces an expected race condition that may cause multiple
notices of the same kind that are generated within a short timespan
of each other on separate cluster nodes to all be logged rather
than suppressed and de-duplicated into a single notice.
- to_json is now a bif, no longer a script. Loading base/utils/json.zeek is no
longer necessary and has been deprecated. to_json should yield much better, always
valid json. There are some small differences in output; unnecessary spaces are removed
and port values are rendered differently, now including the port and the protocol.
- The output of the JSON logger now uses an external library to generate json. There
are small changes to the output; most visibly double numbers are now rounded slightly
differently. The way in which port values are rendered does _not_ change for JSON logs.
- The C++-layer List, Queue, and Dict types have changed from using macros to
templates as well as some other API changes.
- Range-based for-loops are now supported
- The loop_over_queue macro is now removed
- PList is now a template instead of a macro, so any "PList(T)" usages in
external code should now use "PList<T>"
- PDict is now a template instead of a macro, so any "PDict(T)" usages in
external code should now use "PDict<T>"
- Generally some methods used to assume containers were only using integer
or pointer types, so semantics may now be slightly different to
either avoid copying or unsafely returning arbitrary T types by value.
E.g. List::remove_nth and List::get can no longer return a "null" value
when the provided index is out of range, so they assert instead, and
Queue::pop methods do not return a value at all (one must check for
a non-empty container before removing an element).
- Google Perftools (tcmalloc) is no longer used by default on Linux
systems if it's found during the configuration process.
Use the --enable-perftools configuration flag to use tcmalloc.
The --disable-perftools flag is also no longer provided since
there's no longer any case in which tcmalloc will be used by default.
- There now is a maximum number of protocol violations that can be raised by an analyzer
before it is disabled; the default is set to 5. This behavior is customizable using
``DPD::max_violations`` and ``DPD::ignore_violations``.
Removed Functionality
---------------------
- A number of functions that were deprecated in version 2.6 or below and completely
removed from this release. Most of the functions were used for the old communication
code.
- ``find_ip_addresses``
- ``cat_string_array``
- ``cat_string_array_n``
- ``complete_handshake``
- ``connect``
- ``decode_base64_custom``
- ``disconnect``
- ``enable_communication``
- ``encode_base64_custom``
- ``get_event_peer``
- ``get_local_event_peer``
- ``join_string_array``
- ``listen``
- ``merge_pattern``
- ``request_remote_events``
- ``request_remote_logs``
- ``request_remote_sync``
- ``resume_state_updates``
- ``send_capture_filter``
- ``send_current_packet``
- ``send_id``
- ``send_ping``
- ``set_accept_state``
- ``set_compression_level``
- ``sort_string_array``
- ``split1``
- ``split_all``
- ``split``
- ``suspend_state_updates``
- ``terminate_communication``
- ``split``
- ``send_state``
- ``checkpoint_state``
- ``rescan_state``
- ``log_file_name``
- ``open_log_file``
- ``disable_print_hook``
- The following events were deprecated in version 2.6 or below and are completely
removed from this release:
- ``ssl_server_curve``
- ``dhcp_ack``
- ``dhcp_decline``
- ``dhcp_discover``
- ``dhcp_inform``
- ``dhcp_nak``
- ``dhcp_offer``
- ``dhcp_release``
- ``dhcp_request``
- ``remote_state_access_performed``
- ``remote_state_inconsistency``
- ``remote_connection_established``
- ``remote_connection_closed``
- ``remote_connection_handshake_done``
- ``remote_event_registered``
- ``remote_connection_error``
- ``remote_capture_filter``
- ``remote_log_peer``
- ``remote_log``
- ``finished_send_state``
- ``remote_pong``
- ``software_version_found``
- ``software_unparsed_version_found``
- ``software_parse_error``
- ``print_hook``
- ``interconn_stats``
- ``interconn_remove_conn``
- ``root_backdoor_signature_found``
- ``napster_signature_found``
- ``kazaa_signature_found``
- ``gaobot_signature_found``
- ``ftp_signature_found``
- ``gnutella_signature_found``
- ``http_signature_found``
- ``irc_signature_found``
- ``telnet_signature_found``
- ``ssh_signature_found``
- ``rlogin_signature_found``
- ``smtp_signature_found``
- ``http_proxy_signature_found``
- ``backdoor_stats``
- ``backdoor_remove_conn``
- ``dns_full_request``
- ``non_dns_request``
- The following types/records were deprecated in version 2.6 or below and are
removed from this release:
- ``peer_id``
- ``event_peer``
- ``packet``
- ``software``
- ``software_version``
- The following configuration options were deprecated in version 2.6 or below and are
removed from this release:
- ``max_remote_events_processed``
- ``forward_remote_events``
- ``forward_remote_state_changes``
- ``enable_syslog``
- ``remote_trace_sync_interval``
- ``remote_trace_sync_peers``
- ``remote_check_sync_consistency``
- ``log_rotate_interval``
- ``log_max_size``
- ``log_encryption_key``
- ``state_dir``
- ``state_write_delay``
- ``ssl_ca_certificate``
- ``ssl_private_key``
- ``ssl_passphrase``
- ``suppress_local_output``
- ``irc_servers``
- ``interconn_min_interarrival``
- ``interconn_max_interarrival``
- ``interconn_max_keystroke_pkt_size``
- ``interconn_default_pkt_size``
- ``interconn_stat_period``
- ``interconn_stat_backoff``
- ``interconn_endp_stats``
- ``backdoor_stat_period``
- ``backdoor_stat_backoff``
- ``backdoor_endp_stats``
- ``chunked_io_buffer_soft_cap``
- The following constants were used as part of deprecated functionality in version 2.6
or below and are removed from this release:
- ``PEER_ID_NONE``
- ``REMOTE_LOG_INFO``
- ``REMOTE_SRC_CHILD``
- ``REMOTE_SRC_PARENT``
- ``REMOTE_SRC_SCRIPT``
- The deprecated script ``policy/protocols/smb/__load__.bro`` was removed.
Instead of ``@load policy/protocols/smb`` use ``@load base/protocols/smb``.
- Broccoli, which had been deprecated in version 2.6 and was no longer built by default
was removed from the source tree.
- Support for the &persistent, &synchronized, &mergeable, &encrypt, &rotate_interval,
and &rotate_size attributes, which were deprecated in Bro 2.6, was removed. The ``-g``
command-line option (dump-config) which relied on this functionality was also removed.
- Functionality for writing state updates for variables with the
&synchronized attribute was removed. This entails the
``-x`` command-line option (print-state) as well as the
``capture_state_updates`` function.
- Removed the BroControl ``update`` command, which was deprecated in Bro 2.6.
- Functionality for writing/reading binary event streams was
removed. This functionality relied on the old communication code
anc was basically untested. The ``-R`` command-line option (replay)
as well as the ``capture_events`` function were removed.
- Removed p0f (passive OS fingerprinting) support. The version of
p0f shipped with zeek was ancient, probably did not give
any reliable support anymore and did not offer a clear
upgrade path. The ``OS_version_found`` event as well as the
``generate_OS_version_event`` configuration option were removed.
- Removed the ``max_files_in_cache`` option and the associated
"file caching" feature it's associated with. That feature allowed
one to open many scripting-layer ``file`` objects and potentially
bypass the operating system's resource limits for open files.
This is typically not necessary and it's a problem that is more
appropriately addressed at the system configuration level.
- Removed the InterConn analyzer.
- Removed the BackDoor analyzer.
- Removed ``List::sortedinsert`` from the C++ API.
Deprecated Functionality
------------------------
- The ``str_shell_escape`` function is now deprecated, use ``safe_shell_quote``
instead. The later will automatically return a value that is enclosed
in double-quotes.
- The ``bro_init``, ``bro_done``, and ``bro_script_loaded`` events are now
deprecated, use ``zeek_init``, ``zeek_done``, and
``zeek_script_loaded`` instead. Any existing event handlers for
the deprecated versions will automatically alias to the new events
such that existing code will not break, but will emit a deprecation
warning.
- The ``bro_is_terminating`` and ``bro_version`` function are deprecated and
replaced by functions named ``zeek_is_terminating`` and ``zeek_version``.
- The ``List::insert`` method from the C++ API is deprecated, use
``List::push_front`` instead.
Bro 2.6
=======
New Functionality
-----------------
- Bro has switched to using the new Broker library for all its
communication. Broker's API has been completely redesigned (compared
to the version in 2.5), and much of its implementation has been
redone. There's a new script-level "broker" framework that
supersedes the old "communication" framework, which is now
deprecated. All scripts that ship with Bro have been ported to use
Broker. BroControl has likewise been ported to use Broker.
For more about the new Broker framework, see
https://www.bro.org/sphinx-git/frameworks/broker.html. There's also
a guide there for porting existing Bro scripts to Broker. For more
about Broker itself, including its API for external applications,
see https://bro-broker.readthedocs.io/en/stable
When using BroControl, the function of proxies has changed with
Broker. If you are upgrading and have configured more than one proxy
currenty, we recommend going back down to a single proxy node now.
That should be fine unless you are using custom scripts doing
significant data distribution through the new cluster framework.
A side effect of the switch to using Broker is that each Bro node now runs
as a single process instead of two. Also, the number of file descriptors
being polled in Bro's main event loop has been reduced (1 per worker
versus 5). This should increase the number of workers one can
use before reaching the common 1024 file descriptor limitation of
"select()".
- Bro now has new "is" and "as" script operators for dynamic
type-checking and casting.
- "v as T" casts a value v into a value of type T, assuming that's
possible (if not, it triggers a runtime error).
- "v is T" returns a boolean indicating whether value v can be
casted into type T (i.e., if true then "v as T" will succeed).
This casting supports three cases currently: (1) a value of
declared type "any" can be casted to its actual underlying type;
(2) Broker values can be casted to their corresponding script
types; and (3) all values can be casted to their declared types
(i.e., a no-op).
Example for "any"::
# cat a.bro
function check(a: any)
{
local s: string = "default";
if ( a is string )
s = (a as string);
print fmt("s=%s", s);
}
event bro_init()
{
check("Foo");
check(1);
}
# bro a.bro
s=Foo
s=default
- The existing "switch" statement got extended to now also support switching by
type rather than value. The new syntax supports two type-based versions
of "case":
- "case type T: ...": Take branch if operand can be casted to type T.
- "case type T as x: ... ": Take branch if operand can be casted
to type T, and make the casted value available through ID "x".
Multiple types can be listed per branch, separated by commas.
However, one cannot mix cases with expressions and types inside a
single switch statement.
Example::
function switch_one(v: any)
{
switch (v) {
case type string:
print "It's a string!";
break;
case type count as c:
print "It's a count!", c;
break;
case type bool, type addr:
print "It's a bool or address!";
break;
default:
print "Something else!";
break;
}
}
- Bro now comes with a new "configuration framework" that allows
updating script options dynamically at runtime. This functionality
consists of three larger pieces working together:
- Option variables: The new "option" keyword allows variables to be
declared as runtime options. Such variables cannot be changed
using normal assignments. Instead, they can be changed using the
new function "Config::set_value". This function will automatically
apply the change to all nodes in a cluster. Note that options can also
be changed using the new function "Option::set", but this function will
not send the change to any other nodes, so Config::set_value should
typically be used instead of Option::set.
Various redef-able constants in the standard Bro scripts have
been converted to runtime options. This change will not affect any
user scripts because the initial value of runtime options can still be
redefined with a "redef" declaration. Example::
option testvar = "old value";
redef testvar = "new value";
It is possible to "subscribe" to an option through
"Option::set_change_handler", which will trigger a handler callback
when an option changes. Change handlers can optionally modify
values before they are applied by returning the desired value, or
reject updates by returning the old value. Priorities can be
specified if there are several handlers for one option.
Example script::
option testbool: bool = T;
function option_changed(ID: string, new_value: bool): bool
{
print fmt("Value of %s changed from %s to %s", ID, testbool, new_value);
return new_value;
}
event bro_init()
{
print "Old value", testbool;
Option::set_change_handler("testbool", option_changed);
Option::set("testbool", F);
print "New value", testbool;
}
- Script-level configuration framework: The new script framework
base/framework/config facilitates reading in new option values
from external files at runtime. The format for these files looks
like this::
[option name][tab/spaces][new variable value]
Configuration files to read can be specified by adding them to
"Config::config_files".
Usage example::
redef Config::config_files += { "/path/to/config.dat" };
module TestConfig;
export {
option testbool: bool = F;
}
The specified file will now be monitored continuously for changes, so
that writing "TestConfig::testbool T" into ``/path/to/config.dat`` will
automatically update the option's value accordingly.
The configuration framework creates a ``config.log`` that shows all
value changes that took place.
- Config reader: Internally, the configuration framework uses a new
type of input reader to read such configuration files into Bro.
The reader uses the option name to look up the type that variable
has, converts the read value to the correct type, and then updates
the option's value. Example script use::
type Idx: record {
option_name: string;
};
type Val: record {
option_val: string;
};
global currconfig: table[string] of string = table();
event InputConfig::new_value(name: string, source: string, id: string, value: any)
{
print id, value;
}
event bro_init()
{
Input::add_table([$reader=Input::READER_CONFIG, $source="../configfile", $name="configuration", $idx=Idx, $val=Val, $destination=currconfig, $want_record=F]);
}
- Support for OCSP and Signed Certificate Timestamp. This adds the
following events and BIFs:
- Events:
- ocsp_request
- ocsp_request_certificate
- ocsp_response_status
- ocsp_response_bytes
- ocsp_response_certificate
- ocsp_extension
- x509_ocsp_ext_signed_certificate_timestamp
- ssl_extension_signed_certificate_timestamp
- Functions:
- sct_verify
- x509_subject_name_hash
- x509_issuer_name_hash
- x509_spki_hash
- The SSL scripts provide a new hook "ssl_finishing(c: connection)"
to trigger actions after the handshake has concluded.
- New functionality has been added to the TLS parser, adding several
events. These events mostly extract information from the server and client
key exchange messages. The new events are:
- ssl_ecdh_server_params
- ssl_dh_server_params
- ssl_server_signature
- ssl_ecdh_client_params
- ssl_dh_client_params
- ssl_rsa_client_pms
Since "ssl_ecdh_server_params" contains more information than the old
"ssl_server_curve" event, "ssl_server_curve" is now marked as deprecated.
- The "ssl_application_data" event was retired and replaced with
"ssl_plaintext_data".
- Some SSL events were changed and now provide additional data. These events
are:
- ssl_client_hello
- ssl_server_hello
- ssl_encrypted_data
If you use these events, you can make your scripts work on old and new
versions of Bro by wrapping the event definition in an "@if", for example::
@if ( Version::at_least("2.6") || ( Version::number == 20500 && Version::info$commit >= 944 ) )
event ssl_client_hello(c: connection, version: count, record_version: count, possible_ts: time, client_random: string, session_id: string, ciphers: index_vec, comp_methods: index_vec)
@else
event ssl_client_hello(c: connection, version: count, possible_ts: time, client_random: string, session_id: string, ciphers: index_vec)
@endif
- Functions for retrieving files by their ID have been added:
- Files::file_exists
- Files::lookup_File
- New functions in the logging API:
- Log::get_filter_names
- Log::enable_stream
- HTTP now recognizes and skips upgraded/websocket connections. A new event,
"http_connection_upgrade", is raised in such cases.
- A new hook, HTTP::sqli_policy, may be used to whitelist requests that
could otherwise be counted as SQL injection attempts.
- Added a MOUNT3 protocol parser
- This is not enabled by default (no ports are registered and no
DPD signatures exist, so no connections will end up attaching the
new Mount analyzer). If it were to be activated by users, the
following events are available:
- mount_proc_null
- mount_proc_mnt
- mount_proc_umnt
- mount_proc_umnt_all
- mount_proc_not_implemented
- mount_reply_status
- Added new NFS events:
- nfs_proc_symlink
- nfs_proc_link
- nfs_proc_sattr
- The SMB scripts in ``policy/protocols/smb`` are now moved into
``base/protocols/smb`` and loaded/enabled by default. If you previously
loaded these scripts from their ``policy/`` location (in local.bro or
other custom scripts) you may now remove/change those although they
should still work since ``policy/protocols/smb`` is simply a placeholder
script that redirects to the new ``base/`` location.
- Added new SMB events:
- smb1_transaction_secondary_request
- smb1_transaction2_secondary_request
- smb1_transaction_response
- Bro can now decrypt Kerberos tickets, and retrieve the authentication from
them, given a suitable keytab file.
- Added support for bitwise operations on "count" values. '&', '|' and
'^' are binary "and", "or" and "xor" operators, and '~' is a unary
ones-complement operator.
- The '&' and '|' operators can apply to patterns, too. p1 & p2 yields
a pattern that represents matching p1 followed by p2, and p1 | p2 yields
a pattern representing matching p1 or p2. The p1 | p2 functionality was
semi-present in previous versions of Bro, but required constants as
its operands; now you can use any pattern-valued expressions.
- You can now specify that a pattern matches in a case-insensitive
fashion by adding 'i' to the end of its specification. So for example
/fOO/i == "Foo" yields T, as does /fOO/i in "xFoObar".
You can achieve the same functionality for a subpattern enclosed in
parentheses by adding "?i:" to the open parenthesis. So for example
/foo|(?i:bar)/ will match "BaR", but not "FoO".
For both ways of specifying case-insensitivity, characters enclosed in
double quotes remain case-sensitive. So for example /"foo"/i will not
match "Foo", but it will match "foo".
- "make install" now installs Bro's include headers (and more) into
"--prefix" so that compiling plugins no longer needs access to a
source/build tree. For OS distributions, this also facilitates
creating "bro-devel" packages providing all files necessary to build
plugins.
- Bro now supports PPPoE over QinQ.
- Bro now supports OpenSSL 1.1.
- The new connection/conn.log history character 'W' indicates that
the originator ('w' = responder) advertised a TCP zero window
(instructing the peer to not send any data until receiving a
non-zero window).
- The connection/conn.log history characters 'C' (checksum error seen),
'T' (retransmission seen), and 'W' (zero window advertised) are now
repeated in a logarithmic fashion upon seeing multiple instances
of the corresponding behavior. Thus a connection with 2 C's in its
history means that the originator sent >= 10 packets with checksum
errors; 3 C's means >= 100, etc.
- The above connection history behaviors occurring multiple times
(i.e., starting at 10 instances, than again for 100 instances,
etc.) generate corresponding events:
- tcp_multiple_checksum_errors
- udp_multiple_checksum_errors
- tcp_multiple_zero_windows
- tcp_multiple_retransmissions
Each has the same form, e.g.::
event tcp_multiple_retransmissions(c: connection, is_orig: bool,
threshold: count);
- Added support for set union, intersection, difference, and comparison
operations. The corresponding operators for the first three are
"s1 | s2", "s1 & s2", and "s1 - s2". Relationals are in terms
of subsets, so "s1 < s2" yields true if s1 is a proper subset of s2
and "s1 == s2" if the two sets have exactly the same elements.
"s1 <= s2" holds for subsets or equality, and similarly "s1 != s2",
"s1 > s2", and "s1 >= s2" have the expected meanings in terms
of non-equality, proper superset, and superset-or-equal.
- An expression of the form "v += e" will append the value of the expression
"e" to the end of the vector "v" (of course assuming type-compatibility).
"redef v += { a, b, c }" will similarly extend a vector previously declared
with &redef by appending the result of expressions "a", "b", and "c" to
the vector at initialization-time.
- A new "@deprecated" directive was added. It marks a script-file as
deprecated.
Changed Functionality
---------------------
- All communication is now handled through Broker, requiring changes
to existing scripts to port them over to the new API. The Broker
framework documentation comes with a porting guide.
- The DHCP analyzer and its script-layer interface have been rewritten.