Commit graph

905 commits

Author SHA1 Message Date
Johanna Amann
5acbccf444 Update CT Log list 2017-07-27 17:07:22 -07:00
Johanna Amann
9594f69598 SSL: Update OCSP/SCT scripts and documentation. 2017-07-27 16:22:40 -07:00
Johanna Amann
924482d540 Merge remote-tracking branch 'origin/master' into topic/johanna/ocsp-sct-validate 2017-07-27 14:24:48 -07:00
Johanna Amann
cc90b24b1d Add new cipher suites from draft-ietf-tls-ecdhe-psk-aead-05 2017-07-06 11:13:24 -07:00
Johanna Amann
8af810e00b SCT: Fix script error when mime type of file unknown. 2017-05-14 19:53:22 -07:00
Johanna Amann
eb50b3fed1 Change end-of-connection handling for validation
Move from using CCS (before: established) to just doing certificate
validation at the end of the connection.

This is (again) more robust in the case of aborted connection. I am
moving this into a hook because of the complexity of the
end-of-connection handling for SSL.

This should probably be extended to not just handle SSL validation, but
all other logging constructs that are currently called in _established.
2017-05-11 22:50:20 -07:00
Johanna Amann
61906fe7fb Merge branch 'topic/johanna/tls13-extensions' into topic/johanna/ocsp-sct-validate 2017-04-05 12:04:15 -07:00
Johanna Amann
6c9449c780 Add support for two TLS 1.3 extensions.
New events:

event ssl_extension_supported_versions(c: connection, is_orig: bool, versions: index_vec)

event ssl_extension_psk_key_exchange_modes(c: connection, is_orig: bool, modes: index_vec)
2017-04-05 11:55:40 -07:00
Johanna Amann
0cd0ffed13 SSL: update dpd signature for TLS1.3
The dpd signature missed a few cases that are used for TLS 1.3,
especially when draft versions (which are all that we are seeing at the
moment) are being negotiated.

This fix mostly allows draft versions in the server hello (identified by
7F[version]; since we do not know how many drafts there will be, we are
currently allowing a rather safe upper limit.
2017-04-05 08:58:08 -07:00
Johanna Amann
dcf4907857 Add CT log information to Bro
This commit add the table SSL::ct_logs to Bro. This table is populated
with information about the currently active certificate transparency
logs (data from Google). The data can, e.g., be used to identify which
Logs are being used in SCTs.
2017-03-16 13:50:32 -07:00
Johanna Amann
7aa219758c Merge remote-tracking branch 'origin/master' into topic/johanna/ocsp-new 2017-03-16 12:28:08 -07:00
Seth Hall
623ebea655 Rework the RADIUS base script.
- This fixes BIT-1769 by logging all requests even in the absence of a
   reply.  The way that request and replying matching were being handled
   was restructured to mostly ignore the transaction ids because they
   aren't that helpful for network monitoring and it makes the script
   structure more complicated.
 - Add `framed_addr` field to the radius log to indicate if the radius
   server is hinting at an address for the client.
 - Add `ttl` field to indicate how quickly the radius server is replying
   to the network access server.
 - Fix a bunch of indentation inconsistencies.
2017-02-20 00:07:14 -05:00
Seth Hall
0b8b76cfab Refactor base krb scripts and update tests. 2017-02-18 13:55:39 -05:00
Johanna Amann
c431d14eed OCSP: re-enable logging, fix tests, fix x509 issue
Re-enable logging, now in policy because it probably is interesting to
no-one. We also only log ocsp replies.

Fix all tests.

Fix an issue where ocsp replies were added to the x.509 certificate
list.
2017-02-10 17:05:12 -08:00
Johanna Amann
9fd7816501 Allow File analyzers to direcly pass mime type.
This makes it much easier for protocols where the mime type is known in
advance like, for example, TLS. We now do no longer have to perform deep
script-level magic.
2017-02-10 17:03:33 -08:00
Johanna Amann
c92bf9bad2 Introduce ssl_plaintext_data event.
This event is the replacement for ssl_application_data, which is removed
in the same commit. It is more generic, containing more information than
ssl_application_dataand is raised for all SSL/TLS messages that are
exchanged before encryption starts.

It is used by Bro internally to determine when a TLS1.3 session has been
completely established. Apart from that, it can be used to, e.g.,
determine the record layer TLS version.
2017-02-03 13:58:26 -08:00
Johanna Amann
f721c74bad Add compression methods to ssl_client_hello event.
This change adds compression methods to the ssl_client_hello event. It
not being included was an oversight from a long time ago.

This change means that the signature of ssl_client_hello changes
slightly and scripts will have to be adjusted; since this is a commonly
used event, the impact of it might be higher than usually for event
changes.
2017-02-03 11:48:55 -08:00
John E. Rollinson
68e3f0d96a Ensure TGS req does not stomp out AP data 2017-01-29 09:39:40 +09:00
Johanna Amann
07b7f1d193 Add new TLS extension type (cached_info) 2017-01-19 13:22:34 -08:00
Daniel Thayer
15a825eb2d Fixed some warnings seen while running "make doc"
Moved the definitions of DCE_RPC::BackingState and DCE_RPC::State types
into the export block.  These types are used in the redef of the
"connection" record.
2016-11-14 14:46:53 -06:00
Daniel Thayer
5745213326 Fix minor typos in documentation of various scripts 2016-11-11 14:08:17 -06:00
Johanna Amann
c92060a8ca Merge remote-tracking branch 'origin/topic/seth/smb-auth-fixes'
* origin/topic/seth/smb-auth-fixes:
  Disable SMB2 error data parsing.
  Removed some files that aren't being used.
  Fix SMB tree connect handling.
  Fix a small issue where DCE_RPC commands were improperly being logged.
  SMB fixes and cleanup.
  Including a test for raw NTLM in SMB
  Updates for SMB auth handling from Martin van Hensbergen.

BIT-1721 #merged
2016-11-02 10:25:33 -07:00
Seth Hall
19a4376a9a Fix a small issue where DCE_RPC commands were improperly being logged. 2016-11-01 03:13:04 -04:00
Seth Hall
ff682b8c2c Merge remote-tracking branch 'origin/master' into topic/seth/smb-auth-fixes 2016-10-31 16:17:01 -04:00
Seth Hall
4f3fe047f4 SMB fixes and cleanup.
SMB error handling improved. The analyzer isn't destroyed when a problem
is encoutered anymore.  The flowbuffer in the parser is now flushed and
the analyzer is set to resync against an SMB command.  This was needed
because there is some state about open files that is kept within the
parser itself which was being destroyed and that was causing analysis
after content gaps or parse errors to be faulty.  The new mechanism
doesn't detroy the parser so parsing after gaps is improved.

DCE_RPC handling in SMB is improved in the edge case where a drive
mapping isn't seen. There is a new const named SMB::pipe_filenames
which is used as a heuristic for identifying "files" opened on named
pipe shares.  If the share mapping type isn't known and a filename
in this set is found, the share type will change to "PIPE" by
generating an event named "smb_pipe_connect_heuristic".  Reads and
writes to that file will be sent to the DCE_RPC analyzer instead of
to the files framework.

The concept of "unknown" share types has been removed due to the new
heuristic detection of share types.

Some general clean up of how the SMB cmd log is written and when.
2016-10-31 13:35:47 -04: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
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
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
fa4806d375 Update Mozilla CA list.
We now use the list from NSS 3.26
2016-08-10 09:21:46 -07: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
5fc0fc5116 Fixing tests for SMB. 2016-08-08 16:15:20 -04:00
Seth Hall
117b5c3ac7 Lots of SMB1 parsing fixes. 2016-08-08 15:36:07 -04:00
Seth Hall
ebd064de17 Add some more DCE_RPC endpoints. 2016-08-05 12:29:45 -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
Johanna Amann
11ec4903ee SSL: add support for signature_algorithms extension. 2016-07-11 15:01:59 -07:00