Commit graph

13262 commits

Author SHA1 Message Date
Bernhard Amann
5da97455f5 Merge remote-tracking branch 'origin/topic/seth/metrics-merge' into topic/bernhard/topk 2013-04-23 12:17:03 -07:00
Bernhard Amann
85dea8973f Merge branch 'topic/seth/metrics-merge' into topic/bernhard/topk 2013-04-23 12:16:55 -07:00
Jon Siwek
f07760ba00 FileAnalysis: add is_orig field to fa_file & Info. 2013-04-23 10:50:43 -05:00
Jon Siwek
7069f679c3 Fix record coercion for default inner record fields (addresses #973). 2013-04-23 09:57:55 -05:00
Seth Hall
08348b2bc2 Update to make Dir::monitor watch inodes instead of file names. 2013-04-22 21:53:00 -04:00
Seth Hall
035b668f73 Updates to use new input framework mechanism to execute command line programs. 2013-04-22 21:52:21 -04:00
Seth Hall
2c689b7f40 Removed some dead code in scan.bro 2013-04-22 15:27:14 -04:00
Seth Hall
91362717da Renamed a plugin hook in sumstats framework. 2013-04-22 15:27:03 -04:00
Seth Hall
9574499382 Move loading variance back to where it should be alphabetically. 2013-04-22 14:15:37 -04:00
Seth Hall
8f987e5066 Fix a bug with path building in FTP. Came up when changing the path utils. 2013-04-22 14:15:20 -04:00
Seth Hall
60605412ab Fix a few tests. 2013-04-22 14:14:50 -04:00
Jon Siwek
fa30d4a313 Fix schedule statements used outside event handlers (addresses #974). 2013-04-22 13:00:44 -05:00
Scott Runnels
2832939026 Include btest-rst-include directives for logging framework examples. 2013-04-22 11:03:20 -04:00
Bernhard Amann
ce7ad003f2 well, a test that works..
Note: merging top-k data structures is not yet possible (and is
actually quite awkward/expensive). I will have to think about
how to do that for a bit...
2013-04-22 02:40:42 -07:00
Bernhard Amann
c21c18ea45 implement topk.
This is _completely_ untested. It compiles. It will probably do
nothing else (well, besides crashing Bro).
2013-04-22 01:10:29 -07:00
Robin Sommer
10dc8b9279 Updating tests. 2013-04-19 16:35:24 -07:00
Robin Sommer
eb3218590e Cleaning up analyzer naming.
Also adding the script-level ID to the -NN output.
2013-04-19 16:35:18 -07:00
Robin Sommer
da696c4b24 Unifying analyzer names and descriptions. 2013-04-19 15:58:13 -07:00
Robin Sommer
4bc2ba60c9 Rename analyzer/protocols -> analyzer/protocol 2013-04-19 15:50:57 -07:00
Robin Sommer
f7a10d915b Renaming analyzer. 2013-04-19 15:40:15 -07:00
Robin Sommer
d8259b34dd Unifying *.h guards. 2013-04-19 15:38:08 -07:00
Robin Sommer
3959e254e2 Moving protocol-specific BiFs out of bro.bif.
I hope I found them all ...
2013-04-19 15:25:18 -07:00
Jon Siwek
cd0a8bfbdb FileAnalysis: inlined doc fixes. 2013-04-19 16:27:32 -05:00
Bernhard Amann
6e532e8960 update cluster test to also use hll 2013-04-19 09:58:57 -07:00
Jon Siwek
c1f37dde5a FileAnalysis: optimizate connection set updating.
Don't need to be checking/updating that for sequential data input, which
won't be over multiple conns.
2013-04-19 11:55:48 -05:00
Bernhard Amann
75f709ec6b Merge branch 'topic/bernhard/hyperloglog' into topic/bernhard/hyperloglog-with-measurement 2013-04-19 09:53:35 -07:00
Bernhard Amann
8340af55d1 persistence really works.
It took me way too long to find this - I got the uint8 serialize/deserialize
wrong :/
2013-04-19 09:52:45 -07:00
Jon Siwek
98f7907dbb FileAnalysis: optimize file handle construction.
cat is slightly faster than fmt.
2013-04-19 11:38:11 -05:00
Robin Sommer
5dc630f722 Working on TODOs.
- Introducing analyzer::<protocol> namespaces.
- Moving protocol-specific events out of events.bif into analyzer/protocol/<protocol>/events.bif
- Moving ARP over (even though it's not an actual analyzer).
- Moving NetFlow over (even though it's not an actual analyzer).
- Moving MIME over (even though it's not an actual analyzer).
2013-04-18 21:01:15 -07:00
Jon Siwek
cd2a6aa33a FileAnalysis: workarounds for older libmagics.
Some of the unit tests revealed different versions of libmagic could
give different mime types for the same input file and magic database.

One way that could happen is because of the use of hardcoded/builtin
token (word) comparisons for ascii files -- MAGIC_NO_CHECK_TOKENS flag
will prevent that from being used (and it's obsoleted in newer
libmagics).

The other problem looked like a bug fixed as of 5.05 where
a match in the magic database that doesn't have a verbose description
but does have a mime type won't actually return that mime type due to
the the missing description.  The one case where that kept popping up
was in 5.04 not beign able to identify application/x-dosexec, so I added
a description to the top-level match for that to workaround the issue.
2013-04-18 18:09:48 -05:00
Robin Sommer
dfc4cb0881 Moving all analyzers over to new structure.
This is a checkpoint, it works but there's more cleanup to do. TODOs in
src/analyzer/protocols/TODO.
2013-04-16 20:52:03 -07:00
Robin Sommer
56edef1646 Removing left-overs from BinPAC http analyzer. 2013-04-16 14:47:17 -07:00
Robin Sommer
a191eed7db Adding separate Plugin.cc for HTTP analyzer for consistency. 2013-04-16 14:43:52 -07:00
Robin Sommer
7a95f5322c Moving src/protocols to src/analyzer/protocols.
This is for consistency with where readers/writers are located: inside
the subdirectories of the corresponding code.
2013-04-16 14:29:11 -07:00
Robin Sommer
e6eddbd918 Missing dependency. 2013-04-16 14:28:23 -07:00
Robin Sommer
aeddca6523 More API documentation. 2013-04-16 14:28:23 -07:00
Bernhard Amann
dc18a6d6e3 Merge remote-tracking branch 'origin/topic/seth/metrics-merge' into topic/bernhard/hyperloglog-with-measurement
and fix up the hll scripts for it.

Conflicts:
	scripts/base/frameworks/sumstats/plugins/__load__.bro
	testing/btest/scripts/base/frameworks/measurement/basic.bro
2013-04-16 05:25:10 -07:00
Bernhard Amann
70c020e412 well, with this commit synchronizing the data structure should work..
...if we had consistent hashing.
2013-04-16 05:16:32 -07:00
Seth Hall
1cac89e4f8 SumStats test checkpoint. 2013-04-16 00:54:41 -04:00
Scott Runnels
d7d33db8ec Initial commit to include the Notice Framework in the User Manual. 2013-04-15 23:26:04 -04:00
Seth Hall
437815454d SumStats tests pass. 2013-04-15 15:28:11 -04:00
Seth Hall
fbe967e16a Checkpoint for SumStats rename. 2013-04-15 15:12:28 -04:00
Jon Siwek
037d582b0e FileAnalysis: add custom libmagic database.
- It's derived from the magic database of libmagic 5.14, but with most
  everything not related to mime types removed.

- The custom database is always used by default for mime detection, but
  the more verbose file type detection will fall back on the default
  libmagic installation's database.  The result is: mime type strings
  are now guaranteed to be consistent across platforms, but the verbose
  file type descriptions are not.

- The custom database gets installed in $prefix/share/bro/magic, and
  should even be extensible if files with new patterns are added inside
  the directory.

- The search path for the mime magic database can be controlled via
  BROMAGIC environment variable.

- Remove mime_desc field from ftp.log.

- Stop using the mime/file type canonifier with unit tests.

- libmagic >= 5.04 is now a requirement.
2013-04-12 11:58:19 -05:00
Seth Hall
8165d6077d Fix another occasional reporter error. 2013-04-12 11:20:45 -04:00
Seth Hall
e93fd69cf2 Small updates to hopefully correct reporter errors leading to lost memory. 2013-04-12 09:28:38 -04:00
Jon Siwek
b8c98b8bf7 FileAnalysis: change terminology s/action/analyzer 2013-04-11 14:53:54 -05:00
Jon Siwek
e81f2ae7b0 FileAnalysis: libmagic tweaks.
Remove verbose file type detection and automatically strip out charset
from mime type.
2013-04-11 13:11:46 -05:00
Jon Siwek
2fba37e277 FileAnalysis: add bif for setting timeout interval 2013-04-11 12:08:46 -05:00
Jon Siwek
e2fbee9054 FileAnalysis: add more params to some events. 2013-04-11 11:24:18 -05:00
Seth Hall
a615601269 Trying to fix a state maintenance issue. 2013-04-11 09:42:46 -04:00