Commit graph

6849 commits

Author SHA1 Message Date
Robin Sommer
4f9cb6912a Fix for a table refering to a expire function that's not defined.
I was hoping to report this right at startup through a static check
but turns out we don't have the right machinery in place for that.
That would need to be done after the AST has been finalized, but our
AST traversal code can't iterate over types. So instead I've changed
this so that it's still being reported at runtime but at least
doesn't crash Bro anymore.

Closes BIT-1597.
2016-05-23 12:48:34 -07:00
Robin Sommer
0fa9590902 Updating submodule(s).
[nomail]
2016-05-23 08:26:52 -07:00
Robin Sommer
50945a6359 Fixing a few Coverity warnings. 2016-05-23 08:25:11 -07:00
Seth Hall
e2fb7591f4 Merge remote-tracking branch 'origin/master' into topic/seth/smb 2016-05-20 14:28:39 -04:00
Johanna Amann
6779325520 NetControl: find_rules_subnet works in cluster mode
This introduces two new events, NetControl::rule_new and
NetControl::rule_destroyed, which are raised when rules are first added
and then deleted from the internal state tracking.
2016-05-20 11:11:44 -07:00
Johanna Amann
52d694f3bd Merge remote-tracking branch 'origin/master' into topic/johanna/netcontrol-improvements 2016-05-19 16:17:07 -07:00
Robin Sommer
85213e6b55 Merge remote-tracking branch 'origin/topic/johanna/fix-analyzer-addition'
* origin/topic/johanna/fix-analyzer-addition:
  DTLS: Use magix constant from rfc5389 for stun detection.
  DTLS: Fix binpac bug with DTLSv1.2 client hellos
  Forgot to remove debug output.
  DTLS: Fix interaction with STUN
  Fix the way that child analyzers are added.

BIT-1604 #merged
2016-05-18 07:41:18 -07:00
Johanna Amann
e6b680ab09 DTLS: Use magix constant from rfc5389 for stun detection. 2016-05-17 17:08:20 -07:00
Johanna Amann
9b2c81e00a DTLS: Fix binpac bug with DTLSv1.2 client hellos 2016-05-17 16:58:30 -07:00
Johanna Amann
74d0493289 Forgot to remove debug output. 2016-05-17 16:39:44 -07:00
Johanna Amann
39bdc397a0 DTLS: Fix interaction with STUN
Now the DTLS analyzer cleanly skips all STUN messages; no warnings
should be logged to dpd.log and parsing should work flawlessly with
intermixed STUN messages.
2016-05-17 16:36:46 -07:00
Robin Sommer
b1c0306e4a Updating submodule(s).
[nomail]
2016-05-17 16:26:45 -07:00
Robin Sommer
573b542646 Updating submodule(s).
[nomail]
2016-05-17 16:23:47 -07:00
Robin Sommer
554e334a3b Merge remote-tracking branch 'origin/topic/johanna/bit1602'
* origin/topic/johanna/bit1602:
  Fix duplication of new_connection_contents event

BIT-1602 #merged
2016-05-17 16:17:23 -07:00
Robin Sommer
4b830b0a39 Merge remote-tracking branch 'origin/topic/johanna/x-anonymoustls'
* origin/topic/johanna/x-anonymoustls:
  SMTP: Support SSL upgrade via X-ANONYMOUSTLS

BIT-1603 #merged
2016-05-17 16:15:01 -07:00
Johanna Amann
bc868d72a1 Fix the way that child analyzers are added.
Bro contains functionality to add child analyzers delayed, so that an
just added analyzer does not influence the list of current analyzers
(which, in some combinations of mostly UDP and traffic replay by PIA can
lead to duplicate packets sent to the analyzer).

Sadly, this feature was broken sometime in the past, leading to the
aforementioned duplicate packets. Re-enabling this also necessitated
some changes in the analyzer manager, which immediately timed out all
connections when that feature was re-enabled.

There currently is no testcase (this is a bit hard to trigger); however,
I will add one with a later fix for DTLS.
2016-05-17 16:13:33 -07:00
Robin Sommer
e2dee49fc1 Fixing control frameworks net_stats and peer_status commands.
Turns out the code implementing them went missing with the recent
merge of the stats changes.

For peer status, I removed most of the numbers that the code used to
return because (1) we don't have access to that data anymore, and (2)
even in 2.4 the numbers returned already didn't make sense (because
they were global values, not per peer). We could consider just
removing the peer_status command at all.
2016-05-17 16:11:22 -07:00
Robin Sommer
7c1aab0ce5 Updating submodule(s).
[nomail]
2016-05-17 14:31:16 -07:00
Johanna Amann
8539f8f96b SMTP: Support SSL upgrade via X-ANONYMOUSTLS
This seems to be a non-standardized microsoft extension that, besides
having a different name, works pretty much the same as StartTLS. We just
treat it as such.

I tested this against provided traffic and it works; I do not have
traffic I can share for a testcase.
2016-05-17 11:07:30 -07:00
Johanna Amann
d091e9ca89 Fix duplication of new_connection_contents event
Addresses BIT-1602
2016-05-17 10:32:13 -07:00
Johanna Amann
4851cbc7cc Merge remote-tracking branch 'origin/topic/dnthayer/ticket1601'
* origin/topic/dnthayer/ticket1601:
  Fix some failing plugin tests on OS X 10.11

BIT-1601 #merged
2016-05-16 20:11:20 -07:00
Johanna Amann
8f6cdbb489 Fix test failing when we use &> instead of 2>
On the shell of a few systems, that apparently masks the return code.

(Namely - Debian and FreeBSD)
2016-05-13 07:44:30 -07:00
Daniel Thayer
a4e5591e18 Fix some failing plugin tests on OS X 10.11
By default, OS X 10.11 does not include openssl headers.
Since building a Bro plugin #includes Bro headers, which #include openssl
headers, we need to tell cmake to find these so that the compiler
can use them.
2016-05-12 15:58:09 -05:00
Johanna Amann
49ca47895d Merge remote-tracking branch 'origin/topic/dnthayer/ticket1595'
* origin/topic/dnthayer/ticket1595:
  Fix a bug in receiving remote logs via broker

BIT-1595 #merged
2016-05-12 08:06:42 -07:00
Johanna Amann
8fb78125a5 Merge remote-tracking branch 'origin/topic/dnthayer/ticket1587'
* origin/topic/dnthayer/ticket1587:
  Fix Bro and unit tests when broker is not enabled

BIT-1587 #merged
2016-05-12 07:58:19 -07:00
Johanna Amann
5f50733276 Merge branch 'topic/jgras/event-vars' of https://github.com/J-Gras/bro 2016-05-12 07:40:44 -07:00
Jan Grashoefer
cb33028702 Added hook to allow extending the intel log.
The extension mechanism is basically the one that Seth introduced with
his intel extensions. The main difference lies in using a hook instead
of an event. An example policy implements whitelisting.
2016-05-11 23:59:46 +02:00
Johanna Amann
5baeb4790d Updating submodule
[nomail]
2016-05-11 11:25:39 -07:00
Jan Grashoefer
859eb5eac7 Merge branch 'master' into topic/jgras/intel-update 2016-05-11 18:59:58 +02:00
Jan Grashoefer
65607239c9 Added interpreter error for local event variables.
Scheduling a local event variable resulted in a global lookup instead of
evaluating the local variable. To prevent misunderstandings, this will
trigger an error now.
2016-05-11 12:26:11 +02:00
Daniel Thayer
7e3991d879 Fix a bug in receiving remote logs via broker
When receiving a remote log via broker, there was a bug that would
prevent a log from being written if the log record contained a field
without the &log attribute that was followed by a field with the &log
attribute.

Updated a test case to catch this error.
2016-05-10 15:37:50 -05:00
Daniel Thayer
d91dd8d9a8 Fix Bro and unit tests when broker is not enabled
When Bro was compiled with broker disabled, then some Bro scripts
were referencing functions and types that were not defined.  Fixed
by adding @ifdefs to several scripts.  Removed one @ifdef because
it was causing several unit tests to fail.

Also fixed the @TEST-REQUIRES check in tests that rely on broker so
that such tests are skipped when broker is disabled.
2016-05-10 06:24:35 -05:00
Robin Sommer
90223fe428 Updating submodule(s).
[nomail]
2016-05-09 09:45:21 -07:00
Robin Sommer
b23ed77819 Updating submodule(s).
[nomail]
2016-05-07 12:24:20 -07:00
Robin Sommer
2e12d01eee Merge branch 'master' of git.bro.org:bro 2016-05-07 11:51:41 -07:00
Robin Sommer
00d94f1bbc Merge remote-tracking branch 'origin/topic/seth/stats-improvement'
(Cleaned up some code a little bit.)

* origin/topic/seth/stats-improvement:
  Fixing tests for stats improvements
  Rename the reporting interval variable for stats.
  Removing more broken functionality due to changed stats apis.
  Removing some references to resource_usage()
  Removing Broker stats, it was broken and incomplete.
  Fixing default stats collection interval to every 5 minutes.
  Add DNS stats to the stats.log
  Small stats script tweaks and beginning broker stats.
  Continued stats cleanup and extension.
  More stats collection extensions.
  More stats improvements
  Slight change to Mach API for collecting memory usage.
  Fixing some small mistakes.
  Updating the cmake submodule for the stats updates.
  Fix memory usage collection on Mac OS X.
  Cleaned up stats collection.

BIT-1581 #merged
2016-05-07 11:51:35 -07:00
Seth Hall
40e9724de7 Switching all use of gmtime and localtime to use reentrant variants.
This was causing occasional problems with the time on processes
running lots of threads.  The use of gmtime in the json
formatter is the likely culprit due to the fact that the
json formatter runs in threads.  More evidence for this is that
the problem only appears to exhibit when logs are being written
as JSON.
2016-05-07 01:22:38 -04:00
Robin Sommer
34c7a3ef68 Merge remote-tracking branch 'origin/topic/dnthayer/doc-improvements'
* origin/topic/dnthayer/doc-improvements:
  Fix some scripting tutorial examples
  Add some missing Bro script documentation
  Fix more "make doc" warnings
  Fix some "make doc" warnings
  Improve documentation of the "for" statement
  Add more documentation to sumstats framework scripts
  Update traffic per core estimate in the cluster doc
  Update documentation for DNS "Z" field
  Improve documentation of Bro script statements

BIT-1520 #merged
2016-05-06 16:59:07 -07:00
Robin Sommer
abebd036bc Merge remote-tracking branch 'origin/topic/johanna/xmpp-starttls'
* origin/topic/johanna/xmpp-starttls:
  XMPP: Add StartTLS event and update tests
  Add xmpp dpd sig and fix a few parsing problems for connections that do not upgrade to TLS.
  Add simple XMPP StartTLS analyzer.

BIT-1579 #merged
2016-05-06 16:56:06 -07:00
Daniel Thayer
f596d30386 Fix some scripting tutorial examples
Some of the examples in the scripting tutorial were regularly getting
out of sync with the base scripts (because the line numbering would need
to be updated).  Fixed this maintenance burden by using small example
scripts instead of actual Bro scripts.  These small example scripts
do not need to be kept in sync with the bro base scripts.
2016-05-05 17:23:15 -05:00
Daniel Thayer
2d9127888f Add some missing Bro script documentation
Also fixed a few reST formatting issues.
2016-05-05 16:35:31 -05:00
Daniel Thayer
28125e367e Fix more "make doc" warnings 2016-05-05 15:18:50 -05:00
Daniel Thayer
75e69d8c09 Fix some "make doc" warnings 2016-05-05 12:47:21 -05:00
Daniel Thayer
da6611e3c2 Merge remote-tracking branch 'origin/master' into topic/dnthayer/doc-improvements 2016-05-05 11:33:57 -05:00
Robin Sommer
209c8936d1 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix a few incorrect type tags in Bro broker source code
  Update docs and tests of the fmt() function
  Revert "Fix RFB analyzer to build on FreeBSD"
  Fix RFB analyzer to build on FreeBSD
2016-05-03 11:36:52 -07:00
Robin Sommer
8a6ca053bf Updating submodule(s).
[nomail]
2016-05-03 11:17:01 -07:00
Seth Hall
f8f5998328 Fixing tests for stats improvements 2016-05-02 16:43:08 -04:00
Seth Hall
da014e1eca Rename the reporting interval variable for stats. 2016-05-02 16:20:53 -04:00
Seth Hall
d9d579c52c Merge remote-tracking branch 'origin/master' into topic/seth/stats-improvement 2016-05-02 14:34:29 -04:00
Johanna Amann
86836c0bb8 Merge remote-tracking branch 'origin/master' into topic/johanna/netcontrol-improvements 2016-05-02 11:23:36 -07:00