Commit graph

6667 commits

Author SHA1 Message Date
Bernhard Amann
34de9a0903 Merge remote-tracking branch 'origin/master' into topic/bernhard/input-threads-merge 2012-06-15 15:28:35 -07:00
Robin Sommer
19cf93be69 Moving my todos over to the tracker ticket. 2012-06-15 14:45:07 -07:00
Seth Hall
0bb8b69c95 Reworked bulk operation string construction to use ODesc and added json escaping. 2012-06-15 16:30:54 -04:00
Vlad Grigorescu
93a7a46af0 Merge branch 'master' of git://git.bro-ids.org/bro into elasticsearch 2012-06-15 10:46:48 -04:00
Bernhard Amann
c664c40ac2 now the writer supports tables and vectors.
still not tested, but using Log::default_writer=Log::WRITER_SQLITE seems to generate all
the right log-databases, etc.
2012-06-14 15:54:22 -07:00
Bernhard Amann
0a439b6b61 Merge remote-tracking branch 'origin/master' into topic/bernhard/sqlite 2012-06-14 15:15:58 -07:00
Jon Siwek
22fb039e83 Improve an error message in ICMP analyzer. 2012-06-13 16:59:15 -05:00
Daniel Thayer
1f60c3db07 Fix many errors in the event documentation
Fixed broken links, broken reST formatting, added missing event
parameters to the documentation, removed documentation of event
parameters that don't exist, corrected spelling errors, fixed some
summary lines (i.e., the first line in each event description) that
were truncated in the HTML, and reformatted some lines to fit
within 80 columns (much easier to read the docs when using a
text editor to view the source files).
2012-06-12 17:36:11 -05:00
Robin Sommer
1acb9fd91d Checkpointing the merge. Not done yet.
Merge remote-tracking branch 'origin/topic/tunnels' into topic/robin/tunnels-merge

* origin/topic/tunnels: (41 commits)
  Extend weird names that occur in core packet processing during decapsulation.
  Add Teredo analysis option to reduce false positive decapsulation.
  Just some cleanup/documentation of new tunnel-handling code.
  Memory leak fixes
  Add a config.h definition for IPPROTO_IPV4.
  Add AYIYA tunnel decapsulation unit test.
  Add Teredo-specific events.
  Refactor some of the NetSessions routines that recurse on IP packets.
  Add independent options to toggle the different decapsulation methods
  Add more sanity checks before recursing on encapsulated IP packets.
  Suppress Teredo weirds unless decapsulation was successful once before.
  Tunnel support performance optimization.
  Add Teredo tunnel decapsulation.
  Fix for IP tunnel UID persistence.
  Fix AYIYA analyzer tag.
  Add summary documentation to tunnels/main.bro.
  Make tunnels always identifiable by UID, tunnel.log now gets populated.
  Some improvements to the AYIYA analyzer.
  Remove Tunnel::decapsulate_ip option.
  Remove invalid IP-in-IP encapsulated protocol value.
  ...
2012-06-11 17:24:18 -07:00
Robin Sommer
d1512ef462 Merge remote-tracking branch 'origin/topic/jsiwek/enum-log-error-handling'
* origin/topic/jsiwek/enum-log-error-handling:
  Add more error handling code to logging of enum vals. (addresses #829)
2012-06-11 15:59:20 -07:00
Jon Siwek
c5d3ea009d Fix exceptions thrown in event handlers preventing others from running.
If some expression in an event handler body causes an
InterpreterException internally, then the rest of that body doesn't
get executed, but also the bodies of any other handlers were not
executed.
2012-06-11 15:35:09 -05:00
Bernhard Amann
6e0d15b55e basic sqlite writer seems to work.
does not support table and vector types because SQLite has no support for arrays.
also does not support rotation, etc.

Not really tested thoroughly - but starting bro with Log::default_writer=Log::WRITER_SQLITE
yields a couple of sqlite files that seem to contain sensible stuff.
2012-06-11 11:43:06 -07:00
Daniel Thayer
191994a60a Fix summary lines for BIF documentation
The summary lines (the first sentence in the description) for some BIFs
contained a period before the end of the sentence, so only part of the
sentence would appear in the "summary" section of the HTML document (fixed
by rewording the sentence).

Some summary lines were too long (fixed by splitting the sentence with first
sentence being more concise).

Also corrected the description of "fmt" and "floor" BIFs.
2012-06-08 16:51:45 -05:00
Daniel Thayer
18e61fcdfc Fix val_size BIF tests and improve docs
Improve documentation of "order" BIF, and made the "val_size" tests
more portable.
2012-06-08 15:25:49 -05:00
Jon Siwek
e9c18b51a3 Add more error handling code to logging of enum vals. (addresses #829)
If lookup of enum name by value fails, an error is now sent through
the reporter framework and the value logged will be an empty string
(as opposed to trying to construct a string with null pointer which
throws a logic_error and aborts Bro).
2012-06-08 10:11:54 -05:00
Bernhard Amann
3e3ceda1a7 disable streaming reads from executed commands.
This lead to hanging bro's because pclose apparently can wait for eternity
if things go wrong. And there probably are a couple of other problems with this approach.
2012-06-07 14:36:03 -07:00
Bernhard Amann
852de4700c automatically delete disabled input streams 2012-06-07 14:12:42 -07:00
Bernhard Amann
18f07d3a46 Merge remote-tracking branch 'origin/master' into topic/bernhard/input-threads-merge 2012-06-07 13:51:37 -07:00
Jon Siwek
9d2a21c490 Extend weird names that occur in core packet processing during decapsulation.
Appending a "_in_tunnel" to the weird name might help clarify that
the weird is happening with a packet that is attempting to be processed
as a result of decapsulation.
2012-06-07 13:03:13 -05:00
Jon Siwek
6f346c8406 Add Teredo analysis option to reduce false positive decapsulation.
The Tunnel::yielding_teredo_decapsulation (on by default) makes it so
the Teredo analyzer doesn't attempt to decapsulate payloads when
there's already a sibling analyzer that thinks it's parsing the right
protocol.  Sometimes, UDP payloads just happen to look like they are
validly Teredo-encapsulated and doing further analysis on the
decapsulated packet can quickly turn into a weird; this change helps
reduce such weirds.
2012-06-07 13:01:10 -05:00
Jon Siwek
d1e4e6e812 Include header for usleep(), caused compile failure on Archlinux. 2012-06-06 16:11:23 -05:00
Jon Siwek
9ddb70b109 Merge branch 'master' into topic/tunnels
Conflicts:
	scripts/base/init-bare.bro
2012-06-06 14:53:57 -05:00
Jon Siwek
beacf581d3 Just some cleanup/documentation of new tunnel-handling code. 2012-06-06 14:40:11 -05:00
Robin Sommer
9a86a5e21f Revert "Fixed a bug with the MIME analyzer not removing whitespace on wrapped headers."
This reverts commit 89cb103a2c.
2012-06-06 12:21:24 -07:00
Robin Sommer
45f5900547 Merge remote-tracking branch 'origin/topic/jsiwek/load-sigs'
* origin/topic/jsiwek/load-sigs:
  Add @load-sigs directive for loading signature files (addresses #551).

Closes #551.
2012-06-06 11:49:39 -07:00
Robin Sommer
73cefcc11c Merge remote-tracking branch 'origin/topic/dnthayer/bif-tests'
* origin/topic/dnthayer/bif-tests:
  Improve "fmt" BIF documentation comment
  Improve tests of the type_name BIF
  Improve test cases for "order" BIF
  Fix documentation of sort BIF and add more tests
  Fix documentation for system_env BIF
  Deprecate the parse_dotted_addr BIF (use to_addr instead)
  Improve tests for to_port and type_name BIFs
  Improve tests for sort, order, and system_env BIFs
  Fix the join_string_vec BIF and add more tests
  Add more tests for previously-untested BIFs
  Add more tests for previously-untested BIFs
  Add more tests for previously-untested BIFs
  Add more tests for previously-untested BIFs
  Add tests for previously-untested strings BIFs
2012-06-06 11:42:16 -07:00
Jon Siwek
7599ac8f31 Memory leak fixes for bad usages of VectorVal ctor.
Many usages of the VectorVal ctor didn't account for the fact that
it automatically Ref's the VectorType argument and end up leaking it.
2012-06-06 11:50:15 -05:00
Jon Siwek
0bdbeb89e2 Memory leak fixes 2012-06-06 10:41:36 -05:00
Vlad Grigorescu
5e05e548ff Change time printf format to use the more compatible PRIu64. 2012-06-05 23:20:28 -04:00
Vlad Grigorescu
894dec0069 No quotes for times and doubles, since ES won't interpret them as numbers then. 2012-06-05 23:01:36 -04:00
Vlad Grigorescu
5db027e39f Fix timestamp overflow bug. 2012-06-05 17:23:50 -04:00
Jon Siwek
854c625275 Add Teredo-specific events.
These are called "teredo_packet", "teredo_authentication",
"teredo_origin_indication", and "teredo_bubble" and may be raised
on a per-packet basis depending on Teredo encapsulation method.
2012-06-05 15:07:56 -05:00
Jon Siwek
b52436a53b Refactor some of the NetSessions routines that recurse on IP packets.
Separating the IP packet validation/parsing from the recursive
call to DoNextPacket to make it easier for analyzers to get
access to the inner IP_Hdr.
2012-06-05 12:23:16 -05:00
Seth Hall
89cb103a2c Fixed a bug with the MIME analyzer not removing whitespace on wrapped headers.
- No test due to lack of tracefile with wrapped header.
2012-06-05 11:25:10 -04:00
Jon Siwek
976e8db155 Add independent options to toggle the different decapsulation methods 2012-06-05 10:17:41 -05:00
Jon Siwek
8540c4d0cd Add more sanity checks before recursing on encapsulated IP packets.
i.e. the IP protocol version and payload length get checked for
consistency before attempting further analysis.
2012-06-05 09:58:44 -05:00
Jon Siwek
ae85bd1b95 Suppress Teredo weirds unless decapsulation was successful once before. 2012-06-04 16:57:46 -05:00
Jon Siwek
9851591317 Tunnel support performance optimization.
Looks better to allocate Encapsulation objects on-demand when tunnels
are discovered rather than always have an automatic, empty one for
every packet.
2012-06-04 16:14:30 -05:00
Jon Siwek
47c2fda88e Merge branch 'master' into topic/tunnels 2012-06-04 11:09:45 -05:00
Vlad Grigorescu
7bee0b0d8e Added sending messages to ElasticSearch over HTTP. 2012-06-03 22:07:20 -04:00
Vlad Grigorescu
95f000738b ElasticSearch log writer implementation test 1 - writes out JSON to file instead of sending it over HTTP for now. 2012-06-03 12:40:09 -04:00
Daniel Thayer
6e5eb187dd Improve "fmt" BIF documentation comment
Also update test cases for fmt.
2012-06-01 18:11:46 -05:00
Daniel Thayer
2b0db01874 Improve test cases for "order" BIF
Also fixed some comments and error messages in the "order" BIF.
2012-06-01 15:50:49 -05:00
Daniel Thayer
2eddaffc90 Fix documentation of sort BIF and add more tests 2012-06-01 14:24:42 -05:00
Jon Siwek
dd4dd0ca6e Add @load-sigs directive for loading signature files (addresses #551). 2012-06-01 14:10:23 -05:00
Daniel Thayer
19e3f2ee56 Fix documentation for system_env BIF 2012-06-01 13:12:55 -05:00
Daniel Thayer
3b2ac75e91 Deprecate the parse_dotted_addr BIF (use to_addr instead) 2012-06-01 12:36:30 -05:00
Daniel Thayer
13f0711af5 Merge remote-tracking branch 'origin/master' into topic/dnthayer/bif-tests 2012-06-01 10:59:38 -05:00
Bernhard Amann
85e29a9471 Documentation 2012-05-31 14:26:25 -07:00
Jon Siwek
9fb0065696 Merge branch 'master' into topic/tunnels
Conflicts:
	scripts/base/init-bare.bro
	src/Conn.cc
	src/Conn.h
	src/Sessions.cc
	src/Sessions.h
	src/const.bif
	src/types.bif
2012-05-31 16:13:14 -05:00