Commit graph

3375 commits

Author SHA1 Message Date
Seth Hall
257b460b18 Updated the app-metrics script to the new metrics api.
- Inconsequential change to scan.bro.
2012-11-16 03:05:43 -05:00
Seth Hall
e99e090b85 Merge remote-tracking branch 'origin/master' into topic/seth/metrics-merge 2012-11-16 02:49:36 -05:00
Seth Hall
d9195076b1 Metrics framework checkpoint.
- New scan.bro merged in and reworked a bit.

 - Updated metrics API.  Now possible to calculate much more.
2012-11-16 02:37:52 -05:00
Jon Siwek
9e49703087 Improve auto-generated enum documentation.
The names of enum types are tracked so that variables holding a value
of a given enum type can generate a reference to it instead of just
listing the type as a generic "enum".
2012-11-15 16:54:33 -06:00
Jon Siwek
e0805498c6 Fix some warnings from sphinx when building docs. 2012-11-15 16:40:18 -06:00
Jon Siwek
c8d64b5028 Add memory leak unit test for "hook" function flavor. 2012-11-15 14:02:24 -06:00
Jon Siwek
e0fb9eb2b2 Add new function flavor called a "hook".
This new flavor of function behaves like a "synchronous event".
See documentation for more details on usage.
2012-11-15 13:45:13 -06:00
Robin Sommer
5508a5bb80 Merge remote-tracking branch 'origin/topic/dnthayer/bytes-to-double'
* origin/topic/dnthayer/bytes-to-double:
  Portability improvement (data alignment issues)
  Add test cases for the bytestring_to_double BIF
  Add a new BIF "bytestring_to_double"

Closes #908.
2012-11-14 13:20:46 -08:00
Robin Sommer
759faa255c Merge remote-tracking branch 'origin/topic/jsiwek/modbus-fixes'
* origin/topic/jsiwek/modbus-fixes:
  Remove byte count parameter from modbus events carrying register arrays
  Adjust modbus register array parsing.
  Adjustments to modbus test cases.

Closes #917.
2012-11-13 20:01:23 -08:00
Daniel Thayer
b309c265b8 Merge remote-tracking branch 'origin/master' into topic/dnthayer/bytes-to-double 2012-11-13 15:53:18 -06:00
Daniel Thayer
10376b13f5 Portability improvement (data alignment issues) 2012-11-13 15:48:25 -06:00
Jon Siwek
fd5eb23fa6 Remove byte count parameter from modbus events carrying register arrays
Instead of these events being generated for invalid byte count values
(they should always be even, not odd), a protocol_violation is raised.

    modbus_read_holding_registers_response
    modbus_read_input_registers_response
    modbus_write_multiple_registers_request
    modbus_read_write_multiple_registers_request
    modbus_read_write_multiple_registers_response
    modbus_read_fifo_queue_respons
2012-11-13 12:09:14 -06:00
Jon Siwek
c911d03c30 Adjust modbus register array parsing.
For modbus message types that include variable amount of register values
(uint16[]), setting a &length attribute without an explicit array size
could trigger a parsing assertion since it allows for the "element" data
pointer to travel past the "end of data" (e.g. when &length is odd).
This is changed to now give both an array size and &length to earlier
terminate the parsing of elements before the assert is checked and
so a single out-of-bound check can be done for the entire array
(leaving off &length causes an out-of-bound check for each element).

Added another parameter to modbus events that carry register arrays to
the script-layer which indicates the associated byte count from the
message (allowing for invalid values to be detected):

    modbus_read_holding_registers_response
    modbus_read_input_registers_response
    modbus_write_multiple_registers_request
    modbus_read_write_multiple_registers_request
    modbus_read_write_multiple_registers_response
    modbus_read_fifo_queue_response
2012-11-12 16:40:16 -06:00
Jon Siwek
defed7b6f3 Adjustments to modbus test cases.
- Added a test for binpac exception handling -- the generated code
  should use "binpac::Exception" and not "Exception" for exception
  handling logic to avoid accidental overshadowing by
  the analyzer-specific type "binpac::ModbusTCP::Exception", which
  could lead to interesting asserts being triggered in binpac.

- Update baseline for the event coverage test -- seems that more
  events get generated with working exception handling in the generated
  binpac parser code.

- Coverage baseline was giving wrong number of events covered.
2012-11-12 11:51:42 -06:00
Robin Sommer
aac922d7af Updating submodule(s).
[nomail]
2012-11-08 16:34:45 -08:00
Robin Sommer
590f764440 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix lookup_hostname BIF (and memory leak in it).

Thanks!
2012-11-08 16:22:34 -08:00
Jon Siwek
89500c9176 Fix lookup_hostname BIF (and memory leak in it).
The problem was caused by uninitialized is_text member in AsyncRequest.
2012-11-08 12:00:22 -06:00
Robin Sommer
dae9c946b6 Another attempt at getting this test portable.
Keeping my fingers crossed ... (and I'm still planing to move this
over to the external tests later).
2012-11-07 20:48:08 -08:00
Robin Sommer
e92ea67959 Fixing modbus test on MacOS.
Hopefully ...
2012-11-07 17:09:25 -08:00
Robin Sommer
d75ee59953 Attempting to fix modbus test portability.
Adding the external canonifier, let's if that helps. Maybe the test
would be better located in the external suite anyways ...
2012-11-06 07:22:21 -08:00
Robin Sommer
6c70b11cea Fixing/extending modbus tests. 2012-11-05 17:10:28 -08:00
Robin Sommer
edf6750e3d Fixing tests after intel merge. 2012-11-05 16:25:59 -08:00
Robin Sommer
a40b00d4ab Merge branch 'topic/robin/intel-framework-merge'
* topic/robin/intel-framework-merge: (22 commits)
  Fixing tests after intel-framework merge.
  Extracting URLs from message bodies over SMTP and sending them to Intel framework.
  Small comment updates in the Intel framework CIF support.
  Intelligence framework documentation first draft.
  Only the manager tries to read files with the input framework now.
  Initial support for Bro's Intel framework with the Collective Intelligence Framework.
  Initial API for Intel framework is complete.
  Fixed an issue with cluster data distribution.
  Updating some intel framework test baselines.
  Reworked cluster intelligence data distribution mechanism and fixed tests.
  Lots more intelligence checking in SMTP traffic.
  Added intelligence check for "Received" path checking and a bit of reshuffling.
  Added sources to the intel log.
  Fixing a problem with intel distribution on clusters.
  Updated intel framework test to include matching.
  Restructuring the scripts that feed data into the intel framework slightly.
  One test for cluster transparency of the intel framework.
  Fixed a cluster support bug.
  Intelligence framework checkpoint
  Major updates to fix the Intel framework API.
  ...

Closes #914.
2012-11-05 16:00:38 -08:00
Robin Sommer
4e12813445 Fixing tests after modbus merge. 2012-11-05 15:58:38 -08:00
Robin Sommer
86ce564107 Merge remote-tracking branch 'remotes/origin/topic/seth/modbus-merge'
* remotes/origin/topic/seth/modbus-merge:
  Small modbus documentation update and tiny refactoring.
  Final touches to modbus analyzer for now.
  Major revisions to Modbus analyzer support (not quite done yet).
  put some make-up on Modbus analyser
  Modbus analyser, added support: FC=20,21
  Modbus analyzer,added support: FC=1,2,15,24
  Modbus analyzer, current support: FC=3,4,5,6,7,16,22,23

Closes #915.
2012-11-05 15:26:57 -08:00
Robin Sommer
a6216969e6 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Script in base for detecting cases of checksum offloading.
2012-11-05 13:59:30 -08:00
Robin Sommer
c39215bf5d Clarifying onwership rules for BroString constructors. 2012-11-05 13:51:09 -08:00
Robin Sommer
4fab70ecce Merge remote-tracking branch 'vlad/topic/vladg/dns_txt_queries'
* vlad/topic/vladg/dns_txt_queries:
  Add detection rate threshold for MHR.
  Make sure lookup_hostname_txt isn't checking lookup_hostname's cache for answers.
  A couple of lookup_hostname_txt fixes.

Reverting the earlier function-join during merging.
2012-11-05 13:40:24 -08:00
Vlad Grigorescu
1aeb52ae46 Add detection rate threshold for MHR. 2012-11-03 12:09:11 -04:00
Vlad Grigorescu
a1c0b853fe Make sure lookup_hostname_txt isn't checking lookup_hostname's cache for answers. 2012-11-03 11:07:48 -04:00
Vlad Grigorescu
d9803a0d9d A couple of lookup_hostname_txt fixes. 2012-11-03 11:05:49 -04:00
Robin Sommer
ce6b8e5cfa Updating submodule(s).
[nomail]
2012-11-01 14:25:17 -07:00
Robin Sommer
dfebb82238 Merge remote-tracking branch 'vlad/topic/vladg/dns_txt_queries'
* vlad/topic/vladg/dns_txt_queries:
  DNS TXT support

I've tweaked it a little bit, still seems to work ...

I'd like to add a test for this but I'n not quite sure how to do that.
We'd have to hardcode a destination server that then'd be contacted
each time the test-suite runs.
2012-11-01 10:38:36 -07:00
Robin Sommer
70339e9fed Fixing tests after intel-framework merge.
coverage.bare-mode-errors still failing.
2012-11-01 09:28:59 -07:00
Robin Sommer
fb7ba82bab Merge remote-tracking branch 'origin/topic/seth/intel-framework'
* origin/topic/seth/intel-framework: (21 commits)
  Extracting URLs from message bodies over SMTP and sending them to Intel framework.
  Small comment updates in the Intel framework CIF support.
  Intelligence framework documentation first draft.
  Only the manager tries to read files with the input framework now.
  Initial support for Bro's Intel framework with the Collective Intelligence Framework.
  Initial API for Intel framework is complete.
  Fixed an issue with cluster data distribution.
  Updating some intel framework test baselines.
  Reworked cluster intelligence data distribution mechanism and fixed tests.
  Lots more intelligence checking in SMTP traffic.
  Added intelligence check for "Received" path checking and a bit of reshuffling.
  Added sources to the intel log.
  Fixing a problem with intel distribution on clusters.
  Updated intel framework test to include matching.
  Restructuring the scripts that feed data into the intel framework slightly.
  One test for cluster transparency of the intel framework.
  Fixed a cluster support bug.
  Intelligence framework checkpoint
  Major updates to fix the Intel framework API.
  Checkpoint commit.  This is all a huge mess right now. :)
  ...

Closes #914.
2012-11-01 08:21:52 -07:00
Seth Hall
e020e034ae Script in base for detecting cases of checksum offloading.
- I added this to the base scripts because it's very minimal overhead
  and we get questions about this all the time.  Now that reporter
  messages are printed to the console, people will see the message
  clearly if they have bad checksums.
2012-11-01 00:16:28 -04:00
Seth Hall
c32b179ac5 Small modbus documentation update and tiny refactoring. 2012-10-31 23:57:38 -04:00
Seth Hall
a2f336cc72 Final touches to modbus analyzer for now.
- There are still some broken events in the modbus analyzer because
  I don't have traffic to test with (coil and record related events primarily).

- There are a few example scripts in policy/protocols/modbus
2012-10-31 23:34:43 -04:00
Robin Sommer
cba8b9f62b Updating submodule(s).
[nomail]
2012-10-31 14:41:20 -07:00
Robin Sommer
55006240ae Merge remote-tracking branch 'origin/topic/dnthayer/installing-bro'
* origin/topic/dnthayer/installing-bro:
  Add version-specific upgrade info
  Move upgrade instructions to INSTALL document
  Reorganize install documentation

Closes #910.
2012-10-31 14:32:00 -07:00
Robin Sommer
b85baed95e Merge remote-tracking branch 'origin/topic/dnthayer/alarms-mail'
* origin/topic/dnthayer/alarms-mail:
  Rename the alarm summary mail variable
  Change alarm summary email interval to 24hrs

Closes #824.
2012-10-31 14:28:49 -07:00
Seth Hall
172a6345b8 Extracting URLs from message bodies over SMTP and sending them to Intel framework.
- New utils package for URLs.

- Two functions in the URLs utils.  find_all_urls and
  find_all_urls_without_scheme.
2012-10-31 08:46:40 -04:00
Daniel Thayer
c46029d828 Rename the alarm summary mail variable 2012-10-30 16:31:18 -05:00
Daniel Thayer
0f97f0b6e4 Merge remote-tracking branch 'origin/master' into topic/dnthayer/alarms-mail 2012-10-30 11:32:58 -05:00
Vlad Grigorescu
bc79888190 DNS TXT support 2012-10-30 12:32:39 -04:00
Jon Siwek
7cf54b2541 Change binpac exceptions in AYIYA/GTP analyzers to do protocol_violation
As opposed to creating weirds for e.g. "binpac::ExceptionOutOfBound".
The protocol_violation will also result in the disabling of the
analyzer by default.
2012-10-29 12:15:48 -05:00
Daniel Thayer
48c4487378 Add test cases for the bytestring_to_double BIF 2012-10-25 17:10:51 -05:00
Daniel Thayer
f6caa565bd Add a new BIF "bytestring_to_double"
Addresses #908.
2012-10-25 15:15:46 -05:00
Daniel Thayer
ba51974848 Add version-specific upgrade info
Rename the upgrade document so that it will be relevant for all
future releases, and add version-specific upgrade info (2.0 to 2.1).
2012-10-24 18:25:27 -05:00
Robin Sommer
9ec2bfe59f Merge remote-tracking branch 'origin/topic/seth/pppoe'
Looks like the code in this function is getting ready for some
refactoring. Leaving that for another time though ...

Closes #909.

* origin/topic/seth/pppoe:
  Adding a test for PPPoE support.
  Adding PPPoE support to Bro.
2012-10-24 16:05:17 -07:00