Commit graph

1935 commits

Author SHA1 Message Date
Johanna Amann
3669b6aa9c Merge remote-tracking branch 'origin/master' into topic/johanna/imap-starttls 2016-04-26 10:52:16 -07:00
Johanna Amann
a705b2c08d Add DNS tests for huge TLL and CAA 2016-04-25 15:43:20 -07:00
Johanna Amann
e7ec537ed5 Merge remote-tracking branch 'origin/topic/dnthayer/broker-namespace'
* origin/topic/dnthayer/broker-namespace:
  Split the broker main.bro into two scripts
  Rename the BrokerStore namespace to Broker
  Rename the BrokerComm namespace to Broker

BIT-1563 #merged
2016-04-22 16:45:09 -07:00
Johanna Amann
176bb6ef34 Merge branch 'topic/jgras/packet-header' of https://github.com/J-Gras/bro
In the merge, I changed IP.cc to use icmp6_hdr for icmpv6 instead of the
icmp* that was used in the patch. While it does not make a difference
for this case, it seems cleaner.

BIT-1570 #merged
2016-04-22 16:07:01 -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
Jan Grashoefer
3665f745ad Updated affected test case.
Fixing IP_Hdr::BuildPktHdrVal to generate an icmp_hdr record for ICMPv6
packets slightly changed the output of core/ipv6_zero_len_ah.test.
2016-04-20 00:23:11 +02:00
Jan Grashoefer
8ac92cf7ff Added test case for get_current_packet_header bif. 2016-04-20 00:05:33 +02:00
Seth Hall
b722fe4540 Merge branch 'topic/seth/file-entropy'
* topic/seth/file-entropy:
  Add a file entropy test.
  Fixing a test.
  Updated tests for file entropy analyzer.
  Update and clean up to file entropy measurement.
  First commit of file entropy analyzer.
2016-04-13 01:43:27 -04:00
Seth Hall
adcc978f14 Add a file entropy test. 2016-04-13 00:44:02 -04:00
Seth Hall
2bde8ac052 Merge remote-tracking branch 'origin/topic/seth/file-entropy' into topic/seth/file-entropy
# Conflicts:
#	testing/btest/Baseline/coverage.bare-load-baseline/canonified_loaded_scripts.log
2016-04-12 23:40:07 -04:00
Seth Hall
9d0899325a Merge remote-tracking branch 'martin/topic/fox/rfb'
* martin/topic/fox/rfb:
  Fixed issue in state machine
  Some styling tweaks
  Implement protocol confirmation
  Analyzer and bro script for RFB protocol (VNC)

* <seth> I also applied a bit of clean up to the base
  script to make it match other scripts better and
  updated tests.
2016-04-12 17:00:06 -04: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
Martin van Hensbergen
849875e8be Analyzer and bro script for RFB protocol (VNC)
This analyzer parses the Remote Frame Buffer
protocol, usually referred to as the 'VNC protocol'.

It supports several dialects (3.3, 3.7, 3.8) and
also handles the Apple Remote Desktop variant.

It will log such facts as client/server versions,
authentication method used, authentication result,
height, width and name of the shared screen.

It also includes two testcases.

Todo: Apple Remote Desktop seems to have some
bytes prepended to the screen name. This is
not interepreted correctly.
2016-04-11 10:35:00 +02:00
Daniel Thayer
cca9a6616e Split the broker main.bro into two scripts
Separate the former BrokerComm and BrokerStore portions of the script
because these files will be much larger when script wrappers for BIFs are
written.
2016-03-30 20:32:36 -05:00
Daniel Thayer
f46dfac63a Rename the BrokerStore namespace to Broker 2016-03-30 16:39:19 -05:00
Daniel Thayer
9f5c820c7b Rename the BrokerComm namespace to Broker 2016-03-30 14:31:25 -05:00
Robin Sommer
a9cb90b6f5 Adding canonifier to test. 2016-03-21 21:08:42 -07:00
Seth Hall
095e6c2787 Fixing a test. 2016-03-21 12:08:02 -04: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
Johanna Amann
cfffb6e634 Check that there is only one of read, write, create_expire 2016-03-18 12:34:26 -07:00
Jan Grashoefer
a5f4e8aafe Added &read_expire testcase for subnet tables 2016-03-17 19:53:22 +01:00
Johanna Amann
a6cb85d86a Add filter_subnet_table bif
This bif works similar to the matching_subnet bif. The difference is
that, instead of returning a vector of the subnets that match, we return
a filtered view of the original set/table only containing the changed
subnets.

This commit also fixes a small bug in TableVal::UpdateTimestamp
(ReadOperation only has to be called when LoggingAccess() is true).
2016-03-16 15:50:13 -07:00
Robin Sommer
2233521de7 Merge remote-tracking branch 'origin/topic/johanna/netcontrol'
BIT-1550 #merged

* origin/topic/johanna/netcontrol: (72 commits)
  Update baselines and news
  Move prefixtable back to all IPv6 internal handling.
  NetControl: Add functions to search for rules affecting IPs/subnets
  Add check_subnet bif that allows exact membership test for subnet tables.
  Rewrite internal handling of rules.
  Add bif that allows searching for all matching subnets in table.
  Add signaling of succesful initialization of plugins to NetControl.
  Add rule hooks to the acld plugin.
  Add new logfiles for shunting and drops to netcontrol
  Extend NetControl logging and fix bugs.
  Update OpenFlow API and events.
  small acld plugin fix
  Revert "introduce &weaken attribute"
  Fix crash when printing type of recursive structures.
  Testcase for crash when a record contains a function referencing a record.
  Rename Pacf to NetControl
  fix acld plugin to use address instead of subnet (and add functions for conversion)
  implement quarantine
  miscelaneous missing bits and pieces
  Acld implementation for Pacf - Bro side.
  ...
2016-03-11 14:29:23 -08:00
Johanna Amann
205ad0d55a Update baselines and news
Includes tiny patches to make all test succesfully pass.
2016-03-11 10:32:36 -08:00
Seth Hall
08399da6cb Files transferred over FTP were showing incorrect sizes.
The server-reported file size was being collected poorly and if
a file name had a number in it, that was reported as the file
size instead of the actual size.

A new test is included to avoid reintroducing the problem.
2016-03-11 12:56:28 -05:00
Johanna Amann
4d719ad4db Merge remote-tracking branch 'origin/master' into topic/johanna/netcontrol 2016-03-11 09:20:52 -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
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
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
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
wglodek
9ebe7b2a21 updated weird message and tests 2016-03-04 18:03:24 -05:00
Johanna Amann
c38e962030 Fix failing jenkins test (dump-events).
The problem is that with certain compilers, the order of the file hash
events is reversed (for at this moment unknown reasons).

This fix simply removes all MD5 events from the dump-events test, only
leaving the SHA1 events. This removes this condition during the test.
2016-02-17 14:12:57 -08:00
Johanna Amann
8f60974bc0 Add new logfiles for shunting and drops to netcontrol
Also fix small bugs and update baselines.
2016-02-17 12:48:16 -08:00
Robin Sommer
124531d4ae Merge remote-tracking branch 'origin/topic/johanna/stats_smb_leak'
BIT-1534 #merged

* origin/topic/johanna/stats_smb_leak:
  Fix memory leaks in stats.cc and smb.cc
2016-02-13 10:41:05 -08:00
Johanna Amann
baa3cd986c Merge branch 'master' of https://github.com/marktayl/bro
* 'master' of https://github.com/marktayl/bro:
  Better multi-space separator handling.

Also tweak multi-space separator handline some more and add test-case
triggering the new behavior.
2016-02-12 18:55:25 -08:00
Johanna Amann
a38327bd08 Extend NetControl logging and fix bugs.
Netcontrol log now includes more information; before that, it had not
quite caught up to the new capabilities (like flow modifying and
redirection, as well as mac addresses).

Furthermore, this fixes a number of bugs with cluster mode (like
duplicate events), test failures due to updates in Bro, etc.
2016-02-11 19:47:29 -08:00
Johanna Amann
9f3c0c9bb4 Update OpenFlow API and events.
Events now generally carry the unique ID of the backend that is given
during initialization; there are a few more functions and other
bugfixes.

A few netcontrol tests are still broken (mostly due to a pcap update in
msater).
2016-02-11 13:10:40 -08:00
Johanna Amann
9d1a764ef7 Merge branch 'master' of https://github.com/marktayl/bro
* 'master' of https://github.com/marktayl/bro:
  Allow IRC commands to not have parameters.

Also update test baseline.
2016-02-10 21:30:39 -08:00
Johanna Amann
107737c9a0 Fix memory leaks in stats.cc and smb.cc
No test for smb leak because I don't have anything that triggers this.
2016-02-08 15:38:09 -08:00
Johanna Amann
8913b60fd1 Add IRC leak test. 2016-02-08 14:27:58 -08:00
Johanna Amann
9cdf869456 Merge branch 'master' of https://github.com/marktayl/bro
* 'master' of https://github.com/marktayl/bro:
  Removed duplicate parameter for IRC "QUIT" event handler.

Also add a test-case that checks the output of the quit
event handler.
2016-02-08 13:02:09 -08:00
wglodek
78c0e2355c update of http btest 2016-02-07 11:26:06 -05:00
wglodek
93f52fcdd2 detect possible HTTP evasion attempts 2016-02-07 11:22:09 -05:00
Johanna Amann
eb0692106a Merge remote-tracking branch 'origin/topic/johanna/function-recursion' into topic/johanna/netcontrol 2016-02-03 14:33:02 -08:00