Commit graph

1920 commits

Author SHA1 Message Date
Daniel Thayer
dc74fab2d5 Add a new site policy script local-logger.bro
Addresses BIT-1700
2016-10-31 20:43:50 -05:00
Robin Sommer
b7a774ab28 Moved the DCE_RPC constants into init-bare.bro. 2016-10-25 16:50:48 -07:00
Robin Sommer
1f36ae61ba Adding one more case to the DCE_RPC defrag logic.
(and fixing a couple of compiler warnings)
2016-10-25 16:45:10 -07:00
Robin Sommer
aab3819c70 Merge remote-tracking branch 'origin/master' into topic/seth/dce_rpc_fixes 2016-10-25 16:31:18 -07:00
Seth Hall
36ae5e6662 Make DCE_RPC skip input in strange fragment circumstances.
If there are too many concurrent fragments or too much
data fragmented, skip further input on DCE_RPC.
2016-10-24 13:50:13 -04:00
Seth Hall
e4b620673b More DCE_RPC improvements.
- The logic for fragment handling has been rewritten and should be correct now.
 - There are now tunables for fragment handling overflow situations.
   - DCE_RPC::max_cmd_reassembly and DCE_RPC::max_frag_data
   - They result in weirds and analyzer removal.
 - Memory leak fixed by unique_ptr auto cleanup.
 - DCE_RPC is now intolerate of content gaps and will stop
   analyzing traffic if content gaps happen (like most other analyzers currently).
2016-10-24 03:22:20 -04:00
Johanna Amann
8ce746cc25 Merge remote-tracking branch 'origin/topic/vladg/bit-1641'
* origin/topic/vladg/bit-1641:
  Logic fix for ssh/main.bro when the auth status is indeterminate, and fix a test. Addresses BIT-1641.
  Clean up the logic for ssh_auth_failed. Addresses BIT-1641
  Update baselines for adding a field to ssh.log as part of BIT-1641
  Script-land changes for BIT-1641.
  Change SSH.cc to use ssh_auth_attempted instead of ssh_auth_failed. Addresses BIT-1641.
  Revert "Fixing duplicate SSH authentication failure events."
  Create new SSH events ssh_auth_attempt and ssh_auth_result. Add auth_attempts to SSH::Info. Address BIT-1641.

I extended the tests a bit and did some small cleanups. I also moved the
SSH events back to the global namespace for backwards compatibility and
for consistency (the way it was at the moment, some of them were global
some SSH::).

Furthermore, I fixed the ssh_auth_result result event, it was only
raised in the success case. ssh_auth_result is now also checked in the
testcases. I also have a suspicion that the intel integration never
really worked before.

BIT-1641 #merged
2016-10-18 21:57:27 -04:00
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
7caf2d0356 Clean up the logic for ssh_auth_failed. Addresses BIT-1641 2016-10-14 09:14:22 -05:00
Vlad Grigorescu
2920366049 Script-land changes for BIT-1641. 2016-10-14 09:14:21 -05:00
Vlad Grigorescu
93becb1387 Create new SSH events ssh_auth_attempt and ssh_auth_result. Add auth_attempts to SSH::Info. Address BIT-1641. 2016-10-14 09:14:21 -05:00
Robin Sommer
c9d449e363 Merge remote-tracking branch 'origin/topic/johanna/tls13'
BIT-1727 #merged

* origin/topic/johanna/tls13:
  Better way to deal with overloaded Assign constructors.
  A few tabbing fixes in TLS 1.3 support
  TLS 1.3 support.
2016-10-13 15:48:27 -07:00
Johanna Amann
38f6ca87ae Merge remote-tracking branch 'origin/topic/dnthayer/ticket1720'
BIT-1720 #merged

* origin/topic/dnthayer/ticket1720:
  Added missing README files for documentation
  List new log files in the log-files.rst document
2016-10-13 14:09:44 -07:00
Daniel Thayer
23a5f83c94 Added missing README files for documentation
These are the one-line script package descriptions.
2016-10-10 22:55:50 -05:00
Seth Hall
0b5f8e66af Merge branch 'master' into topic/seth/dce_rpc_fixes 2016-10-08 11:00:28 -04:00
Seth Hall
b55c4e61db Tiny fix for a DCE_RPC script issue.
Fixes BIT-1688 (or at least should)
2016-10-08 10:58:11 -04: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
fdef28ce7c TLS 1.3 support.
Well, at least -draft-16, and we don't quite parse all extensions yet
(not that there is that much left to parse).
2016-10-07 12:51:43 -07:00
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
Seth Hall
ddb905408f Merge remote-tracking branch 'origin/topic/johanna/bit-1695'
* origin/topic/johanna/bit-1695:
  Normalize http host in seen script.
2016-10-02 17:39:36 -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
Robin Sommer
d961b0a909 Merge remote-tracking branch 'origin/topic/johanna/bit-1691'
BIT-1691 #merged

* origin/topic/johanna/bit-1691:
  Fix loaded-scripts to work with arbitrary indentation.
2016-09-27 11:39:43 -07:00
Robin Sommer
a87083233e Merge remote-tracking branch 'origin/topic/jazoff/ticket-1670'
BIT-1670 #merged

* origin/topic/jazoff/ticket-1670:
  Ensure that the notice uid field is filled in.
  Move lookup_addr when statement
2016-09-27 11:38:08 -07:00
Johanna Amann
bb623a2ca1 Fix loaded-scripts to work with arbitrary indentation.
The new approach is very brute-force, but works and it only is executed
once on startup.

Addresses BIT-1691
2016-09-26 10:45:03 -07:00
Johanna Amann
068c49a3d3 Normalize http host in seen script.
This changes the behavior to be just like in the base scripts.

Addresses BIT-1695
2016-09-22 16:52:59 -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
Justin Azoff
c74218568a Ensure that the notice uid field is filled in. 2016-09-19 22:11:31 -04: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
077a5cbda8 Remove old ack_above_hole event from scripts.
Fixes BIT-1673
2016-08-19 07:26:34 -07:00
Justin Azoff
f9b3f739e4 Move lookup_addr when statement
Move the when statement to a function so that the connection record is
not in scope. Cloning a connection record is an expensive operation and
this avoids it and this avoids it.
2016-08-17 10:41:41 -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
2756dfe581 Make x509 intel seen script robust against file analyzer ordering.
Now it consistently works, even if the SHA1 file analyzer gets the data
before the X509 file analyzer.
2016-08-11 16:12:08 -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
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
Johanna Amann
ba825e8910 update scripts loaded by default in local.bro.
We now load stats and capture-loss by default. Traceroute is disabled by
default because it can cause a lot of message load.
2016-08-10 08:57:22 -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