Commit graph

6667 commits

Author SHA1 Message Date
Jon Siwek
92739c1b44 Merge branch 'issues/152' of https://github.com/JonZeolla/bro into dev/2.7
* 'issues/152' of https://github.com/JonZeolla/bro:
  Bro plugins should support a patch version (x.y.z)
2018-10-03 14:32:10 -05:00
Jon Siwek
03e63be8ad Merge remote-tracking branch 'origin/master' into dev/2.7
* origin/master:
  Fix memory leak in broker type checking
  Update testing/btest/README
  Updating submodule(s).
  Updating submodule(s).
2018-10-03 13:29:54 -05:00
Jon Siwek
3c395aa22d Fix memory leak in broker type checking 2018-10-03 11:10:32 -05:00
Jon Zeolla
615ff78282 Bro plugins should support a patch version (x.y.z) 2018-09-30 20:30:22 -04:00
Jon Siwek
43aab5be7b Merge remote-tracking branch 'origin/master' into dev/2.7 2018-09-25 16:47:01 -05:00
Dominik Charousset
5e33942864 Fix BasicThread::SetOSName on FreeBSD 2018-09-22 08:09:27 +02:00
Jon Siwek
71ef5c8428 Merge branch 'fatemabw/bro' of https://github.com/fatemabw/bro into dev/2.7
* 'fatemabw/bro' of https://github.com/fatemabw/bro:
  DNSSEC support in Bro

I made several changes:

  - renamed event/record types
  - reformatted the info added to dns.log
  - removed the "addl" scripts that added extended dnssec info to dns.log
  - simplifications/improvements to the internal parsing logic
2018-09-21 16:40:41 -05:00
Jon Siwek
2ede95422b Emit missing GeoIP database errors only once at startup
Instead of one error per lookup.
2018-09-21 13:27:27 -05:00
Jon Siwek
d7097635f4 Fix compile error in MMDB GeoIP code
Seems to be from the ambiguity addressed via [1].  In C++11,
the compiler could treat it as an initializer list ctor instead
of a copy constructor for a single-element list.

[1] http://open-std.org/JTC1/SC22/WG21/docs/cwg_defects.html#1467
2018-09-21 10:22:03 -05:00
Daniel Thayer
096a7f4f5e Add a missing "break" in OSFinger.cc
This appears to be an error introduced when the original C code was
converted to C++.
2018-09-19 15:50:19 -05:00
Daniel Thayer
38ff76a176 Fix buffer sizes in the rotate_file function
The "tmpname" contains a longer string than "newname", so adjust sizes
accordingly.
2018-09-19 15:45:53 -05:00
Jon Siwek
c2b18849f8 Fix IRC names command parsing 2018-09-12 19:47:57 -05:00
Seth Hall
caab893fbe Fix an issue with raw reader culling streams for dead processes.
Input streams weren't being reaped when the raw reader was running
a subprocess and the subprocess died.  The subprocess would still
go away from Bro would never get rid of the input stream.
2018-09-11 11:21:31 -04:00
Jon Siwek
c89c09fda3 Fix invalid memory free when using Log::default_field_name_map 2018-09-10 19:06:35 -05:00
Jon Siwek
7e26bfe07f Fix recursive type checks/casts of broker data into type 'any' 2018-09-10 14:55:50 -05:00
Jon Siwek
3a824a06ed Fix is/as operators on vector values 2018-09-10 14:54:54 -05:00
Jon Siwek
4bd6da7186 Update default Broker/CAF thread tuning 2018-09-07 17:50:28 -05:00
Jon Siwek
b99be6458b Merge remote-tracking branch 'origin/topic/johanna/weird-options'
* origin/topic/johanna/weird-options:
  Update test baselines (weird options)
  Weird settings: make constants into options.
  Permit weird sampling rate of 0.
2018-09-05 16:57:08 -05:00
Jon Siwek
f896bec05a Merge remote-tracking branch 'origin/topic/robin/uint64-packet-stats'
* origin/topic/robin/uint64-packet-stats:
  Switch packet stats to uint64.
2018-09-05 16:24:04 -05:00
Robin Sommer
c8aa6f757e Switch packet stats to uint64. 2018-09-05 20:33:30 +00:00
Jon Siwek
f00e2167a7 BIT-1208: remove unused weirds from Weird::actions table 2018-09-05 15:13:38 -05:00
Johanna Amann
bec98b98f3 Weird settings: make constants into options.
The new weird settings are now all updateable during runtime.
2018-09-05 13:12:23 -07:00
Johanna Amann
5c68093bc3 Permit weird sampling rate of 0.
This change allows a weird sampling rate of 0, which completely suppresses
all notifications (previously this crashed Bro). If also fixes the sampling
threshold to work with sampling rates of 0.
2018-09-05 13:12:23 -07:00
Robin Sommer
e275927a64 Fix printf format specification for reporting packet stats.
We were using '%d' for unsigned integers, leading to output like this:

    1535403189.557168 -483803356 packets received on interface 0:1, 0 dropped
2018-09-05 19:32:15 +00:00
fatema
ff5c11975d DNSSEC support in Bro 2018-09-05 14:12:07 -04:00
Jon Siwek
dee22f6839 Updating submodule(s).
[nomail]
2018-09-04 10:50:20 -05:00
Jon Siwek
60d0343845 Clarify 'old_comm_usage_is_ok' error message 2018-09-04 09:26:12 -05:00
Jon Siwek
a467d0c92d Add @deprecated directive
It emits a warning stating that the script is deprecated.
2018-08-31 09:24:03 -05:00
Jon Siwek
7e6fc58ab4 Merge remote-tracking branch 'origin/topic/johanna/tls-more-data'
* origin/topic/johanna/tls-more-data:
  Update NEWS for ssl changes.
  SSL: test updates for record_layer version
  Final touches to SSL events with record layer version.
  Introduce ssl_plaintext_data event.
  Add record layer version to event ssl_encrypted_data.
  Add compression methods to ssl_client_hello event.
2018-08-30 09:48:25 -05:00
Robin Sommer
6de436f3f6 Merge remote-tracking branch 'origin/topic/jsiwek/bit-1967'
* origin/topic/jsiwek/bit-1967:
  Fix a routing loop in control framework
  Add Broker::forward() function
  Enable implicit Broker message forwarding by default
  Remove Cluster::broadcast_topic
  Remove Intel Broker topics, re-use existing Cluster topics
  Remove "relay" family of Broker functions
2018-08-30 00:08:12 +00:00
Jon Siwek
611c00a605 Merge remote-tracking branch 'origin/topic/johanna/bit-1976'
* origin/topic/johanna/bit-1976:
  Allow event/function definitions to be wrapped in directives.

Fixed to work with attributes (e.g. &priority).
2018-08-29 18:28:54 -05:00
Jon Siwek
01300f8706 Fix a unit test 2018-08-29 17:23:48 -05:00
Jon Siwek
0c9878f136 Fix strict-aliasing compiler warning 2018-08-29 17:18:56 -05:00
Jon Siwek
1dcead93bf Add Broker::forward() function
This enables explicit forwarding of events matching a given topic
prefix.  Even if a receiving node has an event handler, it will not
be raised if the event was sent along a topic that matches a previous
call to Broker::forward().
2018-08-28 19:42:22 -05:00
Johanna Amann
fb95a7750e Allow event/function definitions to be wrapped in directives.
This makes

@if (conditions)
event a(...)
@else
event b(...)
@endif

work, which threw an error in the past. This is useful when event
definition change in newer Bro version and code wants to accept both
kinds of events.
2018-08-28 16:00:34 -07:00
Johanna Amann
23eb8096fc SSL: test updates for record_layer version
Update the tests to also include the recently included record layer
fields.
2018-08-28 11:02:20 -07:00
Jon Siwek
1a75ef2abd Remove "relay" family of Broker functions
Namely these are now removed:

    - Broker::relay
    - Broker::publish_and_relay
    - Cluster::relay_rr
    - Cluster::relay_hrw

The idea being that Broker may eventually implement the necessary
routing (plus load balancing) functionality.  For now, code that used
these should "manually" handle and re-publish events as needed.
2018-08-27 16:49:35 -05:00
Johanna Amann
4b40b6ebe4 Merge remote-tracking branch 'origin/master' into topic/johanna/tls-more-data 2018-08-24 15:36:34 -07:00
Jon Siwek
f41f392743 Improve input framework re-read logic
Changed from checking for "has newer modification time" to "has
different modification time or inode number".
2018-08-24 12:46:31 -05:00
Jonathan Perkins
2b0e265a1f Detect MaxMind DB changes and auto-reload 2018-08-24 08:56:23 -05:00
Jon Siwek
af181474c1 BIT-1885: fix "kill" threading message
Now goes through the proper (main thread) channels to signal the
thread to stop.
2018-08-23 16:48:49 -05:00
Johanna Amann
b2a0418dc5 Final touches to SSL events with record layer version. 2018-08-23 14:18:38 -07:00
Jon Siwek
620cd671ba Fix tracking of DCE-RPC context identifier mappings
This adds previously-missing support for "Alter Context"
request/response PDUs (initial patch contributed by Mark Fernandez).

Also, context ID arguments were added to dce_rpc_bind, dce_rpc_request,
and dce_rpc_response in order to properly track what endpoint/operation
a given opnum maps to.
2018-08-23 15:11:38 -05:00
Jon Siwek
b847b3b4d9 BIT-1885: fix input framework memory leak
For input threads that get joined during run-time instead of being
signalled to stop at termination-time as typical (e.g. an error occurs
or process exits w/ non-zero status) messages could remain in the
thread's queue and leak.

This patches threads to ensure they enter the proper "finished"
state so that the thread manager can attempt to fully process and
empty out their queues before joining them.
2018-08-22 19:23:10 -05:00
Jon Siwek
553ce6aca1 Fix signed/unsigned comparison warning 2018-08-21 16:16:00 -05:00
Jon Siwek
b63f0e2675 Updating submodule(s).
[nomail]
2018-08-21 10:02:02 -05:00
Johanna Amann
aa2488fb69 Merge remote-tracking branch 'origin/master' into topic/johanna/tls-more-data 2018-08-20 16:10:21 -07:00
Jon Siwek
bcf97f70ea Merge remote-tracking branch 'origin/topic/jsiwek/empty-lines'
* origin/topic/jsiwek/empty-lines:
  Add 'smtp_excessive_pending_cmds' weird
  Fix SMTP command string comparisons
  Improve handling of empty lines in several text protocol analyzers
  Add rate-limiting sampling mechanism for weird events
  Teach timestamp canonifier about timestamps before ~2001
2018-08-20 15:35:16 -05:00
Jon Siwek
bd24421734 BIT-466: add redef += support to vectors 2018-08-17 15:16:15 -05:00
Johanna Amann
b1dbd757a6 Merge remote-tracking branch 'origin/master' into topic/johanna/tls-more-data 2018-08-17 11:52:00 -07:00