Commit graph

423 commits

Author SHA1 Message Date
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
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
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
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
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
Justin Azoff
c74218568a Ensure that the notice uid field is filled in. 2016-09-19 22:11:31 -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
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
117b5c3ac7 Lots of SMB1 parsing fixes. 2016-08-08 15:36:07 -04:00
Seth Hall
7b3ec047d0 Merge remote-tracking branch 'origin/master' into topic/seth/smb 2016-08-05 11:46:13 -04: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
Seth Hall
44496922f1 Add rename and delete events for SMB2. 2016-07-28 08:55:15 -04:00
Robin Sommer
781fdfa5ba Merge remote-tracking branch 'origin/topic/seth/smb' into topic/robin/smb-merge 2016-07-07 10:41:31 -07:00
Jan Grashoefer
a7d3f530fa Minor documentation cleanups. 2016-06-29 20:58:39 +02:00
Seth Hall
514dfc3479 Merge remote-tracking branch 'origin/master' into topic/seth/smb
# Conflicts:
#	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-06-29 09:43:31 -04:00
Seth Hall
cfe3bddd75 Fixing SMB tests again. 2016-06-28 11:03:16 -04:00
Seth Hall
91161f790c SMB test clean up and docs 2016-06-28 10:30:41 -04:00
Johanna Amann
743d4672bd SMTP does not need to pull in the notice framework.
This caused test baseline changes in one of the test: notice now ties in
netcontrol due to ACTION_DROP. Catch and release uses the new_connection
event, which was not before triggered and can cause uids to be generated
for connections that are not usually assigned uids in bare mode.
2016-06-23 13:22:16 -07:00
Seth Hall
6971a70903 Removed app-stats scripts.
Addresses BIT-1171.
2016-06-17 11:55:26 -04: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
Seth Hall
56a24bdef6 Merge remote-tracking branch 'origin/master' into topic/seth/smb
# Conflicts:
#	scripts/site/local.bro
2016-06-14 15:35:05 -04:00
Seth Hall
134d0922d5 Move the SMB analyzer out of the default load.
This also adds a note in the local.bro script about enabling
the SMB analyzer.
2016-06-14 15:34:00 -04:00
Jan Grashoefer
50cf694aae Moved link-layer addresses into endpoints.
The link-layer addresses are now part of the connection endpoints
following the originator-responder-pattern. The addresses are printed
with leading zeros. Additionally link-layer addresses are also extracted
for 802.11 plus RadioTap.
2016-06-02 01:46:26 +02:00
Robin Sommer
a2423f7d43 Adding missing script file. 2016-05-30 10:58:43 -07: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
da014e1eca Rename the reporting interval variable for stats. 2016-05-02 16:20:53 -04: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
Seth Hall
ee763381b2 Fixing default stats collection interval to every 5 minutes. 2016-01-14 16:17:41 -05:00