Commit graph

3113 commits

Author SHA1 Message Date
Robin Sommer
99db264775 Portability fixes.
- Fix for time-as-int on 32-bit systems.

    - Skipping ds2txt's index output for test diffing, as it seems
      non-portable.
2012-05-16 18:01:28 -07:00
Robin Sommer
be6567f437 Merge remote-tracking branch 'origin/master' into topic/robin/dataseries 2012-05-14 22:17:26 -07:00
Robin Sommer
fabe891d4f Fixing pack_scale and time-as-int.
Also removing now unneccessary canonifier script, and updating test
baselines.
2012-05-14 22:04:57 -07:00
Robin Sommer
87c68e8ce7 Merge remote-tracking branch 'origin/topic/dnthayer/bug805'
* origin/topic/dnthayer/bug805:
  Update tests (use weird.log instead of stderr)
  Don't print the various "weird" events to stderr

Closes #805.
2012-05-14 17:16:45 -07:00
Robin Sommer
cb1e9a7c6f Merge remote-tracking branch 'origin/topic/jsiwek/ipv6-output-format'
* origin/topic/jsiwek/ipv6-output-format:
  Change IPv6 output format to no longer automatically be bracketed.
  Change IPv6 address/prefix output format to be bracketed.

Closes #818.
2012-05-14 17:07:02 -07:00
Robin Sommer
c0257c5521 Switching to new btest command TEST-SERIALIZE for communication tests. 2012-05-14 16:50:48 -07:00
Jon Siwek
d3ea312782 Add unit tests for Broccoli SSL and Broccoli IPv6 connectivity. 2012-05-11 17:16:57 -05:00
Daniel Thayer
508d39457a Update tests (use weird.log instead of stderr) 2012-05-11 17:09:01 -05:00
Jon Siwek
2338a32288 Remove AI_ADDRCONFIG getaddrinfo hints flag for listening sockets.
Because, according to RFC 3493, that will cause getaddrinfo to
overlook the ::1 loopback if there's not some other interface with
a global IPv6 address.  The rationale being that the flag helps
prevent unnecessary AAAA lookups, but since I set AI_NUMERICHOST,
lookups aren't going to happen anyway.

Also update the IPv6 Bro communication test to get it to work more
reliably.
2012-05-10 10:47:39 -05: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
Robin Sommer
a0575158ef DataSeries updates and fixes. 2012-05-04 21:58:39 -07:00
Robin Sommer
ed9801db98 Merge remote-tracking branch 'origin/topic/jsiwek/digests'
* origin/topic/jsiwek/digests:
  Add SHA1 and SHA256 hashing BIFs. (addresses #542)

Closes #542.
2012-05-04 21:29:29 -07:00
Jon Siwek
79afc834ce Add SHA1 and SHA256 hashing BIFs. (addresses #542)
Also refactor all internal MD5 stuff to use OpenSSL's.
2012-05-04 16:09:05 -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
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
Seth Hall
ed2a5d6ac2 Last test update for PacketFilter framework. 2012-05-02 22:54:39 -04:00
Seth Hall
0c97c3c1de Several final fixes for PacketFilter framework.
- Fixed how the dpd_* variables are written.

- Fixed a bug with the shunting code.

- Updated a few tests.
2012-05-02 21:16:30 -04:00
Jon Siwek
064c5dddb8 Fix for IP tunnel UID persistence. 2012-04-27 10:28:46 -05:00
Jon Siwek
b8e1604ab5 Make tunnels always identifiable by UID, tunnel.log now gets populated.
conn.log now sets a field indicating all the parent tunnel UIDs over
which a connection operated and cross reference the UIDs found in
the tunnel.log.

Also some renaming of tunnel related types at the scripting layer.
2012-04-26 12:29:59 -05:00
Robin Sommer
c91563fe75 DataSeries tuning.
- Now using the new DS interface from git to remove warning.

- New leak tests, not yet tried,
2012-04-24 17:57:05 -07:00
Jon Siwek
b51dd191d7 Refactor IP-in-IP tunnel support.
UDP tunnel support removed for now, to be re-added in specific
analyzers later, but IP-in-IP is now decapsulated recursively
so nested tunnels can be seen and the inner packets get sent
through the IP fragment reassembler if necessary.
2012-04-23 13:15:29 -05:00
Robin Sommer
4b70adcb4b Tweaking DataSeries support. 2012-04-19 10:42:09 -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
Robin Sommer
fe2535b08d Updating baselines for DNS change. 2012-04-16 18:08:16 -07:00
Robin Sommer
91a3ce9518 Additional test output canonification for ds2txt's timestamps. 2012-04-16 15:20:10 -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
Robin Sommer
86834c941c Adding missing leak groups to a couple tests.
Also activating leak checking for proxy in basic-cluster test.
2012-04-10 16:14:33 -07: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
Jon Siwek
27ba3118c1 Change ICMPv6 checksum calculation to use IP_Hdr wrapper.
So that src/dst addresses used in pseudo-header are correct when
there's certain extension headers (routing/destination).

Add ICMP/ICMPv6 checksum unit tests.
2012-04-10 11:37:08 -05:00
Jon Siwek
958c6c7cf4 Update IPv6 atomic fragment unit test to filter output of ICMPv6.
Since that's not relevant to test.
2012-04-10 11:09: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
Jon Siwek
fcd8f9b77e Fix table expiry for values assigned in bro_init() when reading live.
Value assigned in bro_init() to a table with &create_expire
weren't expiring when reading traffic from an interface.  It worked
when reading a pcap file, but I added a test case to show it still
working.
2012-04-06 13:24:27 -05:00
Jon Siwek
29724415c3 Merge branch 'master' into topic/jsiwek/mobile-ipv6
Conflicts:
	src/IP.cc
2012-04-05 12:05:06 -05:00
Jon Siwek
f3455f843e Merge branch 'master' into fastpath 2012-04-05 11:41:00 -05:00
Jon Siwek
11b15cc290 Refactor IP_Hdr routing header handling, add MobileIPv6 Home Address handling.
Packets that use the Home Address Destination option use that option's
address as the connection's originator.
2012-04-05 10:50:35 -05:00
Jon Siwek
d8d83f590b Fix handling of IPv6 atomic fragments.
The FragReassembler expire_timer was left uninitialized until after
the first fragment is added, but since the atomic fragment is also
the last, the reassembler thought expire_timer needed to be deleted.
This fix just initializes expire_timer before the first fragment is
added.
2012-04-04 15:27:43 -05:00
Bernhard Amann
fd70560017 Merge remote-tracking branch 'origin/topic/robin/log-threads' into topic/bernhard/input-threads 2012-03-30 11:00:51 -07:00
Jon Siwek
256c0af98e Merge branch 'master' into topic/robin/log-threads
Conflicts:
	cmake
2012-03-30 12:02:32 -05:00
Jon Siwek
877cc5b235 Merge branch 'topic/jsiwek/routing0' into topic/jsiwek/mobile-ipv6
Conflicts:
	src/net_util.cc
	src/net_util.h
2012-03-29 14:34:39 -05:00
Jon Siwek
3a4d035603 Revert "Improve handling of IPv6 Routing Type 0 headers."
This reverts commit 256cd592a7.

Conflicts:

	src/IP.cc
	src/Sessions.cc
2012-03-29 14:29:33 -05:00
Robin Sommer
de7300f999 Merge remote-tracking branch 'origin/topic/jsiwek/skip-rh0-segleft'
* origin/topic/jsiwek/skip-rh0-segleft:
  Improve handling of IPv6 Routing Type 0 headers.

Closes #804.
2012-03-28 15:12:01 -07:00