Commit graph

9059 commits

Author SHA1 Message Date
Johanna Amann
50b03676ea Merge branch 'topic/johanna/netcontrol' of ssh://git.bro.org/bro into topic/johanna/netcontrol 2016-03-11 09:45:33 -08:00
Johanna Amann
ad9b0fc550 Move prefixtable back to all IPv6 internal handling.
Changing that was just a bad idea and unnecessary.
2016-03-11 09:44:57 -08:00
Johanna Amann
4d719ad4db Merge remote-tracking branch 'origin/master' into topic/johanna/netcontrol 2016-03-11 09:20:52 -08:00
Robin Sommer
15c157d8ff Updating submodule(s).
[nomail]
2016-03-10 13:25:33 -08:00
Robin Sommer
3d1b5814fd Updating submodule(s).
[nomail]
2016-03-10 12:06:48 -08:00
Robin Sommer
dde52abb1a Updating submodule(s).
[nomail]
2016-03-10 12:03:34 -08:00
Johanna Amann
21c300c333 NetControl: Add functions to search for rules affecting IPs/subnets
Adds the functions

NetControl::find_rules_addr and NetControl::fund_rules_subnet

which return a vector containing all rules affecting a certain IP or
subnet.
2016-03-09 21:32:15 -08:00
Johanna Amann
692662abcc Add check_subnet bif that allows exact membership test for subnet tables.
This commit also fixes a few small bugs introduced in the last patricia
tree commit.
2016-03-09 16:52:25 -08:00
Johanna Amann
7ef431808d Rewrite internal handling of rules.
This has no user-facing changes. It makes the internal handling of rules
much easier (no crazy duplicate rules in case our rules are added to
several backends).

It also fixes several open ends and small bugs in the process.
2016-03-09 15:43:47 -08:00
Johanna Amann
562e5a9f63 Add bif that allows searching for all matching subnets in table.
Example:

global test: set[subnet] = {
	10.0.0.0/8,
	10.1.0.0/16,
	10.2.0.0/16,
	10.2.0.2/31
}

print matching_subnets(10.2.0.2/32, test);
->
[10.2.0.2/31, 10.2.0.0/16, 10.0.0.0/8]
2016-03-09 12:24:00 -08:00
Johanna Amann
41fd96b320 Fix the compile problem. Again. Now hopefully for all systems. 2016-03-09 09:23:50 -08:00
Seth Hall
9c6402bd91 More smb_files.log improvements.
- Actually get the path into the smb_files.log now.
 - When a share root is having the "create" message used on it,
   instead of giving a null file name, now give a special
   indicator of "<share_root>".
 - Update test baselines.
2016-03-09 04:49:48 -05:00
Seth Hall
ba144252cb Cut out some problematic SMB2 create parsing.
I still haven't figured out exactly how to parse create contexts
and create reqeusts are an important message type.  Right
now the create context sections are just not parsed or used.
2016-03-09 04:20:24 -05:00
Johanna Amann
42e4072673 Add signaling of succesful initialization of plugins to NetControl.
This does not really have many user-facing changes. The one big change
is that users now should initialize plugins in the

NetControl::init()

event instead of bro_init.

Once all plugins finished initializing and the NetControl framework
starts operations, the NetControl::init_done() event is raised.

Rules that are sent to NetControl before the plugins have finished
initializing are ignored - this is important when several plugins that
require external connections have to be initialized at the beginning.
Without this delay, rules could end up at the wrong plugin.
2016-03-08 14:49:22 -08:00
Johanna Amann
d9459fc59a Add rule hooks to the acld plugin.
The hook name is NetControl::acld_rule_policy and allows the
modification of acld rules before they are sent out to the network.

This allows, e.g. network policies to use nullzero instead of drop in
certain circumstances.
2016-03-08 11:25:15 -08:00
Johanna Amann
4476638d0e Fix compile problem on os-x (usage of min) 2016-03-08 09:57:22 -08:00
Seth Hall
ad5f74b163 Fix a with missing default cases in NTLM case switches.
This prevents some reporter messages since there are
clearly things being seen on the wire that don't fit
into the message types being handled.
2016-03-08 11:31:53 -05:00
Seth Hall
e8064ff189 Whitespace cleanup to the NTLM SSP file. 2016-03-08 11:30:58 -05:00
Seth Hall
90559a3372 Disabled the attempt at support for the SMB2 SetInfo message.
It was causing reporter warnings and was so wildly incomplete
that it provided no benefit.
2016-03-08 11:28:32 -05:00
Robin Sommer
236acd683c Merge branch 'master' of git.bro.org:bro 2016-03-08 08:04:29 -08:00
Johanna Amann
6c0165b090 Commit correct version of conn.log.
Sorry, I mistakenly committed the one triggering the bug, after testing
both of them for a bit.
2016-03-08 07:45:16 -08:00
Robin Sommer
d8adcae3ba Merge branch 'master' of git.bro.org:bro 2016-03-08 07:38:49 -08:00
Robin Sommer
5b120784c5 Merge remote-tracking branch 'origin/topic/johanna/str-functions'
Incudes tiny tweak to double-check memchr length parameter.

BIT-1546 #merged

* origin/topic/johanna/str-functions:
  Fix typo in previous string function replacement commit
  Remove old string functions.
2016-03-08 07:15:26 -08:00
Johanna Amann
69b62be5d4 Merge remote-tracking branch 'origin/master' into topic/johanna/netcontrol 2016-03-07 14:59:25 -08:00
Johanna Amann
f89874b9e9 Merge branch 'patch-4' of https://github.com/aeppert/bro
* 'patch-4' of https://github.com/aeppert/bro:
  (BIT-1545) Add "disable_analyzer_after_detection" en lieu of "skip_processing_after_detection"

I also removed the old disable_analyzer_after_detection option
completely - if someone wants that, they can just catch the event
themselves and call skip_further_processing.

I also adjusted the ssh test case to contain conn.log to prevent
re-addition of this problem in the future.

BIT-1545 #merged
2016-03-07 13:39:28 -08:00
Johanna Amann
642542ab17 Merge branch 'topic/http-evasion' of https://github.com/0xcc-labs/bro
* 'topic/http-evasion' of https://github.com/0xcc-labs/bro:
  updated weird message and tests
  update of http btest
  detect possible HTTP evasion attempts
2016-03-07 13:09:56 -08:00
Seth Hall
c63ad1cdcf Add a signature for SMB 2016-03-07 16:03:31 -05:00
Johanna Amann
9a66527823 Update Changes
[nomail]
2016-03-07 12:43:45 -08:00
Seth Hall
6e842cf4da Fix a problem I introduced with SMB2 file handling.
- Added an SMB2 test that encompasses the problem.
2016-03-07 15:36:25 -05:00
Seth Hall
21d8cab0c0 First SMB test. 2016-03-07 13:50:25 -05:00
Seth Hall
c8818da09a Fix a bug that resulted in recursion in the type system.
- There is a bit of other minor reorganization cleanup here too.
2016-03-07 13:50:12 -05:00
Seth Hall
b58ee68c11 Removed a vestigial SMB file. 2016-03-07 11:20:50 -05:00
Seth Hall
12a8b8e5db Fix and clean up the DCE_RPC analyzer a bit and probably broke it in some way. 2016-03-07 11:18:22 -05:00
Seth Hall
ca58dc84d5 Create an smb_auth.log.
- Brings the SMB NTLM support all the way to a log.
 - Only support SMB1 right now.
 - A bit more clean up of logged file actions and code organization.
2016-03-07 11:17:51 -05:00
Seth Hall
481335e5ea Fixing problems in the RPC-DCE handling in SMB.
- Renamed some fields to make everything clearer.
 - Fixed some more indentation problems.
 - Added the dce_rpc-protocol.pac files to the cmake list
   so that changes in it cause the smb analyzer to be rebuilt.
2016-03-07 10:07:02 -05:00
Aaron Eppert
c93b057a97 (BIT-1545) Add "disable_analyzer_after_detection" en lieu of "skip_processing_after_detection"
The default of "skip_processing_after_detection" is confusing and causes conn.log to not be written as one would assume, plus the counters are not incremented and thus some kinds of potential detections are short-changed. I propose adding "disable_analyzer_after_detection" which would react, on the surface, the same way by disabling the SSH analyzer, but allowing conn.log to be written appropriately.
2016-03-05 11:59:52 -05:00
Robin Sommer
8cf5cbdbcf Updating submodule(s).
[nomail]
2016-03-04 20:35:06 -08:00
wglodek
9ebe7b2a21 updated weird message and tests 2016-03-04 18:03:24 -05:00
Robin Sommer
56798d6a6c Updating submodule(s).
[nomail]
2016-03-04 12:52:05 -08:00
Robin Sommer
154a5f1f7f Updating submodule(s).
[nomail]
2016-03-04 12:40:14 -08:00
Robin Sommer
484ce148f4 Merge remote-tracking branch 'origin/topic/johanna/openssl'
BIT-1537 #merged

* origin/topic/johanna/openssl:
  Also update configure for the new openssl cmake script.
2016-03-04 12:39:17 -08:00
Johanna Amann
9df5a36a5c Fix typo in previous string function replacement commit 2016-03-04 12:14:14 -08:00
Johanna Amann
446a44787a Remove old string functions.
More specifically, this removes the functions:
strcasecmp_n
strchr_n
strrchr_n

and replaces the calls with the respective C-library calls that should
be part of just about all operating systems by now.
2016-03-04 12:02:19 -08:00
Johanna Amann
9a09039c08 Also update configure for the new openssl cmake script. 2016-03-04 11:18:27 -08:00
Robin Sommer
4a88a85833 Updating submodule(s). 2016-03-04 08:25:40 -08:00
Robin Sommer
c916072e4c Merge remote-tracking branch 'origin/topic/johanna/freebsd9'
BIT-1542 #merged

* origin/topic/johanna/freebsd9:
  More detailed installation instructions for FreeBSD 9.X
2016-03-03 21:34:41 -08:00
Seth Hall
1b98e3bb24 Fix SMB1 file handling.
File data wasn't being forwarded to the file analysis framework
correctly.
2016-03-03 16:33:58 -05:00
Seth Hall
462316acdf Prevent some extra smb logging of cmd messages. 2016-03-03 16:33:29 -05:00
Seth Hall
b9afc01d91 Fixed a problem with file names and path names containing nulls.
This would come up when a string is UTF-16 containing characters
outside of straight ASCII.  The file analysis framework uses
CheckString to create file IDs which can't cope with the NULL bytes.
2016-03-03 15:52:34 -05:00
Seth Hall
e02c612742 Fix some SMB1 "field missing" expression errors. 2016-03-03 15:31:26 -05:00