Commit graph

7932 commits

Author SHA1 Message Date
Luke Valenta
6b21167d96 update documentation, fix whitespace errors, add certificate extraction to ssl-verbose script 2017-11-08 10:07:54 -05:00
Luke Valenta
de6883fa1c add verbose SSL logging output that includes cryptographic values 2017-11-07 23:19:30 -05:00
Daniel Thayer
6e89505d06 Fix ASCII logging of very large values of type "double"
Increased the size of a buffer to be large enough to contain all the
characters of the largest possible "double" value when scientific
notation is not being used (previously, the nonsensical "NAN.0" would be
written to ASCII logs for any value >= 1e248).
2017-11-06 14:01:07 -06:00
Justin Azoff
43b2b9806e add a max_line_length flag to ContentLine_Analyzer
In ContentLine_Analyzer, prevent excessively long lines being assembled.
The line length will default to just under 16MB, but can be overriden on
a per-analyzer basis.  This is done for the finger,ident, and irc
analyzers.
2017-11-03 16:25:26 -04:00
Daniel Thayer
aee307f02b Add more test cases to ascii-double.bro 2017-11-02 16:16:06 -05:00
Robin Sommer
b6e3603481 Merge branch 'topic/christian/doc-tweaks' of https://github.com/ckreibich/bro 2017-10-27 14:42:28 -07:00
Robin Sommer
5b88936070 Fix assignments to event arguments becoming visible to subsequent
handlers.

It's well known that changes to mutable event arguments, like tables,
become visible to all places where those values are used, including
subsequent handlers of the same event. However, there's a related case
that's more suprising: simply assigning *a new value* to an event
argument passes through, too. This commit fixes that behaviour. (We
even had a btest with a baseline reflecting the problen).
2017-10-27 13:28:48 -07:00
Johanna Amann
28498f752b Fix use-after-free in Trigger.cc
timeout_val is used _right_ after it is Unref'd.
2017-10-26 10:36:13 -07:00
Christian Kreibich
3accfabdfe Minor Bro docs tweaks for correctness and readability
- The protocol seemed to be missing from two frame inclusions, throwing an
  error message when viewing the page locally. Add "https:".

- Reduce whitespace around inline code blocks, where 2em seems really
  large.
2017-10-23 15:21:28 -07:00
Johanna Amann
924ed053c7 Fix OOB read in Sessions.cc
IP packets that have a header length that is greater than the total
length of the packet cause a integer overflow, which cause range-checks
to fail, which causes OOB reads.

Furthermore Bro does not currently check the version field of IP packets
that are read from tunnels. I added this check - otherwhise Bro reports
bogus IP information in its error messages, just converting the data
from the place where the IP information is supposed to be to IPs.

This behavior brings us closer to what other software (e.g. Wireshark)
displays in these cases.
2017-10-19 10:29:29 -07:00
Johanna Amann
9b59157d19 Updating CHANGES and VERSION. 2017-10-16 14:34:26 -07:00
Johanna Amann
6c0f101a62 Patch OOB write in content-line analyzer.
A combination of packets can trigger an out of bound write of '0' byte
in the content-line analyzer.

This bug was found by Frank Meier.

Addresses BIT-1856.
2017-10-16 13:13:41 -07:00
Robin Sommer
70456d9f6b Updating submodule(s).
[nomail]
2017-10-16 12:21:12 -07:00
jrolli
39a773c9ef Merge pull request #1 from juno0812/gssapi-krb-fix
modified GSSAPI analyzer to parse NTLM and KRB tokens
2017-10-12 08:13:01 -04:00
Justin Oursler
3d2ec29d04 removed check on kerberos request or response type. allow the kerberos analyzer to handle what it can, gssapi shouldn't check this 2017-10-11 14:18:58 -04:00
Justin Oursler
57bfbc02b1 modified GSSAPI analyzer to parse NTLM and KRB tokens 2017-10-11 13:42:54 -04:00
Johanna Amann
bcd5624f79 Merge remote-tracking branch 'origin/topic/vladg/bit-1838'
* origin/topic/vladg/bit-1838:
  Add btest for new SSH curve25519 KEX
  Updates the SSH analyzer to support the "curve25519-sha256" KEX.
2017-10-05 14:35:16 -07:00
Vlad Grigorescu
6cbcfbcd49 Merge remote-tracking branch 'origin/master' into topic/vladg/bit-1838 2017-10-05 14:36:45 -05:00
Vlad Grigorescu
d7fbaad024 Add btest for new SSH curve25519 KEX 2017-10-05 14:36:13 -05:00
Jon Siwek
76764fb135 Merge branch 'topic/corelight/script-debug-output' of https://github.com/corelight/bro
* 'topic/corelight/script-debug-output' of https://github.com/corelight/bro:
  Add -B scripts flag to allow debug output of script load order.
2017-10-03 12:02:27 -05:00
Jon Siwek
e7d3dd0818 Merge branch 'topic/corelight/eval-condition-crash' of https://github.com/corelight/bro
* 'topic/corelight/eval-condition-crash' of https://github.com/corelight/bro:
  Fix segmentation fault on eval condition with no return value.
2017-10-03 11:56:32 -05:00
Seth Hall
be08ae26b3 Merge remote-tracking branch 'origin/topic/jazoff/fix-intel-error' 2017-09-29 10:00:18 -04:00
Justin Azoff
fa88646eec problem: broctl can trigger intel reporter error
a broctl print triggers this error

    Reporter::ERROR    no such index (Cluster::nodes[Intel::p$descr])
    /usr/local/bro/share/bro/base/frameworks/intel/./cluster.bro, line 39

when broctl connects p$descr is empty.  It should probably be set to
'control' somewhere inside broctl, but that would only fix broctl, not
other clients.

diff --git a/aux/bro-aux b/aux/bro-aux
index 02f710a43..43f4b90bb 160000
--- a/aux/bro-aux
+++ b/aux/bro-aux
@@ -1 +1 @@
-Subproject commit 02f710a436dfe285bae0d48d7f7bc498783e11a8
+Subproject commit 43f4b90bbaf87dae1a1073e7bf13301e58866011
diff --git a/aux/broctl b/aux/broctl
index e960be2c1..d3e6cdfba 160000
--- a/aux/broctl
+++ b/aux/broctl
@@ -1 +1 @@
-Subproject commit e960be2c192a02f1244ebca3ec31ca57d64e23dc
+Subproject commit d3e6cdfba496879bd55542c668ea959f524bd723
diff --git a/aux/btest b/aux/btest
index 2810ccee2..e638fc65a 160000
--- a/aux/btest
+++ b/aux/btest
@@ -1 +1 @@
-Subproject commit 2810ccee25f6f20be5cd241155f12d02a79d592a
+Subproject commit e638fc65aa12bd136594451b8c185a7a01ef3e9a
diff --git a/scripts/base/frameworks/intel/cluster.bro b/scripts/base/frameworks/intel/cluster.bro
index 820a5497a..e75bdd057 100644
--- a/scripts/base/frameworks/intel/cluster.bro
+++ b/scripts/base/frameworks/intel/cluster.bro
@@ -32,7 +32,7 @@ event remote_connection_handshake_done(p: event_peer)
 	{
 	# When a worker connects, send it the complete minimal data store.
 	# It will be kept up to date after this by the cluster_new_item event.
-	if ( Cluster::nodes[p$descr]$node_type == Cluster::WORKER )
+	if ( p$descr in Cluster::nodes && Cluster::nodes[p$descr]$node_type == Cluster::WORKER )
 		{
 		send_id(p, "Intel::min_data_store");
 		}
2017-09-28 09:34:38 -04:00
Robin Sommer
411144bcf5 Updating submodule(s).
[nomail]
2017-09-21 10:11:54 -07:00
Robin Sommer
ad6162ce44 Merge remote-tracking branch 'origin/topic/johanna/in-binary'
BIT-1845 #merged

* origin/topic/johanna/in-binary:
  Make "in" keyword work with binary data.
2017-09-21 10:00:32 -07:00
Robin Sommer
92746d3257 Merge remote-tracking branch 'origin/topic/johanna/tls13experiment'
Closes BIT-1843.

* origin/topic/johanna/tls13experiment:
  Add TLS 1.3 fix and testcase.
2017-09-21 09:43:15 -07:00
Johanna Amann
39a026c88d Merge remote-tracking branch 'origin/topic/jazoff/fix-gridftp'
* origin/topic/jazoff/fix-gridftp:
  problem: gridftp threshold is being applied to all connections
2017-09-21 09:15:57 -07:00
Justin Azoff
6b864d5dd2 problem: gridftp threshold is being applied to all connections
The bytes_threshold_crossed event in the gridftp analyzer is not first
checking to see if the connection passed the initial criteria.  This
causes the script to add the gridftp-data service to any connection that
crosses a threshold that is the same as or greater than the gridftp
size_threshold.
2017-09-21 10:50:26 -04:00
Jon Siwek
8403fd9f94 Updating CHANGES and VERSION. 2017-09-20 11:04:04 -05:00
Jon Siwek
4ec7d66468 Updating submodule(s).
[nomail]
2017-09-20 10:51:09 -05:00
Johanna Amann
ed678dd72c Add -B scripts flag to allow debug output of script load order.
This patch adds a "scripts" option to -B, when Bro is enabled with
--enable-debug. This option will output information about the scripts
that are loaded to debug.log, showing their exact load order.
2017-09-19 09:38:08 -07:00
Johanna Amann
5243a054ef Fix segmentation fault on eval condition with no return value.
Signatures using an eval-condition that had no return value caused a
segmentation fault. This fix just returns false in this case, as it is
done for an interpreter error.
2017-09-19 09:23:09 -07:00
Johanna Amann
fc33bf2014 Make strerror_r portable.
This uses the same code that broker already uses to determine if we use
the XSI or gnu version of strerror_r. Patch by Thomas Petersen.
2017-09-18 14:50:30 -07:00
Johanna Amann
2a873f5aed Prevent crash when calling bro -U [unwritable destination]
set_processing_status can be called before reporter is initialized or
after it is deleted. Work around by sending data to stderr instead.

Patch by Thomas Petersen.
2017-09-18 14:33:22 -07:00
Johanna Amann
c1f8e3baec Remove annoying error message from connsize bifs.
The connsize bifs used to output a reporter message when they could not
find the associated connection. This patch disables this message; it is
not useful and can happen during normal operation when trying to use
thresholding on short-lived connections. This case is still reported by
the boolean value that the respective functions return.
2017-09-18 14:07:12 -07:00
Johanna Amann
a4d25c8828 Make "in" keyword work with binary data.
This switches in from using strstr to use strnstr (implementation from
FreeBSD on systems which do not bring their own implementation).

It is especially likely that users come accross this when using the
DATA_EVENT analyzer with files that contain binary data - the test uses
exactly this case.
2017-09-18 12:12:38 -07:00
jrolli
45ee32db49 Added and verified correct test results 2017-09-17 21:25:59 +00:00
John E. Rollinson
9ad93a5077 Initial btest structure 2017-09-17 16:13:10 -04:00
John E. Rollinson
5afde3f0e5 Changes proposed in #104 2017-09-17 14:59:41 -04:00
Vlad Grigorescu
16f504e828 Merge remote-tracking branch 'origin/master' into topic/vladg/bit-1838 2017-09-15 20:34:41 -05:00
Vlad Grigorescu
7e374f8c3f Updates the SSH analyzer to support the "curve25519-sha256" KEX.
From the OpenSSH 7.4 changelog:

sshd(8), ssh(1): Support the "curve25519-sha256" key exchange
   method. This is identical to the currently-supported method named
   "curve25519-sha256@libssh.org".
2017-09-15 20:30:39 -05:00
Johanna Amann
6ffa99d67e Merge remote-tracking branch 'origin/topic/dnthayer/ticket1836'
* origin/topic/dnthayer/ticket1836:
  Add test to verify that log rotation works with gzipped logs
  Fix ascii writer to not discard a ".gz" file extension

BIT-1836 #close
2017-09-15 10:57:06 -07:00
Daniel Thayer
75647a448c Add test to verify that log rotation works with gzipped logs 2017-09-15 12:17:31 -05:00
Johanna Amann
1e66034862 Merge branch 'master' of https://github.com/amesbury/bro
* 'master' of https://github.com/amesbury/bro:
  Fixed typo
2017-09-12 16:29:36 -05:00
Johanna Amann
1a6b6f2586 Updating CHANGES and VERSION. 2017-09-11 21:02:07 -05:00
Johanna Amann
e1997144c2 Fix small OCSP parser bug.
It turns out that the serial number field in all events was never
populated correctly. Instead, the previous field (issuer key hash) was
re-read and repeated in all events.
2017-09-11 09:26:33 -07:00
Johanna Amann
1ede6bf7fe Add TLS 1.3 fix and testcase.
It turns out that Chrome supports an experimental mode to support TLS
1.3, which uses a non-standard way to negotiate TLS 1.3 with a server.
This non-standard way to negotiate TLS 1.3 breaks the current draft RFC
and re-uses an extension on the server-side with a different binary
formatting, causing us to throw a binpac exception.

This patch ignores the extension when sent by the server, continuing to
correctly parse the server_hello reply (as far as possible).

From what I can tell this seems to be google working around the fact
that MITM equipment cannot deal with TLS 1.3 server hellos; this change
makes the fact that TLS 1.3 is used completely opaque unless one looks
into a few extensions.

We currently log this as TLS 1.2.
2017-09-09 22:25:49 -07:00
Alan
8741d6323a Fixed typo 2017-08-28 14:20:37 -05:00
Daniel Thayer
823fba1713 Fix ascii writer to not discard a ".gz" file extension
When Bro writes a compressed log, it uses a file extension of ".gz".
However, upon log rotation the ascii writer script function
"default_rotation_postprocessor_func" was discarding the ".gz"
file extension.  Fixed so that the correct file extension is
preserved after rotation.
2017-08-25 15:39:12 -05:00
Robin Sommer
5efaaf1368 Merge remote-tracking branch 'origin/fastpath' 2017-08-15 16:58:17 -07:00