Commit graph

146 commits

Author SHA1 Message Date
Liang Zhu
cea1b62a9a small bug fix 2015-07-21 23:38:56 -07:00
Liang Zhu
462f6608a8 log the time for server first encrypted application data 2015-07-21 14:44:33 -07:00
Liang Zhu
5f2cb840d7 add user_agent to ocsp-to-match log 2015-07-20 16:55:19 -07:00
Liang Zhu
fa654121ec fix url parsing bug 2015-07-20 15:46:21 -07:00
Liang Zhu
4e8d15d8d1 small bug fix 2015-07-18 01:53:28 -07:00
Liang Zhu
0c3b03ac8d log original uri and fix GET url parsing 2015-07-18 01:06:31 -07:00
Liang Zhu
6c9b49a5d7 fix a bug for ocsp-ssl-split.bro 2015-07-17 16:00:18 -07:00
Liang Zhu
cb0aa7725e fix a few bug for logging 2015-07-16 18:20:57 -07:00
Liang Zhu
f0c642cd25 update logging for ocsp and baseline 2015-07-15 13:31:41 -07:00
Liang Zhu
1f5a7aecbc change log schema for ocsp-ssl-split.bro 2015-07-13 15:23:56 -07:00
Liang Zhu
9553c8aefc separated logging for ocsp and ssl 2015-07-12 13:52:26 -07:00
Liang Zhu
406fec9ef4 potentially fix a memory problem ocsp-measurement 2015-07-09 11:56:58 -07:00
Liang Zhu
6947387522 add status_type to ocsp stapling log 2015-07-08 14:21:53 -07:00
Liang Zhu
545848d906 add parameter 'status_type' to event ssl_stapled_ocsp 2015-07-08 14:11:14 -07:00
Liang Zhu
e2c30f0005 record more timestamp for ocsp measurement 2015-07-06 17:52:13 -07:00
Liang Zhu
8844d344af add connection in ocsp log 2015-07-02 17:46:43 -07:00
Liang Zhu
386a5b811d add optional logging for parsed ocsp stapling message 2015-07-02 14:23:38 -07:00
Liang Zhu
2743966fcc add a script to combine ocsp with ssl 2015-07-01 17:00:41 -07:00
Jon Siwek
186e67ec1d Allow logging filters to inherit default path from stream.
This allows the path for the default filter to be specified explicitly
when creating a stream and reduces the need to rely on the default path
function to magically supply the path.

The default path function is now only used if, when a filter is added to
a stream, it has neither a path nor a path function already.

Adapted the existing Log::create_stream calls to explicitly specify a
path value.

Addresses BIT-1324
2015-03-19 14:49:55 -05:00
Robin Sommer
0cfe431f15 Merge remote-tracking branch 'origin/topic/johanna/cert-validation'
* origin/topic/johanna/cert-validation:
  and still use the hash for notice suppression.
  add knob to revert to old validation behavior
  Update certificate validation script - new version will cache valid intermediate chains that it encounters on the wire and use those to try to validate chains that might be missing intermediate certificates.

BIT-1332 #merged
2015-03-17 09:09:54 -07:00
Johanna Amann
d208c95e9a and still use the hash for notice suppression. 2015-03-09 12:56:55 -07:00
Johanna Amann
144302d3e7 add knob to revert to old validation behavior 2015-03-09 12:53:29 -07:00
Johanna Amann
6ab5701ad0 Update certificate validation script - new version will cache valid
intermediate chains that it encounters on the wire and use those to try
to validate chains that might be missing intermediate certificates.

This vastly improves the number of certificates that Bro can validate.
The only drawback is that now validation behavior is not entirely
predictable anymore - the certificate of a server can fail to validate
when Bro just started up (due to the intermediate missing), and succeed
later, when the intermediate can be found in the cache.

Has been tested on big-ish clusters and should not introduce any
performance problems.
2015-03-09 12:46:33 -07:00
Robin Sommer
07222bb107 Merge remote-tracking branch 'origin/topic/johanna/ssl-policy'
* origin/topic/johanna/ssl-policy:
  Extend the weak-keys policy file to also alert when encountering ssl connections with old versions as well as unsafe cipher suites.

BIT-1321 #merged
2015-03-02 17:19:00 -08:00
Johanna Amann
897351f87e Extend the weak-keys policy file to also alert when encountering
ssl connections with old versions as well as unsafe cipher suites.

Also make the notice suppression handling of other ssl policy files
a tad more robust.
2015-02-25 13:57:04 -08:00
Robin Sommer
f82adb724c Merge remote-tracking branch 'origin/topic/jsiwek/deprecation'
Fixing one missing index adjustment (I believe ...)

BIT-757 #merged

* origin/topic/jsiwek/deprecation:
  Fix typo.
  Update documentation (broken links, outdated tests).
  Update NEWS for deprecated/changed functions.
  Deprecate split* family of BIFs.
  Improve use of &deprecated on functions.
  Add a new attribute: &deprecated.
2015-01-30 14:37:05 -08:00
Jon Siwek
23f04835c6 Deprecate split* family of BIFs.
These functions are now deprecated in favor of alternative versions that
return a vector of strings rather than a table of strings.

Deprecated functions:

- split: use split_string instead.
- split1: use split_string1 instead.
- split_all: use split_string_all instead.
- split_n: use split_string_n instead.
- cat_string_array: see join_string_vec instead.
- cat_string_array_n: see join_string_vec instead.
- join_string_array: see join_string_vec instead.
- sort_string_array: use sort instead instead.
- find_ip_addresses: use extract_ip_addresses instead.

Changed functions:

- has_valid_octets: uses a string_vec parameter instead of string_array.

Addresses BIT-924, BIT-757.
2015-01-21 15:34:42 -06:00
Johanna Amann
f99bc98800 for dh key exchanges, use p as the parameter for weak key exchanges.
Y can be a few bytes smaller due to the modulo operation - this is ok.
2014-11-17 09:51:47 -08:00
Johanna Amann
33053cca3a Mark everything below 2048 bit as a weak key (Browsers will stop
accepting 1024 bits soon, so we can be of that opinion too).

Also - fix notice suppression. :/
2014-08-08 09:26:11 -07:00
Bernhard Amann
005b7d60c9 re-add notice suppression for expiring certificates 2014-06-06 12:15:38 -07:00
Jon Siwek
7211d73ee6 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  last ssl fixes - missed three more.
  and more tiny ssl script fixes
  a few more small fixes for chains containing broken certs.
  fix expression errors in x509 policy scrips when unparseable data is in certificate chain.
2014-05-21 15:59:26 -05:00
Bernhard Amann
cb2eb0228b last ssl fixes - missed three more.
This is the last one, I promise.
2014-05-21 11:24:47 -07:00
Bernhard Amann
9a8fc7a47d and more tiny ssl script fixes 2014-05-21 11:16:24 -07:00
Bernhard Amann
ff00c0786a a few more small fixes for chains containing broken certs. 2014-05-21 11:01:33 -07:00
Bernhard Amann
b16322aefb fix expression errors in x509 policy scrips when unparseable data is in certificate chain. 2014-05-21 10:50:31 -07:00
Robin Sommer
ed4cd9352a Merge remote-tracking branch 'origin/topic/bernhard/even-more-ssl-changes'
Good stuff! (but I admit I didn't look at the OpenSSL code too closely :)

* origin/topic/bernhard/even-more-ssl-changes:
  small test update & script fix
  update baselines & add ocsp leak check
  Add policy script adding ocsp validation to ssl.log
  Implement verification of OCSP replies.
  Add tls flag to smtp.log. Will be set if a connection switched to startls.
  add starttls support for pop3
  Add smtp starttls support
  Replace errors when parsing x509 certs with weirds (as requested by Seth).
  move tls content types from heartbleed to consts.bro. Seems better to put them there...
  Add new features from other branch to the heartbleed-detector (and clean them up).
  Let TLS analyzer fail better when no longer in sync with the data stream. The version field in each record-layer packet is now re-checked.

BIT-1190 #merged

Conflicts:
	testing/btest/Baseline/scripts.policy.misc.dump-events/all-events.log
	testing/btest/Baseline/scripts.policy.misc.dump-events/smtp-events.log
2014-05-16 14:45:25 -07:00
Bernhard Amann
e749f17821 small test update & script fix 2014-05-16 11:29:47 -07:00
Bernhard Amann
d9e7ac6e92 Add policy script adding ocsp validation to ssl.log 2014-05-16 11:21:26 -07:00
Bernhard Amann
5bd0c3fcaf move tls content types from heartbleed to consts.bro. Seems better to put them there... 2014-05-14 15:45:47 -07:00
Bernhard Amann
f0b244b8b0 Add new features from other branch to the heartbleed-detector (and clean them up).
We should now quite reliably detect scans/attacks, even when encrypted and not succesful.
2014-05-14 15:42:27 -07:00
Robin Sommer
8d1b47fae6 Merge remote-tracking branch 'origin/topic/bernhard/ec-curve'
BIT-1189 #merged

* origin/topic/bernhard/ec-curve:
  fix broxygen errors
  Polish changes for ecdhe/dhe
  Add DH support to SSL analyzer.
  Add a few more ciphers Bro did not know at all so far.
  Forgot a few ciphers in the EC list...
  Log chosen curve when using ec cipher suite in TLS.
2014-05-01 20:52:50 -07:00
Robin Sommer
eed94fab76 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Correct a notice for heartbleed. The notice is thrown correctly, just the message conteined wrong values.
  Improve/standardize some malloc/realloc return val checks.
  Improve file analysis manager shutdown/cleanup.
2014-05-01 09:30:31 -07:00
Bernhard Amann
636262d865 Correct a notice for heartbleed. The notice is thrown correctly, just the message
conteined wrong values.
2014-04-30 12:35:09 -07:00
Bernhard Amann
7d0e5067c7 fix broxygen errors 2014-04-27 16:25:32 -07:00
Bernhard Amann
ef5b021e77 Polish changes for ecdhe/dhe 2014-04-27 00:15:49 -07:00
Bernhard Amann
fb56b22cff Add DH support to SSL analyzer.
When using DHE or DH-Anon, sever key parameters are now available
in scriptland.

Also add script to alert on weak certificate keys or weak dh-params.
2014-04-26 23:52:51 -07:00
Robin Sommer
201fc7b25a Merge remote-tracking branch 'origin/topic/bernhard/ssl-analyzer'
* origin/topic/bernhard/ssl-analyzer:
  Fix a few failing tests
  Add very basic ocsp stapling support.
  Add documentation, consts and tests for the new events.
  Support parsing of several TLS extensions.
  Make SSL/TLS version detection less brittle.
  Nicer notices for heartbleed.
  rip out state handline from ssl analyzer.
  enable detection of encrypted heartbleeds.
  also extract payload data in ssl_heartbeat
  add to local.bro, add disclaimer
  make tls heartbeat messages a bit better.
  fix tabs.
  polish script and probably detect encrypted attacks too.
  detect and alert on simple case of heartbleed
  default to TLS when not being able to determine version
  add is_orig to heartbeat event
  Throw new event for heartbeat messages.

BIT-1178 #merged
2014-04-24 17:04:56 -07:00
Bernhard Amann
3d22692b6e Fix a few failing tests 2014-04-24 14:45:06 -07:00
Bernhard Amann
9b7eb293f1 Add documentation, consts and tests for the new events.
This also fixes the heartbleed detector to work for encrypted attacks in this
branch again. It stopped working, because the SSL analyzer now successfully detects
established connections, and the scripts usually disable analyzing after that.

(The heartbeat branch should not have been affected)
2014-04-24 12:05:30 -07:00
Bernhard Amann
ef41cc7189 Nicer notices for heartbleed.
Duplicates are now excluded and the notice texts contain a bit more useful information.
2014-04-16 10:48:22 -07:00