Commit graph

128 commits

Author SHA1 Message Date
Seth Hall
205a28bad8 Updated Windows version detection to include Windows 10
Thanks to Fatema Bannatwala for finding it and Keith Lehigh
and Mike Patterson for verifying.
2017-02-21 15:06:39 -05:00
Robin Sommer
e9b0639ccb Adding missing '@load ./pubkey-hashes' to policy/frameworks/intel/seen. 2016-11-14 17:59:58 -08:00
Daniel Thayer
5745213326 Fix minor typos in documentation of various scripts 2016-11-11 14:08:17 -06: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
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
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
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
Jan Grashoefer
a7d3f530fa Minor documentation cleanups. 2016-06-29 20:58:39 +02:00
Seth Hall
f5a689a760 Switch the MIME fields in smtp.log back to showing what's actually given.
- SMTP protocol headers now do some minimal parsing to clean up
   email addresses.
 - New function named split_mime_email_addresses to take MIME headers
   and get addresses split apart but including the display name.
 - Update tests.
2016-06-16 16:40:52 -04:00
Jan Grashoefer
5d340e669c Added expiration for intelligence items.
Expiration of intelligence items can be configured using
Intel::item_expiration. Expiration can be handled using the
Intel::item_expired hook.
2016-06-15 19:29:48 +02:00
Jan Grashoefer
7e0b5b4ba4 Merge branch 'master' into topic/jgras/intel-update 2016-06-15 19:26:26 +02:00
Seth Hall
6bc7c3f1be Merge remote-tracking branch 'origin/master' into J-Gras-topic/jgras/bit-1507
# Conflicts:
#	testing/btest/Baseline/coverage.default-load-baseline/canonified_loaded_scripts.log
2016-06-15 10:32:46 -04:00
Seth Hall
d89ee3cee0 Change the meaning of some email fields.
We now extract email addresses in the fields that one would expect
to contain addresses.  This makes further downstream processing of
these fields easier like log analysis or using these fields in the
Intel framework.  The primary downside is that any other content
in these fields is no longer available such as full name and any
group information.  I believe the simplification of the content in
these fields is worth the change.

Added "cc" to the script that feeds information from SMTP into the
Intel framework.

A new script for email handling utility functions has been created
as a side effect of these changes.
2016-06-15 10:32:06 -04:00
Jan Grashoefer
a9ad41cdcc Improved intel notices.
Intel notices are identified by a direction independent 3-tuple
(indicator, originator IP, responder IP). This allows notice
suppression. Additionally service and intel source are added to the
notice mail.
2016-05-29 00:57:29 +02:00
Robin Sommer
e2dee49fc1 Fixing control frameworks net_stats and peer_status commands.
Turns out the code implementing them went missing with the recent
merge of the stats changes.

For peer status, I removed most of the numbers that the code used to
return because (1) we don't have access to that data anymore, and (2)
even in 2.4 the numbers returned already didn't make sense (because
they were global values, not per peer). We could consider just
removing the peer_status command at all.
2016-05-17 16:11:22 -07:00
Jan Grashoefer
cb33028702 Added hook to allow extending the intel log.
The extension mechanism is basically the one that Seth introduced with
his intel extensions. The main difference lies in using a hook instead
of an event. An example policy implements whitelisting.
2016-05-11 23:59:46 +02:00
Robin Sommer
00d94f1bbc Merge remote-tracking branch 'origin/topic/seth/stats-improvement'
(Cleaned up some code a little bit.)

* origin/topic/seth/stats-improvement:
  Fixing tests for stats improvements
  Rename the reporting interval variable for stats.
  Removing more broken functionality due to changed stats apis.
  Removing some references to resource_usage()
  Removing Broker stats, it was broken and incomplete.
  Fixing default stats collection interval to every 5 minutes.
  Add DNS stats to the stats.log
  Small stats script tweaks and beginning broker stats.
  Continued stats cleanup and extension.
  More stats collection extensions.
  More stats improvements
  Slight change to Mach API for collecting memory usage.
  Fixing some small mistakes.
  Updating the cmake submodule for the stats updates.
  Fix memory usage collection on Mac OS X.
  Cleaned up stats collection.

BIT-1581 #merged
2016-05-07 11:51:35 -07:00
Robin Sommer
209c8936d1 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix a few incorrect type tags in Bro broker source code
  Update docs and tests of the fmt() function
  Revert "Fix RFB analyzer to build on FreeBSD"
  Fix RFB analyzer to build on FreeBSD
2016-05-03 11:36:52 -07:00
Seth Hall
d9d579c52c Merge remote-tracking branch 'origin/master' into topic/seth/stats-improvement 2016-05-02 14:34:29 -04:00
Johanna Amann
41606e18fb Intel: Allow to provide uid/fuid instead of conn/f.
This patch allows users to provide the fuid or the connection id
directly, in case they do not have access to either in the event that
they handle.

An example for this is the handling of certificates in SSL, where the
fa_file record cannot be retained because this would create a cyclic
data structure.

This patch also provides file IDs for hostname matches in certificates,
which was not possible with the previous API.
2016-04-25 16:54:47 -07:00
Robin Sommer
efde4a74b0 Merge remote-tracking branch 'origin/topic/johanna/intel-cert-hash'
BIT-1567 #merged

* origin/topic/johanna/intel-cert-hash:
  Intel: CERT_HASH indicator type was never checked
2016-04-22 08:37:14 -07:00
Johanna Amann
00e759b44c Intel: CERT_HASH indicator type was never checked
Hence, when people specify data of type CERT_HASH in their intel source
files, it will never trigger an alert.
2016-04-11 15:50:55 +02:00
Seth Hall
89b4d79f93 Merge remote-tracking branch 'origin/master' into topic/seth/file-entropy
# Conflicts:
#	scripts/test-all-policy.bro
#	testing/btest/Baseline/coverage.default-load-baseline/canonified_loaded_scripts.log
2016-03-21 11:39:15 -04:00
Seth Hall
2509f79a10 Merge branch 'topic/jgras/bit-1507' of https://github.com/J-Gras/bro into J-Gras-topic/jgras/bit-1507 2016-01-21 10:45:42 -05:00
Jan Grashoefer
d819692204 Fixed matching mail address intel
Addresses BIT-1507.
2016-01-19 00:09:03 +01:00
Seth Hall
41a181d98d Removing more broken functionality due to changed stats apis. 2016-01-14 21:22:09 -05:00
Seth Hall
53db5d1711 Removing some references to resource_usage() 2016-01-14 17:09:55 -05:00
Aaron Eppert
5d1ed9c134 Update windows-version-detection.bro
mscrl.microsoft.com is the proper hostname, however to be safe, let's use regex to identify it.
2015-12-04 09:46:14 -05:00
Daniel Thayer
5ba8610681 Correct a typo in controller.bro documentation 2015-10-21 12:48:35 -05:00
Richard van den Berg
aa8f56c2bd hash-all-files.bro depends on base/files/hash 2015-09-11 13:01:43 +02:00
Vlad Grigorescu
092a78d14b Merge remote-tracking branch 'origin/master' into topic/vladg/ssh 2015-03-17 12:36:30 -04:00
Vlad Grigorescu
0cffee7694 SSH: Intel framework integration (PUBKEY_HASH) 2015-03-17 12:33:09 -04:00
Jon Siwek
0b957cbe75 Include timestamp in default extracted file names.
And add a policy script to extract all files.

BIT-1335 #close
2015-03-13 14:25:30 -05:00
Robin Sommer
0cc3e574f0 Merge remote-tracking branch 'origin/topic/johanna/x509-cn'
* origin/topic/johanna/x509-cn:
  Use our new features to send the CN and SAN fields of certificates to the intel framework.
  Do not log common name by default (it is most interesting for scripts) and add a test case.
  extract most specific common name from certificates

BIT-1323 #merged
2015-03-04 12:31:34 -08:00
Johanna Amann
946f19fb9d Use our new features to send the CN and SAN fields of certificates to
the intel framework.
2015-03-03 17:15:24 -08:00
Seth Hall
9c692bad39 Update and clean up to file entropy measurement.
- Updated to newer file analyzer api.
2015-02-03 15:04:36 -05:00
Seth Hall
b81510592a Merge remote-tracking branch 'origin/master' into topic/seth/file-entropy 2015-02-03 14:19:57 -05:00
Seth Hall
8e53e719f3 Merge remote-tracking branch 'origin/master' into topic/seth/file-entropy 2015-01-30 00:52:41 -05: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
Jon Siwek
edaf7edc11 Merge remote-tracking branch 'origin/topic/seth/files-reassembly-and-mime-updates' into topic/jsiwek/file-reassembly-merge
Conflicts:
	testing/btest/Baseline/scripts.policy.misc.dump-events/all-events.log
2014-12-15 10:33:09 -06:00
Michal Purzynski
ebb2240e97 Update windows-version-detection.bro 2014-11-27 19:41:20 +01:00
Seth Hall
7a52b8eb56 Merge remote-tracking branch 'origin/topic/vladg/cryptoapi'
* origin/topic/vladg/cryptoapi:
  Add Windows detection based on CryptoAPI HTTP traffic as a software framework policy script.
2014-11-05 09:47:17 -05:00
Vlad Grigorescu
d600d41a55 Add Windows detection based on CryptoAPI HTTP traffic as a software framework policy script. 2014-11-03 13:52:58 -05:00
Seth Hall
cafd35e746 Updates the files event api and brings file reassembly up to master. 2014-09-26 00:40:37 -04:00
Bernhard Amann
1253b7cb8a intel framework plugin for ssl server_name extension was not updated after api changes :(
Thank you Justin.
2014-05-20 08:33:44 -07:00
Robin Sommer
b029d18336 Merge branch 'topic/mareq/quoted-printable' of https://github.com/mareq/bro
Thanks!

Merged https://github.com/bro/bro/pull/7
2014-04-24 18:38:43 -07:00
jshlbrd
b43c2c347b Update http-headers.bro 2014-04-15 09:15:57 -04:00
jshlbrd
9083b03bd6 Update http-headers.bro 2014-04-15 09:12:09 -04:00
jshlbrd
85bbc39194 Update http-headers.bro 2014-04-15 09:10:38 -04:00