Commit graph

351 commits

Author SHA1 Message Date
Seth Hall
ad55331258 Merge branch 'topic/tunnels' of ssh://git.bro-ids.org/bro into topic/tunnels 2012-04-24 17:30:57 -04:00
Seth Hall
2235647ab7 Some improvements to the AYIYA analyzer.
- Reenabled AYIYA dpd sigs.
2012-04-24 17:30:37 -04:00
Jon Siwek
bd01525a86 Remove Tunnel::decapsulate_ip option.
Setting Tunnel::max_depth to zero effectively disables tunnel
decapsulation.
2012-04-24 14:25:47 -05:00
Seth Hall
2a79fe95ec Another tunneling checkpoint.
- AYIYA works.
  - AYIYA analyzed connections are still labelled wrong in conn.log (logged as syslog)
- Some clean up for left over code.
- Small refactoring to pass packets back from analyzers to core.
- $uid is now optional in conn logs since ip-in-ip tunnel parent's
  won't have an actual connection.
2012-04-24 01:05:35 -04:00
Jon Siwek
ae96314196 Merge branch 'topic/tunnels' of git://git.bro-ids.org/bro into topic/tunnels 2012-04-23 13:24:36 -05: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
Seth Hall
e2da969415 Return of Robin's old SOCKS analyzer/decapsulator and tunnel code checkpoint.
- More discussion is needed to figure out how to integrate the SOCKS analyzer best.

- Tunnels framework now logs for the SOCKS analyzer.
2012-04-21 23:50:09 -04:00
Seth Hall
dff3fabcea Added a DPD signature for AYIYA, but it's crashing Bro. 2012-04-21 15:25:19 -04:00
Seth Hall
69ab13c88f Added some scripts for a tunnels framework.
- The AYIYA analyzer is now enabled on it's default port.
2012-04-21 15:10:30 -04:00
Jon Siwek
4062fc1776 Merge branch 'master' into topic/tunnels
Conflicts:
	doc/scripts/DocSourcesList.cmake
	scripts/base/init-bare.bro
	src/ConnCompressor.cc
	src/Sessions.cc

Just trying to bring topic/gregor/tunnel up to date in this new branch.
Compiles, but untested.
2012-04-18 16:59:49 -05: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
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
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
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
Daniel Thayer
bae6a4178e Merge remote-tracking branch 'origin/master' into topic/icmp6
Conflicts:
	scripts/base/init-bare.bro
	src/Sessions.cc
2012-03-26 17:07:32 -05:00
Jon Siwek
0ceca706f6 Change routing0_data_to_addrs BIF to return vector of addresses.
Because the order of addresses in type 0 routing headers is
interesting/important.
2012-03-26 14:35:01 -05:00
Robin Sommer
30014ac920 Cosmetics in preparation for merge. 2012-03-23 17:00:51 -07:00
Robin Sommer
4321f635ac Removing remaining comments. Looks fine. 2012-03-23 17:00:51 -07:00
Jon Siwek
c765f43fe3 Refactor script-layer IPv6 ext. header chain (addresses #795)
This replaces the "ip6_hdr_chain" in the "ip6_hdr" record with a vector of
"ip6_ext_hdr" to make it easier to traverse the chain.
2012-03-21 10:34:38 -05:00
Jon Siwek
1c1d657039 Changes to IPv6 ext. header parsing (addresses #795).
In response to feedback from Robin:

  - rename "ip_hdr" to "ip4_hdr"

  - pkt_hdr$ip6 is now of type "ip6_hdr" instead of "ip6_hdr_chain"

  - "ip6_hdr_chain" no longer contains an "ip6_hdr" field, instead
    it's the other way around, "ip6_hdr" contains an "ip6_hdr_chain"

  - other internal refactoring
2012-03-20 15:50:17 -05:00
Jon Siwek
f11fca588e Merge branch 'master' into topic/jsiwek/ipv6-ext-headers 2012-03-19 14:26:59 -05:00
Daniel Thayer
cea52fbccb Merge remote-tracking branch 'origin/master' into topic/icmp6 2012-03-14 11:29:29 -05:00
Robin Sommer
79948c7974 Merge remote-tracking branch 'origin/topic/jsiwek/ipv6-ext-headers'
* origin/topic/jsiwek/ipv6-ext-headers:
  Update PacketFilter/Discarder code for IP version independence.
  Add a few comments to IP.h
  Fix some IPv6 header related bugs.
  Add IPv6 fragment reassembly.
  Add handling for IPv6 extension header chains (addresses #531)
2012-03-13 15:25:18 -07:00
Robin Sommer
e83714e178 Merge branch 'master' into topic/jsiwek/ipv6-ext-headers 2012-03-13 15:25:05 -07:00
Jon Siwek
bf3f184a01 Change IPv6 literal constant syntax to require encasing square brackets
This is to avoid ambiguity between compressed hex notation and
module namespacing, both which use "::". E.g.: "aaaa::bbbb" could
be an identifier or an IPv6 address, but "[aaaa::bbbb]" is now
clearly the address.

Also added IPv6 mixed notation to allow an IPv4 dotted-decimal
address to be specified in the lower 32-bits.
2012-03-13 13:47:07 -05:00
Jon Siwek
0b32c980bf Update PacketFilter/Discarder code for IP version independence.
The signatures of script-layer functions 'discarder_check_ip',
'discarder_check_tcp', 'discarder_check_udp', and 'discarder_check_icmp'
were changed to use the more general 'pkt_hdr' type as a parameter
instead of individual header types.
2012-03-08 13:12:04 -06:00
Jon Siwek
a0e07018f4 Merge branch 'master' into topic/jsiwek/ipv6-ext-headers 2012-03-05 09:31:53 -06:00
Jon Siwek
eb9f686bb2 Add handling for IPv6 extension header chains (addresses #531)
- The script-layer 'pkt_hdr' type is extended with a new 'ip6' field
  representing the full IPv6 header chain.

- The 'new_packet' event is now raised for IPv6 packets (addresses #523)

- A new event called 'ipv6_ext_header' is raised for any IPv6 packet
  containing extension headers.

- A new event called 'esp_packet' is raised for any packets using ESP
  ('new_packet' and 'ipv6_ext_header' events provide connection info,
  but that info can't be provided here since the upper-layer payload
  is encrypted).

- The 'unknown_protocol' weird is now raised more reliably when Bro
  sees a transport protocol or IPv6 extension header it can't handle.
  (addresses #522)

Still need to do IPv6 fragment reassembly and needs more testing.
2012-03-02 20:20:57 -06:00
Daniel Thayer
e9728d82ab Merge remote-tracking branch 'origin/master' into topic/icmp6 2012-03-02 10:50:05 -06:00
Robin Sommer
fd1cc49d67 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Standardized on the &default function for SSL constants.
2012-03-01 08:31:52 -08:00
Seth Hall
87ad77cc10 Standardized on the &default function for SSL constants. 2012-02-29 22:34:31 -05:00
Seth Hall
b3764dcad5 Cleaned up dead code from the old SSL analyzers. (Reported by Julien Sentier) 2012-02-29 09:43:37 -05:00
Daniel Thayer
54d5d38fd3 Merge remote-tracking branch 'origin/master' into topic/icmp6
Conflicts:
	src/Sessions.cc
2012-02-28 18:39:31 -06:00
Daniel Thayer
0a659c0907 Merge remote-tracking branch 'origin/master' into topic/icmp6 2012-02-27 13:33:05 -06:00
Jon Siwek
e07470c7f1 Remove connection compressor (addresses #559). 2012-02-27 11:35:25 -06:00
Robin Sommer
4ef8607e60 Merge remote-tracking branch 'origin/topic/dnthayer/ftp-ipv6'
* origin/topic/dnthayer/ftp-ipv6:
  Add test case for FTP over IPv4
  Fix IPv6 URLs
  Add a test for FTP over IPv6
  Update FTP EPSV response processing for IPv6
  Fix parsing of FTP EPRT command and EPSV response

Conflicts:
	src/bro.bif

Closes #778.
2012-02-24 15:00:41 -08:00
Daniel Thayer
8e32e89ce4 Merge remote-tracking branch 'origin/master' into topic/icmp6
Conflicts:
	src/ICMP.cc
	src/net_util.cc
	src/net_util.h
2012-02-20 17:18:55 -06:00
Daniel Thayer
d61fad4f9e Fix IPv6 URLs 2012-02-17 10:55:17 -06:00
Daniel Thayer
2f2509fdce Merge remote-tracking branch 'origin/topic/v6-addr' into topic/dnthayer/ftp-ipv6 2012-02-15 16:29:31 -06:00
Daniel Thayer
ef31099fd7 Merge branch 'master' into topic/icmp6
Conflicts:
	policy/bro.init
	policy/icmp.bro
	src/Analyzer.cc
	src/AnalyzerTags.h
	src/DPM.cc
	src/ICMP.h
	src/Sessions.cc
	src/event.bif
	src/net_util.cc
2012-02-15 15:58:53 -06:00
Robin Sommer
7458ebf385 Checkpoint after pass. 2012-02-15 13:07:08 -08:00
Jon Siwek
808f3915e5 Merge branch 'master' into topic/v6-addr 2012-02-13 16:01:33 -06:00
Daniel Thayer
74899e29fe Update FTP EPSV response processing for IPv6 2012-02-10 16:55:15 -06:00
Robin Sommer
357cdd3f8d Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix minor typos in the documentation
  Fix compiler warning about Brofiler ctor init list order.
2012-02-10 00:04:02 -08:00
Daniel Thayer
a28e671f8d Fix minor typos in the documentation 2012-02-08 14:16:29 -06:00
Jon Siwek
26731b1b58 Fix missing optional field access in webapp signature_match handler. 2012-02-08 10:37:00 -06:00
Jon Siwek
2e2f8f5d06 Merge branch 'master' into topic/v6-addr
Conflicts:
	src/bro.bif
2012-02-06 11:06:55 -06:00