Commit graph

1606 commits

Author SHA1 Message Date
Johanna Amann
4f1a2c7b62 NetControl: allow reasons in remove_rule calls.
This adds the capability for the user to attach a reason when removing
or destroying a rule. The message will both be logged in netcontrol.log
and forwarded to the responsible plugins.

Addresses BIT-1655
2016-08-05 10:49:09 -07:00
Seth Hall
ebd064de17 Add some more DCE_RPC endpoints. 2016-08-05 12:29:45 -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
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
4ad5d9073a NetControl: add catch and release event when IPs are forgotten.
This adds an event that is raised once Catch & Release ceases the
block management for an IP address because the IP has not been seen in
traffic during the watch interval.

This allows users who use their own logic on the top of catch and
release know when they will have to start re-blocking the IP if it
occurs in traffic again.
2016-07-28 16:28:07 -04:00
Robin Sommer
5b73345b73 Merge remote-tracking branch 'origin/topic/johanna/bit-1181'
BIT-1181 #merged

* origin/topic/johanna/bit-1181:
  Input: Further small changes to error handling
  Add error events to input framework.
2016-07-26 14:52:27 -07:00
Johanna Amann
51b8dee70b Adjust default priority of ACTION_DROP hook.
We use -5, just like all other normal notice framework actions.
2016-07-26 13:39:40 -07:00
Johanna Amann
6b9abe85a7 Add error events to input framework.
This change introduces error events for Table and Event readers. Users
can now specify an event that is called when an info, warning, or error
is emitted by their input reader. This can, e.g., be used to raise
notices in case errors occur when reading an important input stream.

Example:

event error_event(desc: Input::TableDescription, msg: string, level: Reporter::Level)
	{
	...
	}

event bro_init()
	{
	Input::add_table([$source="a", $error_ev=error_event, ...]);
	}

For the moment, this converts all errors in the Asciiformatter into
warnings (to show that they are non-fatal) - the Reader itself also has
to throw an Error to show that a fatal error occurred and processing
will be abort.

It might be nicer to change this and require readers to mark fatal
errors as such when throwing them.

Addresses BIT-1181
2016-07-22 19:45:28 -07:00
Johanna Amann
11ec4903ee SSL: add support for signature_algorithms extension. 2016-07-11 15:01:59 -07:00
Johanna Amann
74e98565f4 Merge remote-tracking branch 'origin/topic/robin/history-rxmit'
* origin/topic/robin/history-rxmit:
  Flagging retransmissions in connection history.
  Removing ack_above_hole event.

BIT-977 #merged
2016-07-08 19:30:10 -07:00
Robin Sommer
0c080bca7a Extendign connection history field to flag when Bro flips a
connection's endpoints.

The character is '^'.

Addresses BIT-1629.
2016-07-08 14:56:52 -07:00
Robin Sommer
7e7002329c Merge remote-tracking branch 'origin/topic/seth/smb' into topic/robin/smb-merge 2016-07-07 12:07:53 -07:00
Seth Hall
d1b1a560c0 Add a DCE-RPC test. 2016-07-07 14:17:25 -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
Seth Hall
3a1a14d1c4 Now actually loading DCE-RPC's dpd.sig 2016-07-07 12:55:49 -04:00
Robin Sommer
394b16e1f2 Flagging retransmissions in connection history.
This adds a t/T letter for the first TCP payload retransmission from
originator or responder, respectively.

Addresses BIT-977.
2016-07-06 15:01:16 -07:00
Robin Sommer
09ea84bb6e Merge remote-tracking branch 'origin/topic/johanna/netcontrol-improvements'
Great work, and great documentation!

I'm getting one test failure with
scripts.base.frameworks.netcontrol.catch-and-release-cluster Going
ahead and commiting, Jenkins will show the details I assume.

BIT-1584 #merged

* origin/topic/johanna/netcontrol-improvements:
  SMTP does not need to pull in the notice framework.
  Write NetControl framework documentation.
  Use NetControl for ACTION_DROP of notice framework.
  NetControl: slightly update catch and release logging
  NetControl: fix several small logging issues
  NetControl: more catch and release logging and cluster fix
  NetControl: rewrite catch and release and small fixes.
  NetControl: find_rules_subnet works in cluster mode
  NetControl: fix acld whitelist command
  NetControl: add rule exists as state besides added and failure.
  NetControl: Suppress duplicate "plugin activated" messages.
  NetControl: make new broker plugin options accessible
  NetControl: add predicates to broker plugin
2016-06-30 17:34:44 -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
971f7e236f Fix a number of documentation building errors 2016-06-27 12:41:40 -07: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
Johanna Amann
72903c8199 Add new ciphers from RFC 7905. 2016-06-22 17:17:01 -07:00
Johanna Amann
f1267b0b94 Write NetControl framework documentation.
In the process, some of the script documentation of the NetControl
framework was also updated.
2016-06-22 16:02:48 -07:00
Johanna Amann
3b55a917ac Use NetControl for ACTION_DROP of notice framework.
So far, this action did nothing...
2016-06-22 16:01:26 -07:00
Jan Grashoefer
df5d9adfb4 Fixed insertion of nested subnets.
When inserting, existance of the given subnet is checked using exact
matching instead of longest prefix matching. Before, inserting a subnet
would have updated the subnet item, which is the longest prefix of the
inserted subnet, if present.
2016-06-22 21:14:06 +02:00
Johanna Amann
6361a0d658 Merge remote-tracking branch 'origin/master' into topic/johanna/netcontrol-improvements 2016-06-21 12:42:06 -07:00
Seth Hall
5df4775cef Merge branch 'master' of ssh://git.bro.org/bro 2016-06-21 14:07:21 -04:00
Seth Hall
e27f311059 Fix an off-by-one error when grabbing x-originating-ip header in email. 2016-06-21 13:59:01 -04:00
Robin Sommer
66e7e4be04 Merge branch 'master' of git.bro.org:bro 2016-06-18 13:32:42 -07:00
Robin Sommer
0fc7eb1358 Merge remote-tracking branch 'origin/topic/johanna/bit-1578'
One tweak: I made ts optional and set it to network_time() if not given.

BIT-1578 #merged

* origin/topic/johanna/bit-1578:
  Weird: fix potential small issue when ignoring duplicates
  Rewrite weird logging.
2016-06-18 09:55:11 -07:00
Robin Sommer
633dcab790 Merge remote-tracking branch 'origin/topic/johanna/rawleak'
BIT-1594 #merged

* origin/topic/johanna/rawleak:
  Exec: fix reader cleanup when using read_files
  Raw Writer: First step - make code more c++11-y, remove raw pointers.
2016-06-18 09:49:17 -07:00
Seth Hall
ba3214cee5 Add some documentation for modbus data types.
This also removes a field named "len" from the ModbusHeaders
record type because it's not really necessary.
2016-06-18 01:46:07 -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
Johanna Amann
e859130369 Exec: fix reader cleanup when using read_files
Wen using read_files, the Exec framework called Input::remove on the
wrong input stream: it always got called on the input stream of the
execution, not on the input stream of the current file that was being
read.

This lead to threads never being closed and file handles being kept open
until Bro is closed. This means that before this patch, every time
ActiveHTTP is used, a thread stays around and several file handles are
used.
2016-06-15 17:08:35 -07:00
Johanna Amann
85220e46aa Weird: fix potential small issue when ignoring duplicates
In all versions so far, the identifier string that was used for
comparisons might have been different from the identifier string that
was added (when certain notices are used).
2016-06-15 14:33:41 -07:00
Johanna Amann
697b2748f5 Rewrite weird logging.
This commit rewrites the way that weirds are logged and fixes a number
of issues on the way. Most prominently, flow weirds now actually log
information about the flow that they occur in (before this change, they
only logged the name of the weird, which is only marginally helpful).

Besides restructuring how weird logging works internally, weirds can now
also be generated by calling Weird::weird with the info record directly,
allowing more fine-granular passing of information. This is e.g. used
for DNS weirds, which do not have the connection record available any
more when they are generated (before data like the connection ID was
just not logged in these instances).

Addresses BIT-1578
2016-06-15 13:49:35 -07:00
Jan Grashoefer
1412de1798 Refactored FAF integration of intel framework.
File Analysis Framework related code has been moved into a separate
script. Using redefinitions of the corresponding records causes the
file-related columns to appear last.
2016-06-15 21:56:53 +02: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
7c2307e079 Move the HTTP "filename" field to "orig_filenames" and "resp_filenames"
This changes the HTTP log format slightly but shouldn't mess
up anything that anyone was doing because the old "filename"
field was never actually filled out.  Tests are updated as well.
2016-06-15 01:44:18 -04:00
Seth Hall
de7396e4a9 Add a round trip time (rtt) field to dns.log.
Updated tests as well.
2016-06-15 00:17:23 -04:00
Seth Hall
2e9491482f Add ACE archive files to the identified file types.
Addresses BIT-1609.  Thanks Stephen Hosom!
2016-06-14 22:27:09 -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