Commit graph

2220 commits

Author SHA1 Message Date
Johanna Amann
329911ccab Update a few TLS constants in preparation for TLS 1.3
We could actually already see these in traffic with people that use and
enabled them in chrome canary / firefox nightly builds. This change
includes the re-naming of a few names that were never formalli assigned
yet.
2016-10-06 14:49:53 -07:00
Vlad Grigorescu
3e1133f3cf Add descriptions for what the SMB1 events do, and references to the specification. 2016-10-03 17:22:05 -05:00
Vlad Grigorescu
32d03a4a9e Add descriptions for what the SMB2 events do, and references to the specification. 2016-10-03 16:39:27 -05:00
Vlad Grigorescu
03f9a8675f Improve the SMB2 documentation.
* Clean it up, make it more consistent, and add references to similar events.
* Commented out the smb2_set_info_request event, which wasn't being generated.
* Documented the SMB2 record types in init-bare
2016-10-03 16:24:47 -05:00
Vlad Grigorescu
91db998881 Rename events referenced in SMB1::Header documentation with new SMB analyzer. Addresses BIT-1671. 2016-10-03 14:17:29 -05: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
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
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
Jan Grashoefer
cb53a930a2 Separated file and default info added to matches. 2016-09-20 02:04:15 +02:00
Johanna Amann
b00e9ba338 Merge branch 'patch-6' of https://github.com/moshekaplan/bro
* 'patch-6' of https://github.com/moshekaplan/bro:
  Update init-bare.bro
2016-09-19 15:23:12 -07:00
Moshe Kaplan
f8587e643a Update init-bare.bro 2016-09-15 12:28:17 -04:00
Johanna Amann
ff114709db Merge remote-tracking branch 'origin/topic/jazoff/bit-1649'
* origin/topic/jazoff/bit-1649:
  Track outstanding_global_views updates by uid
  Also track recent_global_view_keys on manager

BIT-1649 #merged
2016-08-16 12:11:09 -07:00
Johanna Amann
a467f593de KRB: fix field value missing error for msg$client_name.
Reported by giesiger on IRC.
2016-08-15 16:05:10 -07:00
Seth Hall
c06dca3565 Fixes for NTLM.
- Attempted fix for some NTLM handling fixes that were leading
   to DPD errors.
 - Added some status codes to the list of auth failure status codes.
2016-08-14 01:31:07 -04: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
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
Johanna Amann
fa4806d375 Update Mozilla CA list.
We now use the list from NSS 3.26
2016-08-10 09:21:46 -07: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
ce26dee408 Fix a small script bug that was causing a test failure. 2016-08-09 15:42:07 -04:00
Seth Hall
4a3dfe69b1 Add an argument to "disable_analyzer" to not do a reporter message by default.
If the analyzer is not found directly attached to the connection,
useless error messages are being output.  There are now several
cases where analyzers are attached within other analyzers so the
connection itself doesn't know about the analyzer.  This hides
these useless messages.
2016-08-09 10:22:31 -04:00
Seth Hall
5fc0fc5116 Fixing tests for SMB. 2016-08-08 16:15:20 -04:00
Seth Hall
86665e381b Merge branch 'master' into topic/seth/smb 2016-08-08 15:47:39 -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
Seth Hall
117b5c3ac7 Lots of SMB1 parsing fixes. 2016-08-08 15:36:07 -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
4bb4c54f96 Tiny scoping updates and test baseline updates for Intel framework. 2016-08-05 09:29:23 -04: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
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
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
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
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
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
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
Daniel Thayer
7491cbc327 Merge remote-tracking branch 'origin/master' into topic/dnthayer/ticket1627 2016-07-14 18:17:03 -05:00
Johanna Amann
11ec4903ee SSL: add support for signature_algorithms extension. 2016-07-11 15:01:59 -07:00
Johanna Amann
74e98565f4 Merge remote-tracking branch 'origin/topic/robin/history-rxmit'
* origin/topic/robin/history-rxmit:
  Flagging retransmissions in connection history.
  Removing ack_above_hole event.

BIT-977 #merged
2016-07-08 19:30:10 -07:00
Robin Sommer
0c080bca7a Extendign connection history field to flag when Bro flips a
connection's endpoints.

The character is '^'.

Addresses BIT-1629.
2016-07-08 14:56:52 -07:00
Robin Sommer
7e7002329c Merge remote-tracking branch 'origin/topic/seth/smb' into topic/robin/smb-merge 2016-07-07 12:07:53 -07:00
Seth Hall
d1b1a560c0 Add a DCE-RPC test. 2016-07-07 14:17:25 -04:00
Robin Sommer
781fdfa5ba Merge remote-tracking branch 'origin/topic/seth/smb' into topic/robin/smb-merge 2016-07-07 10:41:31 -07:00