Commit graph

3375 commits

Author SHA1 Message Date
Robin Sommer
b99f4decf2 Merge remote-tracking branch 'origin/topic/jsiwek/tunnels-merge'
* origin/topic/jsiwek/tunnels-merge:
  Make Teredo bubble packet parsing more lenient.
2012-06-19 13:23:58 -07:00
Robin Sommer
b096168318 Merge branch 'topic/robin/tunnels-merge'
* topic/robin/tunnels-merge: (51 commits)
  Updating baselines and NEWS.
  Remove &synchronized from Tunnel::active table.
  Refactor of interal tunnel analysis code.
  Add state management of NetSessions's IP tunnel map.
  Add "encap_hdr_size" option back in.
  Script-layer tunnel interface cleanup.
  Fix performance problem checking packet encapsulation. (addresses #830)
  Adding a SOCKS test case.
  Updating DataSeries baselines.
  Moving my todos over to the tracker ticket.
  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.
  ...

Conflicts:
	src/event.bif
2012-06-19 13:21:31 -07:00
Jon Siwek
83f385b2b0 Make Teredo bubble packet parsing more lenient.
Teredo bubble packets (IPv6 w/ No Next Header and zero Payload Length)
with data extending past the inner IPv6 header (the outer IPv4 header's
Total Length and UDP header's Length indicate this) now only raises
a "Teredo_payload_len_mismatch" weird instead of causing a
ProtocolViolation().

This also fixes a crash in NetSessions::ParseIPPacket() that occurred
when the packet length didn't match the payload length field.
2012-06-19 12:59:38 -05:00
Robin Sommer
cf593f13e0 Updating baselines and NEWS. 2012-06-18 15:58:52 -07:00
Robin Sommer
ce1b9eb8ff Merge remote-tracking branch 'origin/topic/jsiwek/tunnels-merge' into topic/robin/tunnels-merge
* origin/topic/jsiwek/tunnels-merge:
  Remove &synchronized from Tunnel::active table.
  Refactor of interal tunnel analysis code.
  Add state management of NetSessions's IP tunnel map.
  Add "encap_hdr_size" option back in.
  Script-layer tunnel interface cleanup.
2012-06-18 15:45:56 -07:00
Robin Sommer
2f6a76c2ae Merge remote-tracking branch 'origin/topic/jsiwek/tunnels-merge' into topic/robin/tunnels-merge
* origin/topic/jsiwek/tunnels-merge:
  Fix performance problem checking packet encapsulation. (addresses #830)
2012-06-18 15:37:22 -07:00
Jon Siwek
d6286d953d Remove &synchronized from Tunnel::active table. 2012-06-18 17:04:46 -05:00
Jon Siwek
ce58a3e908 Refactor of interal tunnel analysis code.
- Pulled more common code into NetSessions::DoNextInnerPacket()
  and made the pcap header it makes internally use network_time

- Remove Encapsulation class ctor from pointer

- Rename Encapsulation class to EncapsulationStack
2012-06-18 16:56:19 -05:00
Jon Siwek
e04d629733 Add state management of NetSessions's IP tunnel map.
Entries are checked for inactivity at an interval controlled by
"Tunnel::ip_tunnel_timeout" and discarded if needed.
2012-06-18 15:44:34 -05:00
Seth Hall
7fc96a8c0f Adding a define to make the stdint C macros available. 2012-06-18 15:49:00 -04:00
Jon Siwek
2ba3f5420b Add "encap_hdr_size" option back in.
The "tunnel_port" and "parse_udp_tunnels" options are still gone
as those did not work entirely (e.g. IPv6 support and misnaming
of tunnel_port/udp_tunnel_port).
2012-06-18 12:48:03 -05:00
Jon Siwek
f3b3e73eba Script-layer tunnel interface cleanup.
- Clarify "tunnel_changed" event documentation.

- Make expiration of "Tunnel::active" elements configuration via
  "Tunnel::expiration_interval".

- Remove redundant registration of a connection's tunnels in
  tunnel/main.bro's "tunnel_changed" handler.

- Rename "parents" field of "Conn::Info" to "tunnel_parents"
  to give more context.
2012-06-18 12:29:49 -05:00
Jon Siwek
146cb47d6a Fix performance problem checking packet encapsulation. (addresses #830)
Connections were creating a new encapsulation object for nearly
every packet even if no tunnels were ever involved with the Connection.
2012-06-18 11:11:07 -05:00
Seth Hall
95f4390cb6 Adding an extra header. 2012-06-18 02:03:43 -04:00
Seth Hall
52ceee8c86 Fixed a bug with messed up time value passing to elasticsearch. 2012-06-18 01:31:52 -04:00
Seth Hall
cb7eac212e Small updates and a little standardization for config.h.in naming. 2012-06-17 22:55:11 -04:00
Seth Hall
57980c86e6 Bug fixes.
- The curl handle is now cleaned up correctly.

- Interval values are now treated as doubles.  Treating them as uint64_t
  was wrong because intervals can be negative.  There is also no obvious
  benefit in elasticsearch to converting the value to milliseconds.
2012-06-17 21:41:29 -04:00
Seth Hall
cd8169dda3 Bug fix and feature.
- Fixed bug with how data is sent to elasticsearch.

- Added a feature to only allow data of a certain
  size to be buffered before sending to the
  elasticsearch server.  Configured with the
  LogElasticSearch::max_byte_size variable.
2012-06-16 22:22:40 -04:00
Seth Hall
b1561437e9 Forgot to call the parent method for DoHeartBeat. 2012-06-16 00:35:40 -04:00
Seth Hall
8334dceadb Changed the escaping method. 2012-06-15 22:19:51 -04:00
Seth Hall
ca5eb5382a Flush logs to ES daemon as Bro is shutting down. 2012-06-15 21:06:06 -04:00
Seth Hall
a4df914ab7 Reduce the batch size to 1000 and add a maximum time interval for batches. 2012-06-15 20:53:09 -04:00
Robin Sommer
6f3b6a6432 Updating submodule(s).
[nomail]
2012-06-15 16:25:50 -07:00
Robin Sommer
41ef1072ec Changing an error in the input framework to a warning. 2012-06-15 16:25:31 -07:00
Robin Sommer
c7c3ff7af9 Adding a SOCKS test case.
However, I'm not sure the output is right.
2012-06-15 16:01:59 -07:00
Robin Sommer
464732bfce Merge remote-tracking branch 'origin/topic/bernhard/input-threads-merge'
* origin/topic/bernhard/input-threads-merge:
  disable streaming reads from executed commands.
  automatically delete disabled input streams
  small documentation fixes
  Documentation
2012-06-15 15:39:58 -07:00
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
9808738412 Updating submodule(s).
[nomail]
2012-06-15 15:24:03 -07:00
Robin Sommer
82df709c4d Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Remove an old, unused diff canonifier.
  Improve an error message in ICMP analyzer.
  Fix a warning message
  Fix many errors in the event documentation
2012-06-15 15:20:23 -07:00
Robin Sommer
d727b4f68a Updating DataSeries baselines. 2012-06-15 15:05:42 -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
Jon Siwek
350c93c136 Remove an old, unused diff canonifier. 2012-06-15 11:22:15 -05:00
Vlad Grigorescu
d3bb4617e9 Configuration logic - if libcurl is found, enable elasticsearch plugin. 2012-06-15 11:21:24 -04:00
Vlad Grigorescu
22efa45279 Merging in latest changes from Bro master. 2012-06-15 10:48:22 -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
Jon Siwek
22fb039e83 Improve an error message in ICMP analyzer. 2012-06-13 16:59:15 -05:00
Daniel Thayer
b66b022be0 Fix a warning message
When building the docs, a WARNING message was visible.  Reworded the
doc comment to prevent this warning.
2012-06-13 12:21:16 -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
1c7709ed89 Updating submodule(s).
[nomail]
2012-06-11 17:25:06 -07: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
Robin Sommer
14fa3fc799 Updating CHANGES and VERSION. 2012-06-11 15:56:35 -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
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
Robin Sommer
83dcbd4aa7 Updating submodule(s).
[nomail]
2012-06-07 15:13:13 -07:00
Robin Sommer
f863214cb1 Merge commit 'd1e4e6e812'
* commit 'd1e4e6e812':
  Include header for usleep(), caused compile failure on Archlinux.
2012-06-07 15:07:46 -07: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