Commit graph

394 commits

Author SHA1 Message Date
Seth Hall
0d04557ac4 New script to add a field to rdp.log when the connection is upgraded to SSL. 2015-03-04 14:50:41 -05: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
Robin Sommer
3868cbd88e Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  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-18 10:53:38 -08: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
Robin Sommer
e8e81043a1 Merge remote-tracking branch 'origin/topic/vladg/mysql'
* origin/topic/vladg/mysql:
  Update baselines.
  Fix a logic bug with handling quits after the cleanup.
  Integrate MySQL with the software framework
  A bit of MySQL cleanup - removed unused events, consolidated similar events, fixed up main.bro a bit
  Move MySQL analyzer to the new plugin architecture.
  Add a btest for the Wireshark sample MySQL PCAP
  Add support for more commands, and support quit
  Redo the response handling..
  Whitespace/readability fixes.
  Add memleak and auth btests.
  Update baselines.
  Get MySQL to compile and add basic v9 support.
  MySQL analyzer
2014-11-11 11:49:26 -08:00
Vlad Grigorescu
119ad59b70 Integrate MySQL with the software framework 2014-10-31 12:17:47 -04: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
Bernhard Amann
4405121fb2 Merge branch 'fastpath' into topic/bernhard/heartbeat 2014-04-10 08:13:29 -07:00
Jon Siwek
d4ef9f3693 Fix missing @load dependencies in some scripts.
And update the unit test which is supposed to catch such errors.
2014-04-09 16:32:23 -05:00
Bernhard Amann
2414aaf4bb enable detection of encrypted heartbleeds. 2014-04-08 21:57:37 -07:00
Bernhard Amann
2942a26280 also extract payload data in ssl_heartbeat 2014-04-08 12:44:51 -07:00
Bernhard Amann
f2c2da92c6 add to local.bro, add disclaimer 2014-04-08 11:53:01 -07:00
Bernhard Amann
cb87f834f9 make tls heartbeat messages a bit better. 2014-04-08 11:40:48 -07:00
Bernhard Amann
4d33bdbb1e fix tabs. 2014-04-08 11:28:13 -07:00
Bernhard Amann
c41810a337 polish script and probably detect encrypted attacks too. 2014-04-08 11:19:30 -07:00
Bernhard Amann
335a30b08f detect and alert on simple case of heartbleed 2014-04-08 11:03:12 -07:00
Bernhard Amann
b32c7c7a88 Add policy script to suppress non host-certificate logging in x509.log
Addresses BIT-1150
2014-03-19 21:32:01 -07:00
Bernhard Amann
4da0718511 Finishing touches of the x509 file analyzer.
Mostly baseline updates and new tests.

addresses BIT-953, BIT-760, BIT-1150
2014-03-13 15:21:30 -07:00
Bernhard Amann
7eb6b5133e Fix circular reference problem and a few other small things.
SSL::Info now holds a reference to Files::Info instead of the
fa_files record.

Everything should work now, if everyone thinks that the interface is
ok I will update the test baselines in a bit.

addresses BIT-953, BIT-760
2014-03-04 05:30:32 -08:00
Bernhard Amann
110d9fbd6a X509 file analyzer nearly done. Verification and most other policy scripts
work fine now.

Todo:
 * update all baselines
 * fix the circular reference to the fa_file structure I introduced :)
   Sadly this does not seem to be entirely straightforward.

addresses BIT-953, BIT-760
2014-03-03 17:07:50 -08:00
Jon Siwek
c61dfb1963 Rewrite DNS state tracking which matches queries and replies.
The previous method of matching queries with replies was still
unreliable in cases where the reply contains no answers.  The new code
also takes extra measures to avoid pending state growing too large in
cases where the condition to match a query with a corresponding reply is
never met, but yet DNS messages continue to be exchanged over the same
connection 5-tuple (preventing cleanup of the pending state).
2014-01-30 17:21:01 -06:00
Jon Siwek
31866f8f59 Change dns.log to include only standard DNS queries.
The scope of dns.log is now only standard queries (OPCODE == 0).  Other
kinds of queries (e.g. inverse query) were not handled correctly and
could interfere with the state tracking of the default DNS scripts.
2014-01-28 13:56:22 -06:00
Justin Azoff
cbe48258f6 fix the caching of recently validated certs
The recently_validated_certs table was being checked for entries, but
missing hashes were not being added to it after validation.
2013-12-10 11:27:19 -05:00
Vlad Grigorescu
2cf90d986e Fix resp_size in ssh.log, require a minimum resp_size for the heuristic. Some work on geodata, but still a WIP. 2013-11-05 11:34:32 -05:00
Daniel Thayer
9374a7d584 Fix typos and formatting in the policy/protocols docs
Also updated a test related to these changes, and adjusted line numbers.
2013-10-21 02:34:28 -05:00
Daniel Thayer
9d2668a3f4 Fix incorrect uses of reST directives
These did not generate any warning messages unfortunately, so had to
find them using grep.
2013-10-17 01:50:42 -05:00