Commit graph

1518 commits

Author SHA1 Message Date
Jon Siwek
d342cde22c Improve error message when failing to activate a plugin.
Also fix a unit test helper script that checks plugin availability.
2014-09-16 10:09:46 -05:00
Robin Sommer
160543cbc6 Merge remote-tracking branch 'origin/topic/jsiwek/jj-bugs'
* origin/topic/jsiwek/jj-bugs:
  Fix incorrect data delivery skips after gap in HTTP Content-Range.
  Fix file analysis placement of data after gap in HTTP Content-Range.
  Fix issue w/ TCP reassembler not delivering some segments.
  Raise http_entity_data in line with data arrival.
  Implement file ID caching for MIME_Mail.
  BIT-1240: Fix MIME entity file data/gap ordering.

BIT-1240 #closed
BIT-1246 #closed
BIT-1247 #closed
BIT-1248 #closed
2014-09-12 19:44:54 -07:00
Jon Siwek
af9d31dcc1 Fix incorrect data delivery skips after gap in HTTP Content-Range.
The logic for determining whether a gap was entirely within a MIME
entity body was not asking the current entity, which may be better able
to answer that question if it was using the Content-Range header and
thus knows if the gap exceeds the length of the body that's still
expected.

Addresses BIT-1247
2014-09-11 14:53:47 -05:00
Jon Siwek
1e02d5d5b5 Fix file analysis placement of data after gap in HTTP Content-Range.
Addresses BIT-1248.
2014-09-11 12:25:43 -05:00
Jon Siwek
f1cef9d2a9 Fix issue w/ TCP reassembler not delivering some segments.
For example, if we have a connection between TCP "A" and TCP "B" and "A"
sends segments "1" and "2", but we don't see the first and then the next
acknowledgement from "B" is for everything up to, and including, "2",
the gap would be reported to include both segments instead of just the
first and then delivering the second.  Put generally: any segments that
weren't yet delivered because they're waiting for an earlier gap to be
filled would be dropped when an ACK comes in that includes the gap as
well as those pending segments.  (If a distinct ACK was seen for just
the gap, that situation would have worked).

Addresses BIT-1246.
2014-09-11 10:47:56 -05:00
Jon Siwek
f97f58e9db Raise http_entity_data in line with data arrival.
As opposed to delaying until a certain-sized-buffer fills, which is
problematic because then the event becomes out of sync with the "rest of
the world".  E.g. content_gap handlers being called sooner than
expected.

Addresses BIT-1240.
2014-09-10 13:20:47 -05:00
Jon Siwek
9563726612 Implement file ID caching for MIME_Mail. 2014-09-08 18:16:20 -05:00
Jon Siwek
7a46a70b77 BIT-1240: Fix MIME entity file data/gap ordering.
MIME entities buffered data and passed it along to protocol analyzers in
discrete amounts, but a gap is always passed along right away, so the
ordering of these "events" can cause incorrect file analysis.  The
change here is to never leave any MIME data buffered -- it should now be
passed along line by line as it is seen, but may still temporarily make
use of a buffer allocated by the analyzer as it works on decoding
content.
2014-09-08 18:04:03 -05:00
Robin Sommer
5c6dfb2408 Fixing link-layer handling.
Something had gotten mixed up here.
2014-09-06 12:31:25 -07:00
Robin Sommer
4a66a8e341 Bugfixes and test updates. 2014-09-05 18:20:23 -07:00
Robin Sommer
c1c4e6eb63 Merge remote-tracking branch 'origin/master' into topic/robin/pktsrc 2014-09-05 16:01:23 -07:00
Robin Sommer
042afd2feb Fixing remaining tests. 2014-09-04 20:55:44 -07:00
Robin Sommer
6e33c92cf0 Adding test for dynamic packet dumper plugin. 2014-09-04 20:30:28 -07:00
Robin Sommer
b813b6f83b Test updates. 2014-09-04 16:08:14 -07:00
Johanna Amann
8f1cbb8b0a Fix ocsp reply validation - there were a few things that definitely were wrong.
Now the right signer certificate for the reply is looked up (and no longer assumed that it is the first one) and a few compares are fixed. Plus - there are more test cases that partially send certificates in the ocsp message and partially do not - and it seems to work fine in all cases.

Addresses BIT-1212
2014-09-04 12:22:55 -07:00
Jon Siwek
dde0ce234f Fix possible buffer over-read in DNS TSIG parsing 2014-09-02 14:22:26 -05:00
Robin Sommer
5e4f498083 Adding test creating a dynamic pktsrc plugin. 2014-08-28 00:53:15 -04:00
Robin Sommer
3e669daa05 Interface tweaks for PktSrc, plus docs for PktSrc and PktDumper. 2014-08-28 00:52:36 -04:00
Robin Sommer
5f817513d0 A set of various fixes and smaller API tweaks, plus tests.
Also moving PCAP-related bifs to iosource/pcap.bif.
2014-08-24 19:55:26 -07:00
Robin Sommer
a3b2e3a2b4 Merge remote-tracking branch 'origin/topic/jsiwek/outer_param_binding'
That works. Just renaming "param" to "ID", as locals are affected as
well.

BIT-1233 #merged

* origin/topic/jsiwek/outer_param_binding:
  Detect functions that try to bind variables from an outer scope.
2014-08-22 15:23:18 -07:00
Jon Siwek
3521a92a00 Detect functions that try to bind variables from an outer scope.
And raise an error saying that's not supported.
Addresses BIT-1233.
2014-08-22 16:49:10 -05:00
Jon Siwek
e7f10755c8 Merge remote-tracking branch 'origin/topic/robin/reader-writer-plugins'
* origin/topic/robin/reader-writer-plugins:
  Adding plugin testing to Makefile's test-all.
  Fixing tests.
  Removing DataSeries and ElasticSearch from configure script.
  Updating submodule.
  Move DataSeries and ElasticSearch into plugins.
  More polishing of some of the branche's changes.
  More polishing.
  Test case for a dynamic input reader.
  Test case for a dynamic log writer.
  Final fixes, preparing for merge.
  Converting log writers and input readers to plugins.

BIT-1222 #merged
2014-08-21 16:04:13 -05:00
Jon Siwek
6f27d3dd40 Silence some doc-related warnings when using bro -e.
BIT-1232 #close
2014-08-19 11:06:21 -05:00
Robin Sommer
996d118d68 Fixing tests. 2014-08-13 21:33:03 -07:00
Robin Sommer
355314718b Merge remote-tracking branch 'origin/master' into topic/robin/reader-writer-plugins 2014-08-08 18:32:45 -07:00
Robin Sommer
8737eae906 Move DataSeries and ElasticSearch into plugins. 2014-08-08 18:32:21 -07:00
Robin Sommer
ccfd081437 Fixing PATH to bro-cut in BTest configuration. 2014-08-01 14:35:26 -07:00
Robin Sommer
0ba4b768cd Merge remote-tracking branch 'origin/master' into topic/robin/reader-writer-plugins 2014-07-31 14:45:38 -07:00
Robin Sommer
3d1442e86b Test case for a dynamic input reader. 2014-07-31 12:07:34 -07:00
Robin Sommer
f45526f373 Test case for a dynamic log writer. 2014-07-31 11:40:25 -07:00
Robin Sommer
2b505b07c1 Merge remote-tracking branch 'origin/master' into topic/robin/reader-writer-plugins 2014-07-31 10:10:39 -07:00
Robin Sommer
382b946098 Adding missing check that a plugin's API version matches what Bro defines. 2014-07-31 10:09:03 -07:00
Robin Sommer
ceb13cf3bb Re-adding missing baseline.
Not sure when this got lost ...
2014-07-22 20:31:07 -07:00
Robin Sommer
c6e204fbe2 Merge remote-tracking branch 'origin/master' into topic/robin/dynamic-plugins-2.3
Conflicts:
	aux/btest
2014-07-22 20:27:00 -07:00
Robin Sommer
e3adce83ee Adding a plugin test that checks that "make install" works. 2014-07-22 20:25:31 -07:00
Robin Sommer
3e6193921a Merge remote-tracking branch 'origin/topic/robin/modbus-events-merge'
* origin/topic/robin/modbus-events-merge:
  adding another trace file to test read and write coil function codes
  add/update test file and baseline result
  add implementation of bytestring_to_coils for modbusy analyzer
  adding a missing field in record ModbusHeaders
  add event handlers for modbus
2014-07-22 17:34:11 -07:00
Robin Sommer
48b251abd1 Merge branch 'topic/robin/dynamic-plugins-2.3' into topic/robin/reader-writer-plugins 2014-07-22 17:27:16 -07:00
Robin Sommer
fa1ba06414 Merge remote-tracking branch 'origin/topic/hui/modbus-events'
* origin/topic/hui/modbus-events:
  adding another trace file to test read and write coil function codes
  add/update test file and baseline result
  add implementation of bytestring_to_coils for modbusy analyzer
  adding a missing field in record ModbusHeaders
  add event handlers for modbus
2014-07-22 01:03:48 +02:00
Robin Sommer
9e74fcaf2a The HOOK_CALL_FUNCTION plugin hook is now also triggered for builtin
functions.
2014-07-22 00:26:20 +02:00
Robin Sommer
ca1b882761 Adapting plugin tests to use the new split Plugin.{h,cc} structure
that init-plugin now generates.

Also adding new test that makes sure the the skeleton created by
init-plugin compiles on its own withoyt any further changes.
2014-07-21 22:55:57 +02:00
Robin Sommer
38c69f9cd0 Allow to activate plugins from the command line by specifying their
fully-qualified name.
2014-07-21 16:58:10 +02:00
Robin Sommer
c9524757d2 Adding Files::register_for_mime_type() to associate a file analyzer
with a MIME type.

Whenever that MIME is detected, Bro will now automatically activate
the analyzer. The interface mimics how well-known ports are defined
for protocol analyzers.

This isn't actually used by any existing file analyzer (because we
don't have any yet that target a specific file format), but there's a
test making sure it works.
2014-07-21 16:31:22 +02:00
Robin Sommer
f4cbcb9b03 Converting log writers and input readers to plugins. 2014-07-20 19:17:58 +02:00
Robin Sommer
aeb8e71e8c Merge remote-tracking branch 'origin/master' into topic/robin/dynamic-plugins-2.3
Conflicts:
	aux/bro-aux
	aux/broccoli
2014-07-10 20:11:52 -07:00
Jon Siwek
3cea6ab1eb Include yield of vectors in Broxygen's type descriptions.
BIT-1217 #close
2014-07-10 19:23:49 -05:00
Hui Lin
a7c9ef72a8 adding another trace file to test read and write coil function codes 2014-07-08 11:14:51 -05:00
Robin Sommer
6298b4cf71 Merge remote-tracking branch 'origin/master' into topic/robin/dynamic-plugins-2.3
Conflicts:
	aux/broctl
2014-06-26 20:00:57 -07:00
Jon Siwek
f7c2c00045 Merge remote-tracking branch 'origin/topic/dnthayer/ticket1206'
* origin/topic/dnthayer/ticket1206:
  Remove references to line numbers in tutorial text

BIT-1206 #merged
2014-06-23 16:56:46 -05:00
Daniel Thayer
084bf498d8 Remove references to line numbers in tutorial text
Removed line numbers in the text because it was difficult to keep these
up-to-date.  Changed some wording and moved sample scripts before (rather
than after) the descriptive text in order to keep it easy to understand.
2014-06-20 16:13:39 -05:00
Robin Sommer
62d07a3fc4 Merge branch 'topic/robin/dynamic-plugins-2.3' of git.bro.org:bro into topic/robin/dynamic-plugins-2.3 2014-06-18 14:44:26 -07:00