Commit graph

943 commits

Author SHA1 Message Date
Robin Sommer
1e40a2f88c Merge remote-tracking branch 'origin/topic/seth/metrics-merge'
* origin/topic/seth/metrics-merge: (70 commits)
  Added protocol to the traceroute detection script.
  Added an automatic state limiter for threshold based SumStats.
  Removed some dead code in scan.bro
  Renamed a plugin hook in sumstats framework.
  Move loading variance back to where it should be alphabetically.
  Fix a bug with path building in FTP.  Came up when changing the path utils.
  Fix a few tests.
  SumStats test checkpoint.
  SumStats tests pass.
  Checkpoint for SumStats rename.
  Fix another occasional reporter error.
  Small updates to hopefully correct reporter errors leading to lost memory.
  Trying to fix a state maintenance issue.
  Updating DocSourcesList
  Updated FTP bruteforce detection and a few other small changes.
  Test updates and cleanup.
  Fixed the measurement "sample" plugin.
  Fix path compression to include removing "/./".
  Removed the example metrics scripts. Better real world examples exist now.
  Measurement framework is ready for testing.
  ...
2013-04-28 13:21:46 -07:00
Seth Hall
4bddcd2379 Fixed a bug in the vulnerable software script and added a test. 2013-04-25 14:56:14 -04:00
Robin Sommer
e986247ff2 Merge remote-tracking branch 'origin/topic/jsiwek/974'
Closes #974.

* origin/topic/jsiwek/974:
  Fix schedule statements used outside event handlers (addresses #974).
2013-04-23 20:38:21 -07:00
Robin Sommer
f6f00924fc Merge remote-tracking branch 'origin/topic/jsiwek/973'
Closes #973.

* origin/topic/jsiwek/973:
  Fix record coercion for default inner record fields (addresses #973).
2013-04-23 20:37:08 -07:00
Robin Sommer
71591d706e Small tweaks for bytestring_to_count().
Closes #968.
2013-04-23 20:32:57 -07:00
Yun Zheng Hu
3fff71b37a Add bytestring_to_count function to bro.bif 2013-04-23 20:18:38 -07:00
Jon Siwek
7069f679c3 Fix record coercion for default inner record fields (addresses #973). 2013-04-23 09:57:55 -05:00
Seth Hall
60605412ab Fix a few tests. 2013-04-22 14:14:50 -04:00
Jon Siwek
fa30d4a313 Fix schedule statements used outside event handlers (addresses #974). 2013-04-22 13:00:44 -05:00
Seth Hall
1cac89e4f8 SumStats test checkpoint. 2013-04-16 00:54:41 -04:00
Seth Hall
437815454d SumStats tests pass. 2013-04-15 15:28:11 -04:00
Seth Hall
fbe967e16a Checkpoint for SumStats rename. 2013-04-15 15:12:28 -04:00
Seth Hall
e8b60d1ba8 Updated FTP bruteforce detection and a few other small changes. 2013-04-02 00:55:25 -04:00
Seth Hall
423bf3b3bf Test updates and cleanup. 2013-04-02 00:30:14 -04:00
Seth Hall
0e3c84e863 Fixed the measurement "sample" plugin. 2013-04-02 00:19:06 -04:00
Seth Hall
93eca70e6b Merge remote-tracking branch 'origin/master' into topic/seth/metrics-merge 2013-04-01 14:16:46 -04:00
Seth Hall
53f9948b02 Measurement framework tests all pass now. 2013-04-01 14:16:37 -04:00
Yun Zheng Hu
9a88dc500a Added reverse() function to strings.bif.
Closes #969.
2013-03-23 08:39:04 -07:00
Robin Sommer
4255205026 Merge remote-tracking branch 'origin/topic/jsiwek/table-init-record-idx'
Closes #660.

* origin/topic/jsiwek/table-init-record-idx:
  Fix record constructors in table initializer indices.  Addresses #660.
2013-03-22 12:11:29 -07:00
Seth Hall
4e99d3a606 Add support for 802.1ah (Q-in-Q). 2013-03-22 12:38:43 -04:00
Robin Sommer
f412a00ada Adding a test for extract-certs-pem.pem. 2013-03-17 13:06:24 -07:00
Robin Sommer
d58a02aa01 Merge remote-tracking branch 'origin/topic/bernhard/base64'
* origin/topic/bernhard/base64:
  and re-enable caching of extracted certs
  and add bae64 bif tests.
  re-unify classes
  and modernize script.
  add base64-encode functionality and bif.

Closes #965.
2013-03-17 13:00:52 -07:00
Seth Hall
5734f9ef71 Merge remote-tracking branch 'origin/master' into topic/seth/software-version-updates2 2013-03-14 09:21:13 -04:00
Seth Hall
09cbaa7ccc Merge remote-tracking branch 'origin/master' into topic/seth/metrics-merge
Conflicts:
	testing/btest/Baseline/coverage.default-load-baseline/canonified_loaded_scripts.log
	testing/btest/Baseline/scripts.base.frameworks.notice.cluster/manager-1.notice.log
	testing/btest/Baseline/scripts.base.frameworks.notice.suppression-cluster/manager-1.notice.log
	testing/btest/Baseline/scripts.base.protocols.ftp.gridftp/notice.log
2013-03-13 00:26:55 -04:00
Bernhard Amann
a5161783ef and add bae64 bif tests. 2013-03-12 09:33:49 -07:00
Bernhard Amann
1fb05da9cd Fix race-condition in table-event test.
Event depended on the input manager receiving all lines from the reader
before the first input event was processed by the scripting layer.
2013-03-07 20:28:18 -08:00
Robin Sommer
f830ed3edf s/bro-ids.org/bro.org/g 2013-03-07 19:33:04 -08:00
Jon Siwek
2293443ea0 Fix function type-equivalence requiring same param names, addresses #957 2013-03-07 13:02:33 -06:00
Robin Sommer
8a6d68e00f Merge remote-tracking branch 'origin/topic/bernhard/remove-length'
Closes #955.

* origin/topic/bernhard/remove-length:
  forgot to remove the baselines for the now unnecessary bifs
  remove the byte_len and length bifs
2013-03-06 16:46:20 -08:00
Robin Sommer
1bd2f26df3 Merge remote-tracking branch 'origin/topic/seth/notice-framework-updates'
So much nicer!

Closes #954.

* origin/topic/seth/notice-framework-updates:
  Update notice framework documentation to represent the new reality.
  Complete removal of the old table based notice policy mechanism.
  Updates for the notices framework.
2013-03-06 16:45:30 -08:00
Robin Sommer
9f99a4a942 Merge remote-tracking branch 'origin/topic/jsiwek/local-container-init'
Closes #952.

* origin/topic/jsiwek/local-container-init:
  Fix init of local sets/vectors via curly brace initializer lists.
2013-03-06 15:11:10 -08:00
Robin Sommer
d931079021 Merge remote-tracking branch 'origin/topic/jsiwek/ticket946'
Closes #946.

* origin/topic/jsiwek/ticket946:
  Fix memory leaks resulting from 'when' and 'return when' statements.
  Fix three bugs with 'when' and 'return when' statements. Addresses #946
2013-03-06 15:09:24 -08:00
Bernhard Amann
a005d77369 forgot to remove the baselines for the now unnecessary bifs 2013-03-06 14:14:55 -08:00
Bernhard Amann
986b346e3f remove the byte_len and length bifs 2013-03-06 13:45:42 -08:00
Jon Siwek
c88babf6ef Fix init of local sets/vectors via curly brace initializer lists. 2013-03-01 16:42:16 -06:00
Jon Siwek
d158c7ffdf Fix memory leaks resulting from 'when' and 'return when' statements.
Addresses #946.
2013-02-19 16:19:16 -06:00
Jon Siwek
7e5115460c Fix three bugs with 'when' and 'return when' statements. Addresses #946
- 'when' statements were problematic when used in a function/event/hook
  that had local variables with an assigned function value.  This was
  because 'when' blocks operate on a clone of the frame and the cloning
  process serializes locals and the serialization of functions had an
  infinite cycle in it (ID -> BroFunc -> ID -> BroFunc ...).  The ID
  was only used for the function name and type information, so
  refactoring Func and subclasses to depend on those two things instead
  fixes the issue.

- 'return when' blocks, specifically, didn't work whenever execution
  of the containing function's body does another function call before
  reaching the 'return when' block, because of an assertion.  This was
  was due to logic in CallExpr::Eval always clearing the CallExpr
  associated with the Frame after doing the call, instead of restoring
  any previous CallExpr, which the code in Trigger::Eval expected to
  have available.

- An assert could be reached when the condition of a 'when' statement
  depended on checking the value of global state variables.  The assert
  in Trigger::QueueTrigger that checks that the Trigger isn't disabled
  would get hit because Trigger::Eval/Timeout disable themselves after
  running, but don't unregister themselves from the NotifierRegistry,
  which keeps calling QueueTrigger for every state access of the global.
2013-02-19 11:38:17 -06:00
Seth Hall
9f8ba408ba Updates for the notices framework.
- Moved the Notice::notice event and Notice::policy table to both be hooks.

 - Renamed the old Notice::policy to Notice::policy_table and documented it as deprecated.
2013-02-11 14:36:14 -05:00
Jon Siwek
26bf99c5a3 Add parsing for GTPv1 extension headers and control messages.
Added a generic gtpv1_message event generated for any GTP message type.

Added specific events for the create/update/delete PDP context
request/response messages.

Addresses #934.
2013-02-07 14:59:02 -06:00
Seth Hall
f8be65ca56 Merge remote-tracking branch 'origin/master' into topic/seth/metrics-merge 2013-02-07 10:01:13 -05:00
Seth Hall
ad9e2a143c Update software version parsing and comparison to account for a third numeric subversion.
- $addl is also compared numerically now if the value is actually numeric.
2013-02-06 13:59:05 -05:00
Bernhard Amann
dd24d7af83 update input tests to use exit_only_after_terminate 2013-02-01 15:45:21 -08:00
Jon Siwek
69afc4a882 Add an error for record coercions that would orphan a field.
These cases should be avoidable by fixing scripts where they occur and
they can also help catch typos that would lead to unintentional runtime
behavior.

Adding this already revealed several scripts where a field in an inlined
record was never removed after a code refactor.
2013-01-24 09:56:19 -06:00
Robin Sommer
ed165f22a2 Making a test portable. 2013-01-23 19:43:52 -08:00
Robin Sommer
c780bfdb48 Merge remote-tracking branch 'origin/topic/jsiwek/ticket-932'
* origin/topic/jsiwek/ticket-932:
  Fix uninitialized locals in event/hook handlers from having a value.

Closes #932.
2013-01-23 15:17:55 -08:00
Robin Sommer
854891930d Merge remote-tracking branch 'origin/topic/jsiwek/ticket-930'
* origin/topic/jsiwek/ticket-930:
  Add a null value check in CompositeHash::ComputeHash.
  Change reporter messages to more reliably print to stderr.

Closes #930.
2013-01-23 14:48:25 -08:00
Robin Sommer
0541c49a50 Changing btest call to use "-j" instead of "-j 5". 2013-01-23 14:44:10 -08:00
Robin Sommer
dcd675280e Merge remote-tracking branch 'origin/topic/jsiwek/no-switch-fallthrough'
* origin/topic/jsiwek/no-switch-fallthrough:
  Add "fallthrough" keyword, require a flow statement to end case blocks.
  Disable automatic case fallthrough in switch stmts.  Addresses #754.

I've added a test for the error case where no break/fallthrough/return
is given.

Closes #754.
2013-01-23 14:41:23 -08:00
Jon Siwek
acafcfafd2 Revert "Trick for parallelizing input framework unit tests."
This reverts commit 43ed437daa.

The old way of doing the tests seems more reliable for now.
2013-01-18 13:15:34 -06:00
Jon Siwek
fdd11428c1 Change reporter messages to more reliably print to stderr.
Moved this functionality to be internal instead of in the script-layer
event handlers.  The issue with the later is that bad things can happen
between the time a reporter event handler is dispatched and the time it
is executed, and if bro crashes in that time, the message may never be
seen/logged.

Addressed #930 (and revisits #836).
2013-01-18 12:46:00 -06:00