Commit graph

9059 commits

Author SHA1 Message Date
Jon Siwek
04eaafd4eb Updating submodule(s).
[nomail]
2018-05-24 09:41:46 -05:00
Jon Siwek
63251e9937 Updating submodule(s).
[nomail]
2018-05-24 09:40:07 -05:00
Jon Siwek
b2923f5528 Documentation improvements/fixes 2018-05-23 16:50:31 -05:00
Jon Siwek
58864c358c Add NCP::max_frame_size tuning option
This helps prevent excessive allocations based on message lengths
taken from NCP headers.
2018-05-22 18:27:52 -05:00
Jon Siwek
e35da5f592 Migrate NCP analyzer to use latest analyzer API
It was possibly never updated for newer Analyzer API changes, as simply
attaching the NCP analyzer to a connection would result in null pointer
derefernces and also support analyzers were not attached.
2018-05-22 16:27:07 -05:00
Jon Siwek
de029dd430 Merge remote-tracking branch 'origin/topic/jsiwek/binpac-fixes'
* origin/topic/jsiwek/binpac-fixes:
  Update test baseline for binpac changes
  Update test baseline for optimized binpac static-size array parsing
  Fixes for MySQL and SMB protocol parsers
  BIT-1829: add unit test for modbus parser issue
2018-05-22 15:06:51 -05:00
Jon Siwek
c9bf16e172 Updating submodule(s).
[nomail]
2018-05-22 13:31:48 -05:00
Jon Siwek
c1871b0f0b Update test baseline for binpac changes 2018-05-22 12:46:30 -05:00
Jon Siwek
477d3fc0e2 Updating submodule(s).
[nomail]
2018-05-22 09:48:17 -05:00
Jon Siwek
436a93b38a Make Reassembler::TotalSize a constant time operation 2018-05-22 09:20:44 -05:00
Robin Sommer
647fe3f494 Updating submodule(s).
[nomail]
2018-05-21 22:36:44 +00:00
Robin Sommer
d6cddffe32 Merge remote-tracking branch 'origin/master'
* origin/master:
  Update link to flex pattern docs
2018-05-21 21:38:19 +00:00
Robin Sommer
eaf5f4a9bb Whitespace changes. 2018-05-21 20:31:29 +00:00
Robin Sommer
593000be57 Updating submodules. 2018-05-21 20:31:29 +00:00
Robin Sommer
ad1978f698 Updating NEWS and CHANGES. 2018-05-21 20:31:29 +00:00
Robin Sommer
87552390e5 Bring Broccoli back for the time being.
It's deprecated and now disabled by default, but can be reenabled by
configuring with --enable-broccoli.
2018-05-21 18:38:25 +00:00
Jon Siwek
ed7b0b3503 Update link to flex pattern docs 2018-05-21 13:38:04 -05:00
Robin Sommer
fe7e1ee7f0 Merge topic/actor-system throug a squashed commit. 2018-05-18 22:39:23 +00:00
Robin Sommer
7a6f5020f6 Updating submodule(s).
[nomail]
2018-05-18 22:39:22 +00:00
Seth Hall
aa5d784d48 Merge branch 'p-l--topic/p-l-/fix-arp-tests' 2018-05-18 12:20:46 -04:00
Pierre LALET
8315aa36a6 Add bad ARP tests
The capture file (btest/Traces/arp-leak.pcap) contains the
exploitation of an ARP leak flaw against NetBSD 7.0.2 using Scapy
etherleak() function.
2018-05-18 17:39:53 +02:00
Jon Siwek
99a417fc07 Update test baseline for optimized binpac static-size array parsing 2018-05-18 10:34:06 -05:00
Jon Siwek
954e7980cf Fixes for MySQL and SMB protocol parsers
* MySQL: the parser for this was generally broken (not following
  the specification well) and needed many changes.  One addition is a
  new "mysql_result_row" event that provides access to the results of
  queries.

* SMB: the spec seems to explitly call out the omission of the
  PrimaryDomain field on SMB_COM_SESSION_SETUP_ANDX responses (and I
  don't see that field in pcaps either), so this may have just been a
  typo that used to work fine in the past only due to faulty array
  parsing behavior in binpac.
2018-05-18 10:31:36 -05:00
Pierre LALET
cc4605c8ae Tests/ARP: fix capture files.
It seems the wrong ones were selected in a merge conflict (see
d5797d8).
2018-05-18 17:25:55 +02:00
Jon Siwek
9c1e20394b BIT-1829: add unit test for modbus parser issue 2018-05-18 09:24:06 -05:00
Seth Hall
7ffc162383 Merge branch 'master' of ssh://git.bro-ids.org/bro 2018-05-18 09:52:37 -04:00
Seth Hall
d5797d8bde Merge branch 'p-l--topic/support-wlan-monitor'
# Conflicts:
#	testing/btest/Traces/arp-who-has-radiotap.pcap
#	testing/btest/Traces/arp-who-has-wlanmon.pcap
2018-05-18 09:52:28 -04:00
Johanna Amann
2b24e04ada Add non-standard experimental Google post-quantum ciphers 2018-05-17 15:54:48 -07:00
Pierre LALET
ab73946289 ARP: fix the l2 source address check
ARP_Analyzer::NextPacket() incorrectly assumed that the MAC source
address was at data+6 (which is fine for classical ARP over Ethernet
frames but incorrect for ARP over Wi-Fi for example) and the
destination was at data.

Use pkt->l2_src and pkt->l2_dst instead, set by Packet::ProcessLayer2().
2018-05-16 00:59:29 +02:00
Pierre LALET
0944747bab Add tests for ARP in 802.11 (w & w/o RadioTAP) 2018-05-16 00:21:20 +02:00
Seth Hall
09d283f7ed Merge branch 'topic/support-wlan-monitor' of https://github.com/p-l-/bro 2018-05-15 13:35:20 -04:00
Seth Hall
f2b4c16dd5 Merge branch 'p-l--topic/support-wlan-monitor' 2018-05-15 13:32:34 -04:00
Pierre LALET
a7fb278710 Add tests for ARP in 802.11 (w & w/o RadioTAP) 2018-05-15 18:15:17 +02:00
Pierre LALET
dfa392bd6c Add a test for 802.11 monitor mode 2018-05-15 17:59:26 +02:00
Pierre LALET
30c28da046 Support 802.11 monitor mode 2018-05-15 14:08:48 +02:00
Jon Siwek
057c982b9d Merge branch 'BIT-1927' of https://github.com/hosom/bro
* 'BIT-1927' of https://github.com/hosom/bro:
  Fix for BIT-1927: notice/extend-email relocation

And updated coverage unit tests.

BIT-1927 #close
2018-05-10 11:28:08 -05:00
Jon Siwek
623fb9d5c5 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Sort output of the missing-file-initially.bro test
2018-05-10 11:02:29 -05:00
Julien Wallior
54ef1083bc Make linking against libkrb5 optional based on whether it is installed
on the system or not.
2018-05-10 10:15:08 -04:00
Julien Wallior
afac2ac20f Add krb unit test 2018-05-10 10:14:30 -04:00
Julien Wallior
ae7625bb2b Fix base.protocols.krb.kinit unit test. 2018-05-10 10:14:30 -04:00
Julien Wallior
98a430c1eb Decrypt the krb ticket and send authentication data out. 2018-05-10 10:14:30 -04:00
Stephen Hosom
6611d28920 Fix for BIT-1927: notice/extend-email relocation
This is a fairly straightforward change. Previously, users had no
control over whether this script was loaded. By relocating it to
policy, users can now choose whether or not this is necessary
functionality without modifying core Bro scripts.
2018-05-10 09:13:52 -04:00
Daniel Thayer
075edbdd2b Sort output of the missing-file-initially.bro test
The output needs to be sorted to ensure that the test doesn't fail.
2018-05-09 14:30:22 -05:00
Jon Siwek
1f777b57b8 BIT-1926: add unit tests for misc. HTTP patches 2018-05-08 15:39:27 -05:00
Jon Siwek
e5d5cf9ff1 Fix case insensitive HTTP/MIME header name comparisons
Since the function was never used to check for anything other than
equality, I've changed it to return a bool, otherwise the changes to
its implementation are based on a patch submitted by Jeffrey Bencteux:

Function was comparing two strings based on the length of a user
provided string which could lead to evasions. Any prefix of the static
string could pass conditions where strcasecmp_n was used. Comparison
is now based on the static string length and lengths are checked
before calling strncasecmp.
2018-05-08 15:29:53 -05:00
jbencteux
ec4a936f66 fix using chunked mode with HTTP/1.0
According to RFC 7230, Transfer-Encoding was added in HTTP/1.1. Such a
header in a HTTP/1.0 message should be ignored. Interpreting it can be
harmful when sending a HTTP/1.0 message because the parser would
indefinitely wait for a chunk size instead of parsing the message's
body as non-chunked, leading to a HTTP content evasion.
2018-05-08 15:29:53 -05:00
Jon Siwek
2e2d086144 Fix previous content-length != content-range patch
In the case where no Content-Length header is seen, the content_length
value still should be set based upon the range (same as it would
have been before the patch).
2018-05-08 15:29:53 -05:00
jbencteux
c0cc4ef192 fix handling of HTTP body length
Partial content bytes range length value and content length value
should not be stored in the same variable. An attacker could override
a given Content-Length or Content-Range with a smaller value to
evade HTTP content.
2018-05-08 15:29:53 -05:00
jbencteux
2a01c70837 fix Content-Encoding: x-gzip
RFC 7230 section 4.2.3 states that:

"A recipient SHOULD consider 'x-gzip' to be equivalent to 'gzip'"

This could lead to evasions as an attacker could use:

Content-Encoding: x-gzip

To bypass Bro's decompression.
2018-05-08 15:29:53 -05:00
Johanna Amann
bb20026267 Add test for dump_current_packet bif. 2018-05-08 11:24:38 -07:00