Commit graph

7932 commits

Author SHA1 Message Date
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
Johanna Amann
068c49a3d3 Normalize http host in seen script.
This changes the behavior to be just like in the base scripts.

Addresses BIT-1695
2016-09-22 16:52:59 -07:00
Johanna Amann
038dfa6273 Actually check if the number of fields in a write are equal to the
number of fields required.

Addresses BIT-1683

I do not think this quite fixes the underlying issue of BIT-1683 - it
should not be possible to get to this state in normal operations.

Also fixes a small memory leak for disabled writers.
2016-09-22 16:43:37 -07:00
Jan Grashoefer
8c024ca094 Handle removing non-existent intel items.
The intel framework raises a reporter info on removing non-existent
intel items. An according test case has been added.

Fixes #1679.
2016-09-21 00:37:38 +02:00
Justin Azoff
c74218568a Ensure that the notice uid field is filled in. 2016-09-19 22:11:31 -04:00
Robin Sommer
0bc4a5ea52 Updating submodule(s).
[nomail]
2016-09-19 17:18:38 -07:00
Robin Sommer
51b1c6470e Merge branch 'master' of git.bro.org:bro 2016-09-19 17:15:12 -07:00
Robin Sommer
2bf4c2072c Merging topic/vladg/bit-1681.
(Note this a "manual" merge: I've copied just the two relevant *pac
files over, as there were a bunch of independent commits in the branch
history that I didn't want to pull in.)

BIT-1681 #merged
2016-09-19 17:04:44 -07:00
Jan Grashoefer
cb53a930a2 Separated file and default info added to matches. 2016-09-20 02:04:15 +02:00
Johanna Amann
46aafdc87b Merge branch 'patch-4' of https://github.com/moshekaplan/bro
* 'patch-4' of https://github.com/moshekaplan/bro:
  Clarified string documentation
2016-09-19 15:28:39 -07:00
Johanna Amann
b00e9ba338 Merge branch 'patch-6' of https://github.com/moshekaplan/bro
* 'patch-6' of https://github.com/moshekaplan/bro:
  Update init-bare.bro
2016-09-19 15:23:12 -07:00
Moshe Kaplan
f8587e643a Update init-bare.bro 2016-09-15 12:28:17 -04:00
Moshe Kaplan
ca46edbb42 Clarified string documentation 2016-09-14 15:15:56 -04:00
Johanna Amann
57da2d091b Merge remote-tracking branch 'origin/topic/dnthayer/ticket1690'
* origin/topic/dnthayer/ticket1690:
  Added another missing fclose in scan.l
  Added a missing fclose in scan.l

BIT-1690 #merged
2016-09-06 07:37:31 -07:00
Daniel Thayer
520ed43eae Added another missing fclose in scan.l
If someone uses an "@unload" directive in a bro script, then Bro
was neglecting to close the file.
2016-08-31 16:30:10 -05:00
Daniel Thayer
b3a7d07e66 Added a missing fclose in scan.l
On OS X, Bro was failing to startup without first using the "ulimit -n"
command to increase the allowed number of open files (OS X has a much
lower default limit than Linux or FreeBSD).
2016-08-31 14:07:44 -05:00
Seth Hall
2cfe2c292d Fix an event from the file extraction analyzer.
The "file_extraction_limit" event was passing a Files::AnalyzerArgs
record as an "any" type.  This is not right at the least and may
have been causing a crash for a user at worst.
2016-08-28 21:30:42 -04:00
Seth Hall
8015e35747 Fix a crash when a user disables DCE_RPC and enabled SMB.
I wasn't accounting for analyzers being disabled and not actually
instantiating when requested.  This includes a test which
verifies there is no crash or problem when a user disables DCE_RPC.
2016-08-28 21:28:57 -04:00
Johanna Amann
ec0ffc5452 Update submodule
[nomail]
2016-08-22 15:41:46 -07:00
Johanna Amann
1f2dc28bf7 Update submodule
[nomail]
2016-08-19 07:58:46 -07:00
Johanna Amann
2e5e811a9c Merge branch 'patch-2' of https://github.com/moshekaplan/bro
* 'patch-2' of https://github.com/moshekaplan/bro:
  Update events.bif

This slightly clarifies the explanation of the mime_entity_data event.
2016-08-19 07:52:35 -07:00
Johanna Amann
46b67b92ee Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Update NEWS
2016-08-19 07:38:33 -07:00
Johanna Amann
077a5cbda8 Remove old ack_above_hole event from scripts.
Fixes BIT-1673
2016-08-19 07:26:34 -07:00
Daniel Thayer
e8bfa49f69 Update NEWS
Corrected some typos, fixed some reST formatting, and added some more
useful info.
2016-08-19 00:46:49 -05:00
Moshe Kaplan
c5b82cb9b4 Update events.bif 2016-08-18 12:43:20 -04:00
Johanna Amann
058e378ced Update local-compat test for 2.5 2016-08-17 10:38:18 -07:00