Commit graph

434 commits

Author SHA1 Message Date
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
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
dd4dd0ca6e Add @load-sigs directive for loading signature files (addresses #551). 2012-06-01 14:10:23 -05:00
Robin Sommer
c0e0481af2 Merge branch 'topic/robin/input-threads-merge'
* topic/robin/input-threads-merge: (130 commits)
  And now it even compiles after my earlier changes.
  A set of input framework refactoring, cleanup, and polishing.
  another small memory leak in ascii reader:
  and another small memory leak when using streaming reads.
  fix another memory lead (when updating tables).
  Input framework merge in progress.
  filters have been called streams for eternity. And I always was too lazy to change it everywhere...
  reactivate network_time check in threading manager. previously this line made all input framework tests fail - it works now. Some of the other recent changes of the threading manager must have fixed that problem.
  fix up the executeraw test - now it works for the first time and does not always fail
  baselines for the autostart removal.
  remove last remnants of autostart, which has been removed for quite a while.
  make input framework source (hopefully) adhere to the usual indentation style. No functional changes.
  fix two memory leaks which occured when one used filters.
  update description to current interface.
  rename a couple of structures and make the names in manager fit the api more.
  fix memory leak in tables and vectors that are read into tables
  fix missing get call for heart beat in benchmark reader.
  fix heart_beat_interval -- initialization in constructor does not work anymore (probably due to change in init ordering?)
  fix memory leak for tables... nearly completely.
  fix a couple more leaks. But - still leaking quite a lot with tables.
  ...
2012-05-30 19:12:18 -07:00
Robin Sommer
fc907c0090 A set of input framework refactoring, cleanup, and polishing. 2012-05-30 16:38:08 -07:00
Robin Sommer
b37f9e38f6 Input framework merge in progress. 2012-05-25 16:16:53 -07:00
Bernhard Amann
658b188dff filters have been called streams for eternity. And I always was too
lazy to change it everywhere...

Fix that.
2012-05-25 16:11:30 -07:00
Bernhard Amann
2e452dc29f remove last remnants of autostart, which has been removed for quite a while. 2012-05-25 10:49:17 -07:00
Bernhard Amann
976d8f7ba7 Merge remote-tracking branch 'origin/master' into topic/bernhard/input-threads 2012-05-25 10:33:50 -07:00
Robin Sommer
da34266a52 Switching default DS compression to gzip. 2012-05-25 08:36:59 -07:00
Robin Sommer
7e961606cd Merge remote-tracking branch 'origin/topic/jsiwek/ipv6-flow-label'
* origin/topic/jsiwek/ipv6-flow-label:
  Improve availability of IPv6 flow label in connection records.

Closes #821.
2012-05-24 17:05:55 -07:00
Robin Sommer
f7261a7851 Merge remote-tracking branch 'origin/topic/jsiwek/ipv6-comm'
* origin/topic/jsiwek/ipv6-comm:
  Enable Bro to communicate with peers over non-global IPv6 addresses.
  Add unit tests for Broccoli SSL and Broccoli IPv6 connectivity.
  Remove AI_ADDRCONFIG getaddrinfo hints flag for listening sockets.
  Undo communication protocol version bump.
  Add support to Bro for connecting with peers over IPv6.

Closes #820.

Conflicts:
	src/bro.bif
2012-05-24 17:01:34 -07:00
Jon Siwek
074a0a9dce Documentation fixes. 2012-05-23 14:29:16 -05:00
Jon Siwek
5312b21d7b Improve availability of IPv6 flow label in connection records.
Without this change, flow labeling of connections over IPv6 are
only available in the per-packet types of events (e.g. new_packet)
in which header fields can be inspected, but now minimal tracking
of the most recent flow label is done internally and that's available
per-connection for all events that use connection record arguments.

Specifically, this adds a "flow_label" field to the "endpoint" record
type, which is used for both the "orig" and "resp" fields of
"connection" records.  The new "connection_flow_label_changed" event
also allows tracking of changes in flow labels: it's raised each time
one direction of the connection starts using a different label.
2012-05-22 15:18:33 -05:00
Bernhard Amann
3b82d69eb3 Merge remote-tracking branch 'origin/master' into topic/bernhard/input-threads
Conflicts:
	src/CMakeLists.txt
	testing/btest/Baseline/coverage.bare-load-baseline/canonified_loaded_scripts.log
	testing/btest/Baseline/coverage.default-load-baseline/canonified_loaded_scripts.log
2012-05-18 15:26:36 -07:00
Daniel Thayer
5ab765b4b6 Replace ip6_hdr_chain with ip6_ext_hdr in comments
This fixes some warnings that were appearing when building the documentation.
2012-05-18 11:23:09 -05:00
Robin Sommer
7cc863c5fc Fix for when not producing local output; that hung.
* origin/topic/robin/dataseries:
  Moving trace for rotation test into traces directory.
  Fixing a rotation race condition at termination.
  Portability fixes.
  Extending DS docs with some examples.
  Updating doc.
  Fixing pack_scale and time-as-int.
  Adding format specifier to DS spec to print out double as %.6f.
  DataSeries updates and fixes.
  DataSeries tuning.
  Tweaking DataSeries support.
  Extending log post-processor call to include the name of the writer.
  Removing an unnecessary const cast.
  DataSeries TODO list with open issues/questions.
  Starting DataSeries HowTo.
  Additional test output canonification for ds2txt's timestamps.
  In threads, an internal error now immediately aborts.
  DataSeries cleanup.
  Working on DataSeries support.
  Merging in DataSeries support from topic/gilbert/logging.
  Fixing  threads' DoFinish() method.
2012-05-17 12:38:47 -07:00
Jon Siwek
f819a966d8 Merge branch 'master' into topic/jsiwek/ipv6-comm 2012-05-17 14:28:16 -05:00
Jon Siwek
74f3a32321 Enable Bro to communicate with peers over non-global IPv6 addresses.
This usually requires specifying an additional zone identifier
(see RFC 4007).  The connect() and listen() BIFs have been
changed to accept this zone identifier as an argument.
2012-05-17 12:59:20 -05:00
Robin Sommer
be6567f437 Merge remote-tracking branch 'origin/master' into topic/robin/dataseries 2012-05-14 22:17:26 -07:00
Jon Siwek
1e66fe905a Add support to Bro for connecting with peers over IPv6.
- Communication::listen_ipv6 needs to be redef'd to true in order
  for IPv6 listening sockets to be opened.

- Added Communication::listen_retry option as an interval at which
  to retry binding to socket addresses that were already in use.

- Added some explicit baselines to check in the istate.events
  and istate.events-ssl tests -- the SSL test was incorrectly
  passing because it compared two empty files.  (The files being
  empty because "http/base" was given as an argument to Bro which
  it couldn't handle because that script doesn't exist anymore).
2012-05-09 15:08:36 -05:00
Jon Siwek
905e4d3a14 Change IPv6 output format to no longer automatically be bracketed.
Instead, the `addr_to_uri` script-level function can be used to
explicitly add brackets to an address if it's IPv6 and will be
included in a URI or when a ":<port>" needs to be appended to it.
2012-05-07 12:55:54 -05:00
Jon Siwek
af4be0bbe6 Merge branch 'master' into topic/jsiwek/ipv6-output-format 2012-05-07 11:19:15 -05:00
Jon Siwek
5984564946 Change IPv6 address/prefix output format to be bracketed.
Also add a test case for content extraction.
2012-05-04 11:21:18 -05:00
Robin Sommer
87ac88cfd2 Merge remote-tracking branch 'origin/topic/jsiwek/file-caching-serialization'
* origin/topic/jsiwek/file-caching-serialization:
  Changes to open-file caching limits and uncached file unserialization.

Closes #780.
2012-05-03 13:42:42 -07:00
Robin Sommer
c327a0613a Merge remote-tracking branch 'origin/topic/seth/ssl-fixes'
* origin/topic/seth/ssl-fixes:
  More bugfixs, cleanup, and test for SSL analyzer
  Fixed parsing of TLS server extensions.

Closes #817.
2012-05-03 13:32:49 -07:00
Robin Sommer
232b7688b2 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Add two more TLS extension values that we see in live traffic.
  Fixed IPv6 link local unicast CIDR and added	IPv6 loopback to private address space.
  Fixed a problem where cluster workers were still processing notices in some cases.
  Added Carrier Grade NAT CIDR and link local IPv6 to "private_address_space"
2012-05-03 11:45:00 -07:00
Jon Siwek
bbac44a6a4 Changes to open-file caching limits and uncached file unserialization.
- Unserializing files that were previously kicked out of the open-file
  cache would cause them to be fopen'd with the original access
  permissions which is usually 'w' and causes truncation.  They
  are now opened in 'a' mode.  (addresses #780)

- Add 'max_files_in_cache' script option to manually set the maximum
  amount of opened files to keep cached.  Mainly this just helped
  to create a simple test case for the above change.

- Remove unused NO_HAVE_SETRLIMIT preprocessor switch.

- On systems that don't enforce a limit on number of files opened for
  the process, raise default max size of open-file cache from
  32 to 512.
2012-05-03 13:13:58 -05:00
Seth Hall
0a6104fe66 More bugfixs, cleanup, and test for SSL analyzer
- SSL related files and classes renamed to remove the "binpac" term.

- A small fix for DPD scripts to make the DPD log more helpful if
  there are multiple continued failures.  Also, fixed the SSL
  analyzer to make it stop doing repeated violation messages for
  some handshake failures.

- Added a $issuer_subject to the SSL log.

- Created a basic test for SSL.
2012-05-03 10:52:24 -04:00
Bernhard Amann
bff3cba129 Add two more TLS extension values that we see in live traffic.
- origin_bound_certificates is a current draft
http://tools.ietf.org/html/draft-balfanz-tls-obc-01

- encrypted client certificates is a draft that
  expired yesterday.
http://tools.ietf.org/html/draft-agl-tls-encryptedclientcerts-00
2012-04-27 16:18:14 -07:00
Seth Hall
8f91ecee71 Fixed IPv6 link local unicast CIDR and added IPv6 loopback to private address space. 2012-04-27 01:24:41 -04:00
Seth Hall
c561a44326 Fixed a problem where cluster workers were still processing notices in some cases. 2012-04-26 10:45:28 -04:00
Seth Hall
8c14b5a911 Added Carrier Grade NAT CIDR and link local IPv6 to "private_address_space" 2012-04-25 14:38:11 -04:00
Robin Sommer
0ae38ce2b8 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Add some extra TLS extension values.
  Fix problem with extracting FTP passwords.
2012-04-24 14:39:27 -07:00
Seth Hall
c10ff6fd69 Add some extra TLS extension values.
- extended_random is an expired draft rfc, but we see it
  in live traffic.
  - http://tools.ietf.org/html/draft-rescorla-tls-extended-random-01

- heartbeat RFC was ratified in Feb. 2012.
  - http://tools.ietf.org/html/rfc6520
2012-04-24 16:58:03 -04:00
Seth Hall
6e2205aa68 Fix problem with extracting FTP passwords.
- Added "ftpuser" as another anonymous username.

- Problem discovered by Patrik Lundin.
2012-04-21 14:33:14 -04:00
Robin Sommer
18aa41c62b Extending log post-processor call to include the name of the writer. 2012-04-19 10:41:01 -07:00
Jon Siwek
b933184b25 Changes related to ICMPv6 Neighbor Discovery messages.
- The 'icmp_conn' record now contains an 'hlim' field since hop limit
  in the IP header is an interesting field for at least these ND
  messages.

- Changed 'icmp_router_advertisement' event parameters.
  'router_lifetime' is now an interval. Fix 'reachable_time' and
  'retrans_timer' using wrong internal Val type for intervals.
  Made more of the known router advertisement flags available through
  boolean parameters.

- Changed 'icmp_neighbor_advertisement' event parameters to add
  more of the known boolean flags.
2012-04-18 13:13:56 -05:00
Bernhard Amann
a2f1af12fa Merge remote-tracking branch 'origin/master' into topic/bernhard/input-threads 2012-04-18 09:28:49 -07:00
Robin Sommer
5350cab371 Merge remote-tracking branch 'origin/topic/icmp6'
* origin/topic/icmp6:
  Fixes for IPv6 truncation and ICMP/ICMP6 analysis.
  Change ICMPv6 checksum calculation to use IP_Hdr wrapper.
  Update IPv6 atomic fragment unit test to filter output of ICMPv6.
  Add more data to icmp events
  More code cleanup
  Add more icmpv6 events, and general code cleanup
  Fix compile failure after merge from master
  Significant edit pass over ICMPv6 code.
  Porting Matti's branch to git.

Closes #808.
2012-04-17 19:02:59 -07:00
Robin Sommer
a7bc12066b Merge remote-tracking branch 'origin/master' into topic/robin/dataseries
Conflicts:
	CMakeLists.txt
	cmake
2012-04-17 16:37:37 -07:00
Seth Hall
18f5018a0d Removing QR flag from DNS log in response to question on mailing list. 2012-04-16 17:26:16 -07:00
Jon Siwek
51bad73e1e Fixes for IPv6 truncation and ICMP/ICMP6 analysis.
- Add more guards against trying to analyze captured packets with a
  truncated IPv6 static header or extension header chain.

- Add back in the ICMP payload tracking for ICMP "connections".

- Fix 'icmp_context' record construction.  Some field assignments
  were mismatched for ICMP and ICMP6.  Source and destination
  addresses were set incorrectly for context packets that don't
  contain a full IP header.  Some fields for ICMP6 weren't filled out.

- Changed ICMP Time Exceeded packets to raise the 'icmp_time_exceeded'
  event instead of 'icmp_error_message'.

- Add unit tests for truncation and the main types of ICMP/ICMP6
  that have specific events.

- Documentation clarifications.
2012-04-11 16:27:31 -05:00
Bernhard Amann
62519f4408 Merge remote-tracking branch 'origin/master' into topic/bernhard/input-threads
Conflicts:
	src/threading/Manager.cc
2012-04-10 22:12:54 +02:00
Daniel Thayer
69c09a209c Merge remote-tracking branch 'origin/master' into topic/icmp6
Conflicts:
	src/net_util.cc
	src/net_util.h
2012-04-10 09:54:07 -05:00
Robin Sommer
cccaad63b3 Merge remote-tracking branch 'origin/topic/jsiwek/mobile-ipv6'
* origin/topic/jsiwek/mobile-ipv6:
  Add support for mobile IPv6 Mobility Header (RFC 6275).
  Refactor IP_Hdr routing header handling, add MobileIPv6 Home Address handling.
  Revert TCP checksumming to cache common data, like it did before.
  Revert "Improve handling of IPv6 Routing Type 0 headers."
  Improve handling of IPv6 routing type 0 extension headers.
2012-04-09 17:49:52 -07:00
Robin Sommer
7131feefbc Working on DataSeries support.
- The option to use integers insteads of double was ignored.

   - Renaming script-level options to remove the ds_ prefix.

   - Log rotation didn't work.

   - A set of simple unit tests.
2012-04-09 17:46:56 -07:00
Jon Siwek
91330f1e1c Add support for mobile IPv6 Mobility Header (RFC 6275).
- Accessible at script-layer through 'mobile_ipv6_message' event.

- All Mobile IPv6 analysis now enabled through --enable-mobile-ipv6
  configure-time option, otherwise the mobility header, routing type 2,
  and Home Address Destination option are ignored.
2012-04-09 14:39:00 -05:00
Daniel Thayer
79a6da285f Merge remote-tracking branch 'origin/master' into topic/icmp6 2012-04-06 15:59:57 -05:00
Robin Sommer
952b6b293a Merging in DataSeries support from topic/gilbert/logging.
I copied the code over manually, no merging, because (1) it needed to
be adapted to the new threading API, and (2) there's more stuff in the
branch that I haven't ported yet.

The DS output generally seems to work, but it has seen no further
testing yet.

Not unit tests yet either.
2012-04-03 22:14:56 -07:00