Commit graph

7254 commits

Author SHA1 Message Date
Johanna Amann
30b40b214a Updating CHANGES and VERSION.
[nomail]
2016-08-02 15:32:00 -07:00
Johanna Amann
bac1bd5bdf Merge remote-tracking branch 'origin/topic/robin/bit-1641'
* origin/topic/robin/bit-1641:
  Fixing duplicate SSH authentication failure events.

I changed the test slightly; the output of uniq is not stable between
operating systems (on OS-X, it emits a space, on Linux it apparently
emits a tab). I removed the call to uniq - sort by itself is enough to
create a difference if there are duplicate entries.

Addresses BIT-1641
2016-08-02 15:28:31 -07:00
Johanna Amann
3112e9a343 Merge remote-tracking branch 'origin/topic/robin/bit-1654'
* origin/topic/robin/bit-1654:
  Removing OpenSSL dependency for plugins.
  Revert "Fix some failing plugin tests on OS X 10.11"

BIT-1654 #merged
2016-08-02 15:06:12 -07:00
Seth Hall
d6a7322a75 Merge branch 'topic/jgras/intel-update' of https://github.com/J-Gras/bro into topic/seth/intel-update-merge
# Conflicts:
#	testing/btest/Baseline/coverage.default-load-baseline/canonified_loaded_scripts.log
#	testing/btest/Baseline/scripts.policy.frameworks.intel.seen.certs/intel-all.log
2016-08-02 15:50:43 -04:00
Robin Sommer
3adad5e19a Fix some Coverity warnings. 2016-08-02 11:38:29 -07:00
Robin Sommer
a273143e7d Updating submodule(s).
[nomail]
2016-08-02 11:08:59 -07:00
Robin Sommer
4d446dc93c Merge branch 'patch-1' of https://github.com/moshekaplan/bro
* 'patch-1' of https://github.com/moshekaplan/bro:
  Added String slicing (subscript) examples
2016-08-02 11:05:59 -07:00
Moshe Kaplan
b1e47eb71f Added String slicing (subscript) examples 2016-08-02 08:45:23 -04:00
Robin Sommer
176d9f23be Fixing duplicate SSH authentication failure events.
We now do not raise more than one failure event per connection.

Addresses BIT-1641.
2016-08-01 12:42:03 -07:00
Robin Sommer
d7c10ca7c3 Removing OpenSSL dependency for plugins.
Compiling a plugin required having access to OpenSSL headers because
they were pulled in by Bro headers that the plugin had to include.
Removinng then OpenSSL dependency from those Bro headers.

I'm also reverting a4e5591e. This is a different fix for the same
problem, and reverting that commit gives us a test case. :-)
2016-08-01 12:32:27 -07:00
Robin Sommer
c3a43274e4 Revert "Fix some failing plugin tests on OS X 10.11"
This reverts commit a4e5591e18.
2016-08-01 09:22:40 -07:00
Robin Sommer
420bef58aa Fixing a CMake dependency issue for the pcap bifs.
ninja said:

    ninja: warning: multiple rules generate
    scripts/base/bif/const.bif.bro. builds involving this target will
    not be correct; continuing anyway [-w dupbuild=warn]

Looks like there's a larger problem here involving *.bif of the same
name at different locations of the source tree. For now, I'ved fixed
this one by merging src/iosource/pcap/{const,functions}.bif into
pcap.bif.
2016-08-01 09:20:54 -07:00
Robin Sommer
19d66be0aa Removing pkg/make-*-packages scripts.
We aren't using them anymore for the packages we distribute. Because
of that, they haven't been supported in a while, and have problems.

BIT-1509 #closed
2016-08-01 08:35:38 -07:00
Robin Sommer
3513cfc219 Merge remote-tracking branch 'origin/topic/johanna/bit-1644'
BIT-1644 #merged

* origin/topic/johanna/bit-1644:
  Correct endianness of IP addresses in SNMP.
2016-08-01 08:14:54 -07:00
Robin Sommer
dd06f8b290 Merge remote-tracking branch 'origin/topic/johanna/bit-1651'
BIT-1651 #merged

* origin/topic/johanna/bit-1651:
  Fix behavior of connection_pending event
2016-08-01 08:13:57 -07:00
Robin Sommer
1f8eb0bbc3 Updating submodule(s).
[nomail]
2016-08-01 07:57:41 -07:00
Robin Sommer
d04239f418 Updating submodule(s).
[nomail]
2016-08-01 07:57:10 -07:00
Johanna Amann
479ed5b67a Also retired remove -J/-K options (set md5/hash key) from the manpage. 2016-07-31 10:05:50 -04:00
Seth Hall
da7ec8064b Merge remote-tracking branch 'origin/master' into topic/seth/smb
# Conflicts:
#	testing/btest/Baseline/coverage.bare-load-baseline/canonified_loaded_scripts.log
#	testing/btest/Baseline/coverage.default-load-baseline/canonified_loaded_scripts.log
#	testing/btest/Baseline/plugins.hooks/output
#	testing/btest/Baseline/scripts.policy.misc.dump-events/all-events.log
#	testing/btest/Baseline/scripts.policy.misc.dump-events/smtp-events.log
2016-07-30 01:58:23 -04:00
Seth Hall
fee3af419b SMB cleanup. 2016-07-30 01:33:40 -04:00
Justin Azoff
f80f2f2a08 Track outstanding_global_views updates by uid
Currently outstanding_global_views values are only decremented during
the end of epoch cleanup, but not when handle_end_of_result_collection
is called for the specific uid that actually triggered the result
collection (which is specifically NOT a cleanup event).

This changes outstanding_global_views values to be a set of outstanding
uids, instead of a count.  This allows handle_end_of_result_collection
to remove any uids from the set as it sees them.
2016-07-29 12:54:20 -04:00
Justin Azoff
1f7f16be9d Also track recent_global_view_keys on manager
Previously, recent_global_view_keys was only tracked on workers causing
a popular key to be sent up and handled by the manager once for each
worker.

This records the key inside recent_global_view_keys on the manager after
the first update, making the rest of the updates no-ops.

Additionally, since the counter value was never used, it has been
changed from a table to a set.
2016-07-29 12:26:04 -04:00
Johanna Amann
4ad5d9073a NetControl: add catch and release event when IPs are forgotten.
This adds an event that is raised once Catch & Release ceases the
block management for an IP address because the IP has not been seen in
traffic during the watch interval.

This allows users who use their own logic on the top of catch and
release know when they will have to start re-blocking the IP if it
occurs in traffic again.
2016-07-28 16:28:07 -04:00
Seth Hall
44496922f1 Add rename and delete events for SMB2. 2016-07-28 08:55:15 -04:00
Seth Hall
059d031175 Remove a file that wasn't even being compiled 2016-07-27 05:33:03 -04:00
Seth Hall
71b135bd64 Merge branch 'topic/seth/smb' of ssh://git.bro-ids.org/bro into topic/seth/smb
# Conflicts:
#	src/analyzer/protocol/smb/SMB.cc
2016-07-27 03:57:53 -04:00
Seth Hall
ede0bad217 Simplify how packets go into the SMB analyzer.
There was a copy of every single packet being made as it entered
the SMB analyzer.  This was because the entire analyzer used to be
handwritten (only using binpac for unit parsing, not for parsing
the whole protocol).  Now that the entire parser is binpac we don't
need that layer of indirection anymore and we're able to remove
a lot of complexity.
2016-07-27 03:56:15 -04:00
Johanna Amann
93db6cd876 Fix behavior of connection_pending event
It is now really only raised when Bro is terminating. Also adds a
test-case that raises the event.
2016-07-26 15:49:51 -07:00
Robin Sommer
743e563dd9 Updating doc test baseline. 2016-07-26 15:06:23 -07:00
Johanna Amann
7603567782 Correct endianness of IP addresses in SNMP.
Addresses BIT-1644
2016-07-26 15:02:11 -07:00
Robin Sommer
5b73345b73 Merge remote-tracking branch 'origin/topic/johanna/bit-1181'
BIT-1181 #merged

* origin/topic/johanna/bit-1181:
  Input: Further small changes to error handling
  Add error events to input framework.
2016-07-26 14:52:27 -07:00
Robin Sommer
cc67acdcfe Merge remote-tracking branch 'origin/topic/johanna/bit-1325'
BIT-1325 #merged

* origin/topic/johanna/bit-1325:
  Enable SQLite shared cache mode.
2016-07-26 14:39:01 -07:00
Johanna Amann
51b8dee70b Adjust default priority of ACTION_DROP hook.
We use -5, just like all other normal notice framework actions.
2016-07-26 13:39:40 -07:00
Johanna Amann
4f51d6fc47 Fix types when constructing SYN_packet record.
The types used by the core did not match the types expected by the
scripting framework, leading, e.g., to trouble with the logging
framework.

Discovered and fixed by Grant Moyer.

Fixes BIT-1650
2016-07-26 11:51:26 -07:00
Johanna Amann
c8e1a39758 Input: Further small changes to error handling
Calling Error() in an input reader now automatically will disable the
reader and return a failure in the Update/Heartbeat calls.

Also adds more tests.

Addresses BIT-1181
2016-07-25 15:35:46 -07:00
Robin Sommer
f6ff7f1e66 Updating link in docs for deprecated plugin. 2016-07-23 07:29:32 -07:00
Robin Sommer
af834410f6 Updating submodule(s).
[nomail]
2016-07-23 07:26:15 -07:00
Robin Sommer
163ee380d3 Updating submodule(s).
[nomail]
2016-07-23 07:25:52 -07:00
Robin Sommer
5738398935 Updating submodule(s).
[nomail]
2016-07-23 07:20:55 -07:00
Johanna Amann
6b9abe85a7 Add error events to input framework.
This change introduces error events for Table and Event readers. Users
can now specify an event that is called when an info, warning, or error
is emitted by their input reader. This can, e.g., be used to raise
notices in case errors occur when reading an important input stream.

Example:

event error_event(desc: Input::TableDescription, msg: string, level: Reporter::Level)
	{
	...
	}

event bro_init()
	{
	Input::add_table([$source="a", $error_ev=error_event, ...]);
	}

For the moment, this converts all errors in the Asciiformatter into
warnings (to show that they are non-fatal) - the Reader itself also has
to throw an Error to show that a fatal error occurred and processing
will be abort.

It might be nicer to change this and require readers to mark fatal
errors as such when throwing them.

Addresses BIT-1181
2016-07-22 19:45:28 -07:00
Johanna Amann
bd4c32460b SQLite writer: Remove unused string formatting function. 2016-07-22 14:53:31 -07:00
Johanna Amann
4968a5c654 Enable SQLite shared cache mode.
This allows all threads accessing the same database to share sqlite
objects. This, for example, fixes the issue with several threads
simultaneously writing to the same database file.

See https://www.sqlite.org/sharedcache.html

Addresses BIT-1325
2016-07-21 12:10:20 -07:00
Johanna Amann
697b59cdc8 Update submodules
[nomail]
2016-07-21 11:50:39 -07:00
Daniel Thayer
59f0ea1a0c Add a test for starting a cluster with a logger node
Also modified cluster framework scripts so that any node can raise an
event to be handled on the logger node.
2016-07-15 15:23:49 -05:00
Robin Sommer
990f2ab0ea Merge branch 'topic/robin/bit-1612-merge' 2016-07-15 09:17:44 -07:00
Robin Sommer
647a18e433 Merge remote-tracking branch 'origin/topic/johanna/bit-1612' into topic/robin/bit-1612-merge 2016-07-15 09:03:11 -07:00
Daniel Thayer
88d066e921 Update broctl submodule 2016-07-15 00:23:18 -05:00
Johanna Amann
83b94331cd HLL: make large value test use signed integer, not counts. 2016-07-14 18:13:01 -07:00
Robin Sommer
4d84ee82da Merge remote-tracking branch 'origin/topic/johanna/bit-1612'
Addig a new random seed for external tests.

I added a wrapper around the siphash() function to make calling it a
little bit safer at least.

BIT-1612 #merged

* origin/topic/johanna/bit-1612:
  HLL: Fix missing typecast in test case.
  Remove the -K/-J options for setting keys.
  Add test checking the quality of HLL by adding a lot of elements.
  Fix serializing probabilistic hashers.
  Baseline updates after hash function change.
  Also switch BloomFilters from H3 to siphash.
  Change Hashing from H3 to Siphash.
  HLL: Remove unnecessary comparison.
  Hyperloglog: change calculation of Rho
2016-07-14 16:26:17 -07:00
Daniel Thayer
7491cbc327 Merge remote-tracking branch 'origin/master' into topic/dnthayer/ticket1627 2016-07-14 18:17:03 -05:00