Commit graph

7932 commits

Author SHA1 Message Date
Robin Sommer
58dea28504 Merge remote-tracking branch 'origin/topic/johanna/windows-newlines'
(Added a double-check that line isn't completely empty.)

BIT-1198 #merged

* origin/topic/johanna/windows-newlines:
  Ascii Input: Accept dos/windows newlines.
2016-06-06 18:14:21 -07:00
Robin Sommer
83639e9147 Fix binpac exception in RFB analyzer.
The RFB analyzer's state machine did not foresee that a server could
send two subsequent messages in one packet. This would result in the
error. Patch by Martin van Hensbergen.
2016-06-06 18:06:23 -07:00
Robin Sommer
17dc28b8a8 Merge remote-tracking branch 'origin/topic/seth/remove-unescaped_special_char-weird'
BIT-1611 #merged

* origin/topic/seth/remove-unescaped_special_char-weird:
  Add urldecoding for the unofficial %u00AE style of encoding.
  Remove the unescaped_special_char HTTP weird.
2016-06-06 18:05:38 -07:00
Robin Sommer
d59bb2e9d1 Merge branch 'topic/jgras/mac-logging' of https://github.com/J-Gras/bro
Thanks! I've tweaked this a bit further, have a look.

BIT-1613 #merged
2016-06-06 17:59:34 -07:00
Johanna Amann
44b3ece440 Fix coverity error (uninitialized variable) 2016-06-06 13:19:17 -07:00
Daniel Thayer
0cae2ca003 Don't create debug.log immediately upon startup
Instead of creating the debug.log immediately when bro starts,
now it is created only after the debug streams are enabled.
This avoids having an empty log being created when it shouldn't be,
in usages such as "bro -h", "bro -v", or "bro -B help" (and also
when using broctl, which needs to run "bro -v").
2016-06-04 17:16:25 -05:00
Johanna Amann
8c54f91617 Add one more extra include for FreeBSD 2016-06-03 07:14:48 -07:00
Johanna Amann
a91483d4e4 Use ether_ntoa instead of ether_ntoa_r
The latter is thread-safe, but a GNU addition which does not exist on
OS-X. Since the function only is called in the main thread, it should
not matter if it is or is not threadsafe.
2016-06-02 17:17:00 -07:00
Johanna Amann
607b51f3b2 Unbreak header issue on Linux again 2016-06-02 17:05:42 -07:00
Johanna Amann
800eda4796 Fix FreeBSD/OSX compile problem due to headers 2016-06-02 16:38:40 -07:00
Jan Grashoefer
50cf694aae Moved link-layer addresses into endpoints.
The link-layer addresses are now part of the connection endpoints
following the originator-responder-pattern. The addresses are printed
with leading zeros. Additionally link-layer addresses are also extracted
for 802.11 plus RadioTap.
2016-06-02 01:46:26 +02:00
Johanna Amann
e8418ad5b0 Ascii Input: Accept dos/windows newlines.
The ascii reader now accepts \r\n newlines without complaining.
Furthermore, the reader was slightly rewritten in a more c++11-y way,
removing all raw pointers from the class.

Addresses BIT-1198
2016-06-01 11:21:44 -07:00
Johanna Amann
990836e868 NetControl: slightly update catch and release logging
Re-drops now contain the location of the original drop.
2016-05-31 11:52:42 -07:00
Robin Sommer
a2423f7d43 Adding missing script file. 2016-05-30 10:58:43 -07:00
Robin Sommer
57aef6d49f Add MAC addresses to connection record.
c$eth_src and c$eth_dst now contain the Ethernet address if available.
A new script protocols/conn/mac-logging.bro adds these to conn.log
when loaded.
2016-05-29 17:18:47 -07:00
Robin Sommer
35686fb93a Fixing Coverity warning.
Addresses CID 1356116.
2016-05-29 11:02:39 -07:00
Robin Sommer
d195f1b047 Fixing FTP cwd getting overlue long.
Now storing them compressed.
2016-05-29 08:52:47 -07:00
Jan Grashoefer
a9ad41cdcc Improved intel notices.
Intel notices are identified by a direction independent 3-tuple
(indicator, originator IP, responder IP). This allows notice
suppression. Additionally service and intel source are added to the
notice mail.
2016-05-29 00:57:29 +02:00
Robin Sommer
c74effad42 Clarifying notice documentation.
Closes BIT-1405.
2016-05-27 13:22:24 -07:00
Robin Sommer
476891c14a Changing protocol_{confirmation,violation} events to queue like any
other event.

Addresses BIT-1530.
2016-05-27 13:19:04 -07:00
Johanna Amann
2f74825785 NetControl: fix several small logging issues
forgotten messages are only logged on the manager (or standalone host)
now. Logs are not written by default anymore when Bro encounters traffic
that should have been blocked.
2016-05-27 08:51:06 -07:00
Johanna Amann
296c5611ec NetControl: more catch and release logging and cluster fix 2016-05-26 16:53:42 -07:00
Seth Hall
2f6e069c00 Add urldecoding for the unofficial %u00AE style of encoding. 2016-05-25 09:35:23 -04:00
Seth Hall
3151a95381 Remove the unescaped_special_char HTTP weird.
This weird points out a lot of benign stuff and it would
be easily reimplemented in a Bro script.  This commit
also makes the minor change to update the reserved and
unreserved characters from a newer from of the URI RFC.
2016-05-25 08:33:30 -04:00
Robin Sommer
53c523fa6f Normalizing test baseline. 2016-05-24 22:16:31 -07:00
Seth Hall
3e3f6f13cc Add logging framework metadata mechanism.
Example script coming soon.
2016-05-24 09:28:07 -04:00
Johanna Amann
9f7b23b179 NetControl: rewrite catch and release and small fixes.
This commit rewrites catch and release, fixing issues with it and making
it fully cluster capable. A dedicated netcontrol_catch_release.log is
also added.

This is not quite done yet; a few more log messages are missing. There
should hopefully not be many big issues left.
2016-05-23 16:16:21 -07:00
Robin Sommer
d86bf15dbf Do not use scientific notations when printing doubles in logs.
Closes BIT-1558.
2016-05-23 16:07:22 -07:00
Robin Sommer
3581ead0d9 Ignoring packets with negative timestamps.
These used to stall Bro. Addresses BIT-1562 and BIT-1443.
2016-05-23 13:22:22 -07:00
Robin Sommer
4f9cb6912a Fix for a table refering to a expire function that's not defined.
I was hoping to report this right at startup through a static check
but turns out we don't have the right machinery in place for that.
That would need to be done after the AST has been finalized, but our
AST traversal code can't iterate over types. So instead I've changed
this so that it's still being reported at runtime but at least
doesn't crash Bro anymore.

Closes BIT-1597.
2016-05-23 12:48:34 -07:00
Robin Sommer
0fa9590902 Updating submodule(s).
[nomail]
2016-05-23 08:26:52 -07:00
Robin Sommer
50945a6359 Fixing a few Coverity warnings. 2016-05-23 08:25:11 -07:00
Seth Hall
e2fb7591f4 Merge remote-tracking branch 'origin/master' into topic/seth/smb 2016-05-20 14:28:39 -04:00
Johanna Amann
6779325520 NetControl: find_rules_subnet works in cluster mode
This introduces two new events, NetControl::rule_new and
NetControl::rule_destroyed, which are raised when rules are first added
and then deleted from the internal state tracking.
2016-05-20 11:11:44 -07:00
Johanna Amann
52d694f3bd Merge remote-tracking branch 'origin/master' into topic/johanna/netcontrol-improvements 2016-05-19 16:17:07 -07:00
Robin Sommer
85213e6b55 Merge remote-tracking branch 'origin/topic/johanna/fix-analyzer-addition'
* origin/topic/johanna/fix-analyzer-addition:
  DTLS: Use magix constant from rfc5389 for stun detection.
  DTLS: Fix binpac bug with DTLSv1.2 client hellos
  Forgot to remove debug output.
  DTLS: Fix interaction with STUN
  Fix the way that child analyzers are added.

BIT-1604 #merged
2016-05-18 07:41:18 -07:00
Johanna Amann
e6b680ab09 DTLS: Use magix constant from rfc5389 for stun detection. 2016-05-17 17:08:20 -07:00
Johanna Amann
9b2c81e00a DTLS: Fix binpac bug with DTLSv1.2 client hellos 2016-05-17 16:58:30 -07:00
Johanna Amann
74d0493289 Forgot to remove debug output. 2016-05-17 16:39:44 -07:00
Johanna Amann
39bdc397a0 DTLS: Fix interaction with STUN
Now the DTLS analyzer cleanly skips all STUN messages; no warnings
should be logged to dpd.log and parsing should work flawlessly with
intermixed STUN messages.
2016-05-17 16:36:46 -07:00
Robin Sommer
b1c0306e4a Updating submodule(s).
[nomail]
2016-05-17 16:26:45 -07:00
Robin Sommer
573b542646 Updating submodule(s).
[nomail]
2016-05-17 16:23:47 -07:00
Robin Sommer
554e334a3b Merge remote-tracking branch 'origin/topic/johanna/bit1602'
* origin/topic/johanna/bit1602:
  Fix duplication of new_connection_contents event

BIT-1602 #merged
2016-05-17 16:17:23 -07:00
Robin Sommer
4b830b0a39 Merge remote-tracking branch 'origin/topic/johanna/x-anonymoustls'
* origin/topic/johanna/x-anonymoustls:
  SMTP: Support SSL upgrade via X-ANONYMOUSTLS

BIT-1603 #merged
2016-05-17 16:15:01 -07:00
Johanna Amann
bc868d72a1 Fix the way that child analyzers are added.
Bro contains functionality to add child analyzers delayed, so that an
just added analyzer does not influence the list of current analyzers
(which, in some combinations of mostly UDP and traffic replay by PIA can
lead to duplicate packets sent to the analyzer).

Sadly, this feature was broken sometime in the past, leading to the
aforementioned duplicate packets. Re-enabling this also necessitated
some changes in the analyzer manager, which immediately timed out all
connections when that feature was re-enabled.

There currently is no testcase (this is a bit hard to trigger); however,
I will add one with a later fix for DTLS.
2016-05-17 16:13:33 -07:00
Robin Sommer
e2dee49fc1 Fixing control frameworks net_stats and peer_status commands.
Turns out the code implementing them went missing with the recent
merge of the stats changes.

For peer status, I removed most of the numbers that the code used to
return because (1) we don't have access to that data anymore, and (2)
even in 2.4 the numbers returned already didn't make sense (because
they were global values, not per peer). We could consider just
removing the peer_status command at all.
2016-05-17 16:11:22 -07:00
Robin Sommer
7c1aab0ce5 Updating submodule(s).
[nomail]
2016-05-17 14:31:16 -07:00
Johanna Amann
8539f8f96b SMTP: Support SSL upgrade via X-ANONYMOUSTLS
This seems to be a non-standardized microsoft extension that, besides
having a different name, works pretty much the same as StartTLS. We just
treat it as such.

I tested this against provided traffic and it works; I do not have
traffic I can share for a testcase.
2016-05-17 11:07:30 -07:00
Johanna Amann
d091e9ca89 Fix duplication of new_connection_contents event
Addresses BIT-1602
2016-05-17 10:32:13 -07:00
Johanna Amann
4851cbc7cc Merge remote-tracking branch 'origin/topic/dnthayer/ticket1601'
* origin/topic/dnthayer/ticket1601:
  Fix some failing plugin tests on OS X 10.11

BIT-1601 #merged
2016-05-16 20:11:20 -07:00