Commit graph

2138 commits

Author SHA1 Message Date
Vlad Grigorescu
70aaffbaac Logic fix for ssh/main.bro when the auth status is indeterminate, and fix a test. Addresses BIT-1641. 2016-10-14 09:14:22 -05:00
Vlad Grigorescu
3e7d143e31 Update baselines for adding a field to ssh.log as part of BIT-1641 2016-10-14 09:14:21 -05:00
Robin Sommer
4477b8a1ab Merge remote-tracking branch 'origin/topic/seth/dce_rpc_fixes'
* origin/topic/seth/dce_rpc_fixes:
  Fixes for DCE_RPC analyzer
2016-10-10 08:29:14 -07:00
Robin Sommer
54191cc390 Merge remote-tracking branch 'origin/topic/dnthayer/ticket1719'
BIT-1719 #merged

* origin/topic/dnthayer/ticket1719:
  Fix httpd.py test script for Py3 compatibility
2016-10-10 08:24:04 -07:00
Seth Hall
029d92183e Fixes for DCE_RPC analyzer
- DCE_RPC fragmentation handling returns!
  - Fixed some general parsing issues
  - Fixed an issue with the DCE_RPC signature not working for IPv6 connections.
2016-10-08 10:00:26 -04:00
Johanna Amann
14c119c7f9 Really fix plugins/hooks test this time 2016-10-06 15:00:48 -07:00
Robin Sommer
d9ba7ea0dd Fixing documentation piece.
The interesting-hostname script has changed.
2016-10-06 14:28:52 -07:00
Daniel Thayer
e780ebb17a Fix httpd.py test script for Py3 compatibility
With these changes the script still works on Python 2.6/2.7.
2016-10-06 15:45:11 -05:00
Johanna Amann
26d9517774 Use the deterministic bro_random in a test, instead of os random().
The previous test stopped working on FreeBSD 11.0, and I am actually not
quite sure why this ever worked as stable as it did.
2016-10-06 12:56:52 -07:00
Johanna Amann
544317fc1e Test output change on FreeBSD 11.0 (changed one tab to space).
Let's just always filter the tab and make it a space on all systems -
with that the comparison should hopefully work everywhere.
2016-10-06 12:37:50 -07:00
Johanna Amann
5bdb282f8a Prevent loading version.bro during plugins.hooks test
versions.bro uses the changing version string, which leads to changing
lines in the output of the hooks plugin, which is difficult to filter.

Hence, let's just @unload it, before it is being used.
2016-10-06 11:59:24 -07:00
Johanna Amann
72a3c2cda2 Add missing path canonifier to version test 2016-10-06 11:41:04 -07:00
Robin Sommer
89ff11ba91 Merge remote-tracking branch 'origin/topic/johanna/version'
One more name change: version_num -> version_number

BIT-1707 #merged

* origin/topic/johanna/version:
  Slight naming changes for Bro version information.
  Add convenient way to access version information to Bro.
2016-10-02 17:48:28 -07:00
Seth Hall
d70f895be3 Merge branch 'J-Gras-topic/jgras/bit-1679'
* J-Gras-topic/jgras/bit-1679:
  Handle removing non-existent intel items.
  Separated file and default info added to matches.
2016-10-02 14:44:43 -04:00
Seth Hall
20fc6398be Merge branch 'topic/jgras/bit-1679' of https://github.com/J-Gras/bro into J-Gras-topic/jgras/bit-1679 2016-10-02 14:21:19 -04:00
Johanna Amann
f66ef7b1e6 Slight naming changes for Bro version information.
Main API now looks like this:

@if ( Version::number >= 20500 )
or
@if ( Version::at_least("2.5") )
2016-09-29 13:36:47 -07:00
Johanna Amann
35465aaf30 Add convenient way to access version information to Bro.
With the introduction of the package manager, it will get more common
that applications are able to get information about the currently
running version of Bro. With this commit, scripts can easily compare
which version of Bro they are running.

Commonly, this probably will either look like this (both lines check if
the current Bro version is greater or equal to 2.5)

@if ( Version::num >= 20500 )
or
@if ( Version::greater_equal("2.5") )

Version::info contains detailed information about the running version of
Bro, including beta flags, etc.
2016-09-29 12:45:48 -07:00
Johanna Amann
038dfa6273 Actually check if the number of fields in a write are equal to the
number of fields required.

Addresses BIT-1683

I do not think this quite fixes the underlying issue of BIT-1683 - it
should not be possible to get to this state in normal operations.

Also fixes a small memory leak for disabled writers.
2016-09-22 16:43:37 -07:00
Jan Grashoefer
8c024ca094 Handle removing non-existent intel items.
The intel framework raises a reporter info on removing non-existent
intel items. An according test case has been added.

Fixes #1679.
2016-09-21 00:37:38 +02:00
Seth Hall
8015e35747 Fix a crash when a user disables DCE_RPC and enabled SMB.
I wasn't accounting for analyzers being disabled and not actually
instantiating when requested.  This includes a test which
verifies there is no crash or problem when a user disables DCE_RPC.
2016-08-28 21:28:57 -04:00
Johanna Amann
058e378ced Update local-compat test for 2.5 2016-08-17 10:38:18 -07:00
Johanna Amann
04fa937129 And update one last test baseline 2016-08-17 09:19:44 -07:00
Johanna Amann
55f99c0da9 Fix sphinx build errors 2016-08-17 09:16:16 -07:00
Johanna Amann
fd54892da3 SMB: fix rounding error due to value truncation when converting timestamps. 2016-08-16 16:02:44 -07:00
Johanna Amann
5d8da0b182 Address coverity errors. 2016-08-16 11:16:50 -07:00
Johanna Amann
0d706bcccd add certificate to external list for debian 8.
The OpenSSL on debian 8 refuses to validate one connection; everyone
else can. The easiest fix is to add the CA certificate to the root list.
Once debian has a newer version of OpenSSL, we should be able to remove
it again.
2016-08-15 16:47:44 -07:00
Johanna Amann
1889f409e9 Change timings of intel expire-item test.
Seems to be stable on slow systems with this.
2016-08-12 13:10:04 -07:00
Johanna Amann
33c85895b8 Make netcontrol cluster test stable.
It now consistently works for me.
2016-08-12 11:39:34 -07:00
Robin Sommer
8b7e8ecf15 Adding missing baseline update. 2016-08-12 08:21:26 -07:00
Robin Sommer
83ff3f8cdc Attempt to make test more stable. 2016-08-12 08:19:51 -07:00
Johanna Amann
0e44b91cd9 Merge remote-tracking branch 'origin/topic/seth/log-framework-ext'
* origin/topic/seth/log-framework-ext:
  Log extensions: series of small fixes and new tests.
  Change the function for log extension to take a path only and update tests.
  Final changes to log framework ext code.
  Add logging framework metadata mechanism.
  Add unrolling separator & field name map to logging framework.
2016-08-11 07:47:13 -07:00
Johanna Amann
5ec2108bc7 Make invalidtext.bro test stable. 2016-08-10 18:28:38 -07:00
Johanna Amann
6e769db23b Log extensions: series of small fixes and new tests.
The extensions now work with optional types, as well with complex types
(like subrecords). Not returning a record in the ext_func no longer
crashes bro.

The default_ext_func was switched to return void in
cases where no extension revord is defined (was bool).

I also got rid of the offsets in the indices - with the rest of the
implementation, that was not really necessary and made the code more
complex.
2016-08-10 14:14:03 -07:00
Seth Hall
79e49e1ab5 Change the function for log extension to take a path only and update tests.
We were having stack overflow issues creep in with the self-referential
field for the log extension function.
2016-08-10 13:53:27 -04:00
Seth Hall
5f6565d62c Final changes to log framework ext code.
The "metadata" functionality has been renamed to "ext" to
represent that the logs are being extended.  The function that
returns the record which is used to extend the log now receives
a log filter as it's single argument.

The field name "unrolling" is now renamed to "scope" so the variables
names now look like this: "Log::default_scope_sep"
2016-08-10 12:43:32 -04:00
Seth Hall
a60ce35103 Merge remote-tracking branch 'origin/master' into topic/seth/log-framework-ext 2016-08-10 10:28:04 -04:00
Seth Hall
5fc0fc5116 Fixing tests for SMB. 2016-08-08 16:15:20 -04:00
Seth Hall
520ac8d92c Merge remote-tracking branch 'origin/master' into topic/seth/smb
# Conflicts:
#	scripts/base/protocols/dce-rpc/main.bro
#	scripts/base/protocols/ntlm/main.bro
#	scripts/policy/protocols/smb/smb1-main.bro
#	src/analyzer/protocol/smb/smb-common.pac
#	src/analyzer/protocol/smb/smb-strings.pac
#	src/analyzer/protocol/smb/smb1-com-locking-andx.pac
#	src/analyzer/protocol/smb/smb1-com-logoff-andx.pac
#	src/analyzer/protocol/smb/smb1-com-nt-create-andx.pac
#	src/analyzer/protocol/smb/smb1-com-open-andx.pac
#	src/analyzer/protocol/smb/smb1-com-read-andx.pac
#	src/analyzer/protocol/smb/smb1-com-session-setup-andx.pac
#	src/analyzer/protocol/smb/smb1-com-transaction-secondary.pac
#	src/analyzer/protocol/smb/smb1-com-transaction.pac
#	src/analyzer/protocol/smb/smb1-com-tree-connect-andx.pac
#	src/analyzer/protocol/smb/smb1-com-write-andx.pac
#	src/analyzer/protocol/smb/smb1-protocol.pac
2016-08-08 15:46:49 -04:00
Robin Sommer
84b372a772 Merge remote-tracking branch 'origin/topic/johanna/rule-reasons'
BIT-1655 #merged

* origin/topic/johanna/rule-reasons:
  NetControl: allow reasons in remove_rule calls.
2016-08-05 18:48:19 -07:00
Robin Sommer
2a854acd2b Revert "Merge branch 'topic/seth/smb'"
This reverts commit 9d9c7bafd3, reversing
changes made to eeb8c0cbb0.

The SMB analyzer wasn't ready yet.
2016-08-05 15:04:49 -07:00
Johanna Amann
4f1a2c7b62 NetControl: allow reasons in remove_rule calls.
This adds the capability for the user to attach a reason when removing
or destroying a rule. The message will both be logged in netcontrol.log
and forwarded to the responsible plugins.

Addresses BIT-1655
2016-08-05 10:49:09 -07:00
Seth Hall
f0bce636cf Merge remote-tracking branch 'origin/topic/dnthayer/ticket1627'
* origin/topic/dnthayer/ticket1627:
  Add a test for starting a cluster with a logger node
  Update broctl submodule
  Update broctl submodule to branch topic/dnthayer/ticket1627
  Change how logger node is detected in cluster framework
  Update test baselines for the new logger node type
  Update docs for the new logger node type
  Add a new node type for logging
2016-08-05 12:59:05 -04:00
Seth Hall
ebd064de17 Add some more DCE_RPC endpoints. 2016-08-05 12:29:45 -04:00
Seth Hall
7b3ec047d0 Merge remote-tracking branch 'origin/master' into topic/seth/smb 2016-08-05 11:46:13 -04:00
Seth Hall
eeb8c0cbb0 Merge branch 'topic/seth/intel-update-merge'
Closes github's #77 and closes BIT-1606

* topic/seth/intel-update-merge:
  Tiny scoping updates and test baseline updates for Intel framework.
  Minor documentation cleanups.
  Fixed insertion of nested subnets.
  Refactored FAF integration of intel framework.
  Added expiration for intelligence items.
  Improved intel notices.
  Added hook to allow extending the intel log.
  Added remove function to intel-framework.
  Added support for subnets to intel-framework.
  Refactoring of meta data handling for intel.
  Added testcase for intel updates.
2016-08-05 09:36:52 -04:00
Seth Hall
4bb4c54f96 Tiny scoping updates and test baseline updates for Intel framework. 2016-08-05 09:29:23 -04: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
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
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
c3a43274e4 Revert "Fix some failing plugin tests on OS X 10.11"
This reverts commit a4e5591e18.
2016-08-01 09:22:40 -07:00