Commit graph

7254 commits

Author SHA1 Message Date
Johanna Amann
f135a63c61 Fix md5 problem with freebsd 11.0 clang 3.8
With clang on FreeBSD 11.0-p1, some md5 functions tend to return the
wrong result. This is, e.g., visible when running the bifs/md5 testcase.
In this test, the checks using md5_hash_finish will return an empty
string.

The apparent cause is some confusion in clang when using a static char
inside a static inline function that is refered to several compilation
units.

Exact version of clang showing this issue is:
FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0)
Target: x86_64-unknown-freebsd11.0
Thread model: posix
InstalledDir: /usr/bin

Issue occurs with -O2.

The first person to either find an existing clang bugreport for this, or
to create an minimal testcase and files one will get a drink from me :)
2016-10-13 13:36:40 -07:00
Johanna Amann
eb3a3bc807 Better way to deal with overloaded Assign constructors. 2016-10-13 11:45:13 -07:00
Daniel Thayer
23a5f83c94 Added missing README files for documentation
These are the one-line script package descriptions.
2016-10-10 22:55:50 -05:00
Robin Sommer
14fd08f334 Updating submodule(s).
[nomail]
2016-10-10 08:45:55 -07:00
Robin Sommer
94a49d9756 Updating submodule(s).
[nomail]
2016-10-10 08:42:13 -07:00
Robin Sommer
4477b8a1ab Merge remote-tracking branch 'origin/topic/seth/dce_rpc_fixes'
* origin/topic/seth/dce_rpc_fixes:
  Fixes for DCE_RPC analyzer
2016-10-10 08:29:14 -07:00
Robin Sommer
54191cc390 Merge remote-tracking branch 'origin/topic/dnthayer/ticket1719'
BIT-1719 #merged

* origin/topic/dnthayer/ticket1719:
  Fix httpd.py test script for Py3 compatibility
2016-10-10 08:24:04 -07:00
Robin Sommer
f7eab5ab52 Updating submodule(s).
[nomail]
2016-10-10 08:13:51 -07:00
Seth Hall
0b5f8e66af Merge branch 'master' into topic/seth/dce_rpc_fixes 2016-10-08 11:00:28 -04:00
Seth Hall
b55c4e61db Tiny fix for a DCE_RPC script issue.
Fixes BIT-1688 (or at least should)
2016-10-08 10:58:11 -04:00
Seth Hall
029d92183e Fixes for DCE_RPC analyzer
- DCE_RPC fragmentation handling returns!
  - Fixed some general parsing issues
  - Fixed an issue with the DCE_RPC signature not working for IPv6 connections.
2016-10-08 10:00:26 -04:00
Daniel Thayer
d1ec71b132 List new log files in the log-files.rst document 2016-10-08 00:32:51 -05:00
Johanna Amann
c2612a0ae1 A few tabbing fixes in TLS 1.3 support 2016-10-07 14:09:49 -07:00
Johanna Amann
fdef28ce7c TLS 1.3 support.
Well, at least -draft-16, and we don't quite parse all extensions yet
(not that there is that much left to parse).
2016-10-07 12:51:43 -07:00
Johanna Amann
14c119c7f9 Really fix plugins/hooks test this time 2016-10-06 15:00:48 -07:00
Johanna Amann
329911ccab Update a few TLS constants in preparation for TLS 1.3
We could actually already see these in traffic with people that use and
enabled them in chrome canary / firefox nightly builds. This change
includes the re-naming of a few names that were never formalli assigned
yet.
2016-10-06 14:49:53 -07:00
Robin Sommer
8479298e04 Merge branch 'master' of git.bro.org:bro 2016-10-06 14:33:36 -07:00
Robin Sommer
d9ba7ea0dd Fixing documentation piece.
The interesting-hostname script has changed.
2016-10-06 14:28:52 -07:00
Johanna Amann
3741ddc247 Merge remote-tracking branch 'origin/topic/robin/broxygen-plugin-warnings'
* origin/topic/robin/broxygen-plugin-warnings:
  Tweaking Broxygen indexing of plugin scripts.
  Fixing Broxygen indexing confusion for plugins.

BIT-1693 #merged
2016-10-06 14:17:46 -07:00
Robin Sommer
84bfd53e52 Updating submodule(s).
[nomail]
2016-10-06 14:02:48 -07:00
Robin Sommer
78828836cf Merge branch 'master' of git.bro.org:bro 2016-10-06 14:02:19 -07:00
Robin Sommer
7a981eff0f Merge remote-tracking branch 'origin/topic/vladg/bit-1671'
Nice, thanks!

BIT-1671 #merged

* origin/topic/vladg/bit-1671:
  Add descriptions for what the SMB1 events do, and references to the specification.
  Add descriptions for what the SMB2 events do, and references to the specification.
  Improve the SMB2 documentation.
  Improve the SMB1 documentation a bit. Clean it up, make it more consistent, and add references to similar events.
  Add DCE-RPC and NTLM abbreviation documentation for their events.
  Remove reference to epm_map_response in RPC documentation. Addresses BIT-1671.
  Rename events referenced in SMB1::Header documentation with new SMB analyzer. Addresses BIT-1671.
2016-10-06 14:02:04 -07:00
Daniel Thayer
e780ebb17a Fix httpd.py test script for Py3 compatibility
With these changes the script still works on Python 2.6/2.7.
2016-10-06 15:45:11 -05:00
Johanna Amann
26d9517774 Use the deterministic bro_random in a test, instead of os random().
The previous test stopped working on FreeBSD 11.0, and I am actually not
quite sure why this ever worked as stable as it did.
2016-10-06 12:56:52 -07:00
Johanna Amann
544317fc1e Test output change on FreeBSD 11.0 (changed one tab to space).
Let's just always filter the tab and make it a space on all systems -
with that the comparison should hopefully work everywhere.
2016-10-06 12:37:50 -07:00
Johanna Amann
5bdb282f8a Prevent loading version.bro during plugins.hooks test
versions.bro uses the changing version string, which leads to changing
lines in the output of the hooks plugin, which is difficult to filter.

Hence, let's just @unload it, before it is being used.
2016-10-06 11:59:24 -07:00
Johanna Amann
72a3c2cda2 Add missing path canonifier to version test 2016-10-06 11:41:04 -07:00
Johanna Amann
7f740d0d3b Update documentation license 2016-10-06 11:35:31 -07:00
Vlad Grigorescu
3e1133f3cf Add descriptions for what the SMB1 events do, and references to the specification. 2016-10-03 17:22:05 -05:00
Vlad Grigorescu
32d03a4a9e Add descriptions for what the SMB2 events do, and references to the specification. 2016-10-03 16:39:27 -05:00
Vlad Grigorescu
03f9a8675f Improve the SMB2 documentation.
* Clean it up, make it more consistent, and add references to similar events.
* Commented out the smb2_set_info_request event, which wasn't being generated.
* Documented the SMB2 record types in init-bare
2016-10-03 16:24:47 -05:00
Vlad Grigorescu
260c985094 Improve the SMB1 documentation a bit. Clean it up, make it more consistent, and add references to similar events. 2016-10-03 14:40:38 -05:00
Vlad Grigorescu
25495e576a Add DCE-RPC and NTLM abbreviation documentation for their events. 2016-10-03 14:23:58 -05:00
Vlad Grigorescu
d320fb2f7c Remove reference to epm_map_response in RPC documentation. Addresses BIT-1671.
epm_map_response was defined but unimplemented in previous versions of Bro.
2016-10-03 14:22:57 -05:00
Vlad Grigorescu
91db998881 Rename events referenced in SMB1::Header documentation with new SMB analyzer. Addresses BIT-1671. 2016-10-03 14:17:29 -05:00
Robin Sommer
89ff11ba91 Merge remote-tracking branch 'origin/topic/johanna/version'
One more name change: version_num -> version_number

BIT-1707 #merged

* origin/topic/johanna/version:
  Slight naming changes for Bro version information.
  Add convenient way to access version information to Bro.
2016-10-02 17:48:28 -07:00
Robin Sommer
e71aaf45c8 Tweaking Broxygen indexing of plugin scripts.
Instead of indexing, e.g., "Bro::Netmap:scripts/init.bro", Broxygen
now uses "Bro_Netmap/scripts/init.bro".
2016-10-02 17:31:19 -07:00
Seth Hall
ddb905408f Merge remote-tracking branch 'origin/topic/johanna/bit-1695'
* origin/topic/johanna/bit-1695:
  Normalize http host in seen script.
2016-10-02 17:39:36 -04:00
Seth Hall
d70f895be3 Merge branch 'J-Gras-topic/jgras/bit-1679'
* J-Gras-topic/jgras/bit-1679:
  Handle removing non-existent intel items.
  Separated file and default info added to matches.
2016-10-02 14:44:43 -04:00
Seth Hall
20fc6398be Merge branch 'topic/jgras/bit-1679' of https://github.com/J-Gras/bro into J-Gras-topic/jgras/bit-1679 2016-10-02 14:21:19 -04:00
Robin Sommer
8acf995361 Fixing Broxygen indexing confusion for plugins.
Because plugins register their script directories with the BROPATH,
Broxygen stripped them out from plugin script paths it was indexing.
That then led to multiple plugins ending up with the same script
paths, triggering warnings about duplicates.

I fixed this by checking if a script comes out of a plugin. If so, it
gets an artifcial index prefix "<plugin-name>:", followed by the
script's relative path inside the plugin's top-level directory. For
example, "/opt/bro/lib/bro/plugins/Bro_Netmap/scripts/init.bro" now
turns into "Bro::Netmap:scripts/init.bro" for Broxygen purposes
(whereas it used to be just "init.bro").

Addresses BIT-1663.

(Can't think of a good way to add a test for this unfortunately.)
2016-09-29 16:18:53 -07:00
Johanna Amann
f66ef7b1e6 Slight naming changes for Bro version information.
Main API now looks like this:

@if ( Version::number >= 20500 )
or
@if ( Version::at_least("2.5") )
2016-09-29 13:36:47 -07:00
Johanna Amann
35465aaf30 Add convenient way to access version information to Bro.
With the introduction of the package manager, it will get more common
that applications are able to get information about the currently
running version of Bro. With this commit, scripts can easily compare
which version of Bro they are running.

Commonly, this probably will either look like this (both lines check if
the current Bro version is greater or equal to 2.5)

@if ( Version::num >= 20500 )
or
@if ( Version::greater_equal("2.5") )

Version::info contains detailed information about the running version of
Bro, including beta flags, etc.
2016-09-29 12:45:48 -07:00
Robin Sommer
b6a0802227 Prettifying reporter output in case no epxression is associated with
runtime error.
2016-09-28 18:18:58 -07:00
Robin Sommer
4059d4b4f1 Merge remote-tracking branch 'origin/topic/johanna/bit-1683'
Looks like the right fix. Two tiny tweaks:

     - changed the order of arguments for DeleteVals() for consistency
       with the corresponding Manager function.

     - turned the InternalWarning into a Warning: if I understand
       correctly, this can happen when scripts on nodes diverge; which
       is a user-side problem, not an internal Bro logic issue.

BIT-1683 #merged

* origin/topic/johanna/bit-1683:
  Actually check if the number of fields in a write are equal to the number of fields required.
2016-09-27 12:40:36 -07:00
Robin Sommer
d961b0a909 Merge remote-tracking branch 'origin/topic/johanna/bit-1691'
BIT-1691 #merged

* origin/topic/johanna/bit-1691:
  Fix loaded-scripts to work with arbitrary indentation.
2016-09-27 11:39:43 -07:00
Robin Sommer
a87083233e Merge remote-tracking branch 'origin/topic/jazoff/ticket-1670'
BIT-1670 #merged

* origin/topic/jazoff/ticket-1670:
  Ensure that the notice uid field is filled in.
  Move lookup_addr when statement
2016-09-27 11:38:08 -07:00
Johanna Amann
bb623a2ca1 Fix loaded-scripts to work with arbitrary indentation.
The new approach is very brute-force, but works and it only is executed
once on startup.

Addresses BIT-1691
2016-09-26 10:45:03 -07:00
Johanna Amann
3ef14000f3 Make elasticsearch orphaned instead of deprecated.
Addresses BIT-1617
2016-09-26 10:33:13 -07:00
Johanna Amann
48f505f706 Fix a debugger bug where it would not support statements like print(3).
This is a manual merge of a branch of Vlad Grigorescu.

BIT-1703 #merged
2016-09-26 10:17:12 -07:00