Commit graph

6849 commits

Author SHA1 Message Date
Robin Sommer
2335a62a07 Preventing the event processing from looping endlessly when an event
reraised itself during execution of its handlers.
2016-06-14 18:11:32 -07:00
Robin Sommer
ddabd13097 Updating submodule(s).
[nomail]
2016-06-14 17:43:09 -07:00
Robin Sommer
e69f7f85d1 Merge branch 'topic/jgras/802-11-header' of https://github.com/J-Gras/bro
Added one more range check.
2016-06-14 17:31:08 -07:00
Robin Sommer
9da02ecae4 Merge branch 'topic/jgras/expire-redef' of https://github.com/J-Gras/bro
Extended error handling a bit, and increased serialization
data format version.
2016-06-14 17:22:25 -07:00
Robin Sommer
0c3cbf3852 Updating submodule(s).
[nomail]
2016-06-14 16:19:10 -07:00
Robin Sommer
a4db7f1359 Merge remote-tracking branch 'origin/topic/johanna/bit-1619'
BIT-1619 #merged

* origin/topic/johanna/bit-1619:
  Fix precedence of hook
2016-06-14 16:11:33 -07:00
Robin Sommer
946f55dbb0 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Update the configure script usage message for --with-caf
2016-06-14 16:10:59 -07:00
Seth Hall
56a24bdef6 Merge remote-tracking branch 'origin/master' into topic/seth/smb
# Conflicts:
#	scripts/site/local.bro
2016-06-14 15:35:05 -04:00
Seth Hall
134d0922d5 Move the SMB analyzer out of the default load.
This also adds a note in the local.bro script about enabling
the SMB analyzer.
2016-06-14 15:34:00 -04:00
Jan Grashoefer
75849f8fe2 Improved handling of 802.11 headers.
Frame types except data and frames subtypes without payload are skipped.
Header length is determined based on presence of QoS and flags
indicating the use of the 4th address field. Handling of aggregated
MSDUs is explicitly prevented.
2016-06-14 17:52:34 +02:00
Johanna Amann
a72112acca Fix precedence of hook
The precedence is now lower than the precedence of &&/|| so that
expressions like

hook a() && doSomething()

work.

Addresses BIT-1619
2016-06-13 16:02:06 -07:00
Johanna Amann
3aabe83ec6 Hyperloglog: change calculation of Rho
This commit changes the calculation of the rho-value to be in line with
the implementation of the original research paper, counting the number
of zero bits before the data.

This also fixes an infinite loop in case the hash value is 0.

I also cleaned up the code a bit, converting the raw pointers that were
used to a STL vector.

Addresses BIT-1612
2016-06-13 15:18:44 -07:00
Jan Grashoefer
8a87055fcc Fixed table expiration evaluation.
The expiration attribute expression is now evaluated for every use. Thus
later adjustments of the value (e.g. by redefining a const) will now
take effect. Values less than 0 will disable expiration.
2016-06-13 21:01:46 +02:00
Robin Sommer
151f9d6ced Fixing Covertity warning (CID 1356391). 2016-06-13 08:17:09 -07:00
Daniel Thayer
a8404f47c8 Update the configure script usage message for --with-caf 2016-06-09 14:03:05 -05:00
Robin Sommer
cfe9ba28dd Guarding against reading beyond packet data when accessing L2 address
in Radiotap header.

This is temporary until we clean up the preceding length check.
2016-06-07 15:59:02 -07:00
Robin Sommer
f662989c09 Fixing typo in BIF macros.
Reported by Jeff Barber.
2016-06-07 15:53:55 -07:00
Robin Sommer
3189276320 Merge remote-tracking branch 'origin/topic/dnthayer/ticket1472'
* origin/topic/dnthayer/ticket1472:
  Add new functions for calculating geographic distance

BIT-1472 #merged
2016-06-07 12:40:31 -07:00
Robin Sommer
351014f48a Fixing memory leak triggered by new MAC address logging. 2016-06-07 11:46:56 -07:00
Daniel Thayer
91496543ad Add new functions for calculating geographic distance
Added a new BIF haversine_distance that computes distance between two
geographic locations.

Added a new Bro script function haversine_distance_ip that does the same
but takes two IP addresses instead of latitude/longitude.  This function
requires that Bro be built with libgeoip.
2016-06-07 13:11:10 -05:00
Johanna Amann
b2371752e4 Merge remote-tracking branch 'origin/topic/dnthayer/ticket1616'
I changed the patch slightly - now debug.log is only created, if a debug
stream is enabled.

BIT-1616 #merged

* origin/topic/dnthayer/ticket1616:
  Don't create debug.log immediately upon startup
2016-06-07 11:09:22 -07:00
Johanna Amann
e7cf52e33c Raw Writer: First step - make code more c++11-y, remove raw pointers. 2016-06-07 10:54:18 -07:00
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
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