Commit graph

923 commits

Author SHA1 Message Date
Seth Hall
6b58ef12d7 Still fixing bugs in sumstats updated api cluster support. 2013-08-02 16:53:56 -04:00
Seth Hall
135094428e Hopefully fix the SumStats cluster support. 2013-08-02 16:30:34 -04:00
Seth Hall
7b8073556e Fix the SumStats top-k plugin and test. 2013-08-02 16:30:20 -04:00
Seth Hall
d6edbd27b1 Merge remote-tracking branch 'origin/master' into topic/seth/sumstats-updates 2013-08-02 13:17:48 -04:00
Seth Hall
4f8100774c Updates for SumStats API to deal with high memory stats.
- The code is a mess and will need to be cleaned up, but the
    tests do pass.
2013-08-02 12:44:33 -04:00
Robin Sommer
306d4fa6f9 Pluginizing the DNP3 analyzer, plus a basic script logging requests
and replies.

Almost ready, but now 1 test fails again ...

[Note I broke git history by copying over the files into a new branch.]
2013-08-01 17:36:11 -07:00
Robin Sommer
04ccb12183 Merge branch 'topic/robin/topk-merge'
BIT-1048 #merged

I'm reverting the serializer version update for now as that breaks
Broccoli. Let's do that later for 2.2.

* topic/robin/topk-merge:
  update documentation, rename get* to Get* and make hasher persistent
  adapt to new folder structure
  fix opaqueval-related memleak
  synchronize pruned attribute
  potentially found wrong Ref.
  add sum function that can be used to get the number of total observed elements.
  in cluster settings, the resultvals can apparently been uninitialized in some special cases
  fix memory leaks
  fix warnings
  add topk cluster test
  make size of topk-list configureable when using sumstats
  implement merging for top-k.
  add serialization for topk
  make the get function const
  topk for sumstats
  well, a test that works..
  implement topk.
2013-08-01 14:39:16 -07:00
Robin Sommer
6b6b409c8c Merge remote-tracking branch 'origin/topic/jsiwek/faf-updates'
Nice solution with the ComponentManager/TaggedComponent!

BIT-1049 #Merged Merged into master.

* origin/topic/jsiwek/faf-updates:
  Fix some build errors.
  Minor fix to file/protocol analyzer plugin reference doc.
  Internal refactoring of how plugin components are tagged/managed.
  Factor out the need for a tag field in Files::AnalyzerArgs record.
  Add a distinct tag class for file analyzers.
  Fix various documentation, mostly related to file analysis.
2013-08-01 11:14:11 -07:00
Robin Sommer
948441e176 Test expected false positive, but it isn't one any more.
Matthias, please check if this is correct.
2013-08-01 10:52:15 -07:00
Robin Sommer
32a403cdaf Merge branch 'topic/robin/bloom-filter-merge'
* topic/robin/bloom-filter-merge:
  Using a real hash function for hashing a BitVector's internal state.
  Support UHF hashing for >= UHASH_KEY_SIZE bytes.
  Changing the Bloom filter hashing so that it's independent of CompositeHash.
  Add new BiF for low-level Bloom filter initialization.
  Introduce global_hash_seed script variable.

Conflicts:
	testing/btest/Baseline/bifs.bloomfilter/output
2013-08-01 10:52:08 -07:00
Robin Sommer
81dcda3eb4 Merge remote-tracking branch 'origin/topic/bernhard/topk'
* origin/topic/bernhard/topk:
  adapt to new folder structure
  fix opaqueval-related memleak
  synchronize pruned attribute
  potentially found wrong Ref.
  add sum function that can be used to get the number of total observed elements.
  in cluster settings, the resultvals can apparently been uninitialized in some special cases
  fix memory leaks
  fix warnings
  add topk cluster test
  make size of topk-list configureable when using sumstats
  implement merging for top-k.
  add serialization for topk
  make the get function const
  topk for sumstats
  well, a test that works..
  implement topk.
2013-08-01 10:27:18 -07:00
Seth Hall
2ccc963e22 Small fix to deal with a bug in the SSL log delay mechanism.
- It looks like we might have some parser problem, but I just want
   to work around this problem for the moment.
2013-08-01 11:19:51 -04:00
Robin Sommer
2a0790c231 Changing the Bloom filter hashing so that it's independent of
CompositeHash.

We do this by hashing values added to a BloomFilter another time more
with a stable hash seeded only by either the filter's name or the
global_hash_seed (or Bro's random() seed if neither is defined).

I'm also adding a new bif bloomfilter_internal_state() that returns a
string representation of a Bloom filter's current internal state. This
is solely for writing tests that check that the filters end up
consistent when seeded with the same value.
2013-07-31 19:56:34 -07:00
Vlad Grigorescu
1786a3b92d DHCP: Adding unit tests. 2013-07-31 17:30:56 -04:00
Vlad Grigorescu
0f1b0e75b7 DHCP:
- Added the known-devices log, and the script to log DHCP hostname per MAC address,
 - Added DPD sig,
 - Removed some scripts following a discussion with Seth.
2013-07-31 16:32:20 -04:00
Bernhard Amann
daaf091bc3 Merge remote-tracking branch 'origin/master' into topic/bernhard/topk
Conflicts:
	src/NetVar.cc
	src/NetVar.h
	src/SerialTypes.h
	src/bro.bif
2013-07-31 11:52:39 -07:00
Jon Siwek
9bd7a65071 Merge branch 'master' into topic/jsiwek/faf-updates
Conflicts:
	testing/btest/Baseline/coverage.default-load-baseline/canonified_loaded_scripts.log
2013-07-31 10:05:36 -05:00
Jon Siwek
5fa9c5865b Factor out the need for a tag field in Files::AnalyzerArgs record.
This cleans up internals of how analyzer instances get identified by the
tag plus any args given to it and doesn't change script code a user
would write.
2013-07-31 09:48:19 -05:00
Vlad Grigorescu
7ddacba1a3 Merge branch 'master' into topic/vladg/dhcp 2013-07-31 10:08:44 -04:00
Bernhard Amann
5b9d80e50d Merge remote-tracking branch 'origin/master' into topic/bernhard/hyperloglog 2013-07-30 14:31:09 -07:00
Seth Hall
7db531e162 Merge remote-tracking branch 'origin/master' into topic/seth/sumstats-updates
Conflicts:
	doc/scripts/DocSourcesList.cmake
	scripts/test-all-policy.bro
2013-07-30 11:48:03 -04:00
Seth Hall
0e23a8bc9e Beginning rework of SumStats API. 2013-07-30 11:46:51 -04:00
Robin Sommer
e2f8fdc3f6 Merge remote-tracking branch 'origin/topic/jsiwek/exec-module'
* origin/topic/jsiwek/exec-module:
  Exec module changes/fixes.
  Coverage test fixes and whitespace/doc tweaks.
  Update to make Dir::monitor watch inodes instead of file names.
  Updates to use new input framework mechanism to execute command line programs.
  Added Exec, Dir, and ActiveHTTP modules.

BIT-1046 #merged.

Conflicts:
	magic
	testing/btest/Baseline/coverage.default-load-baseline/canonified_loaded_scripts.log
2013-07-29 15:53:59 -07:00
Robin Sommer
984e9793db Merge remote-tracking branch 'origin/topic/seth/faf-updates'
* origin/topic/seth/faf-updates: (27 commits)
  Undoing the FTP tests I updated earlier.
  Update the last two btest FAF tests.
  File analysis fixes and test updates.
  Fix a bug with getting analyzer tags.
  A few test updates.
  Some tests work now (at least they all don't fail anymore!)
  Forgot a file.
  Added protocol description functions that provide a super compressed log representation.
  Fix a bug where orig file information in http wasn't working right.
  Added mime types to http.log
  Clean up queued but unused file_over_new_connections event args.
  Add jar files to the default MHR lookups.
  Adding CAB files for MHR checking.
  Improve malware hash registry script.
  Fix a small issue with finding smtp entities.
  Added support for files to the notice framework.
  Make the custom libmagic database a git submodule.
  Add an is_orig parameter to file_over_new_connection event.
  Make magic for emitting application/msword mime type less strict.
  Disable more libmagic builtin checks that override the magic database.
  ...

Conflicts:
	doc/scripts/DocSourcesList.cmake
	scripts/base/init-bare.bro
	scripts/test-all-policy.bro
	testing/btest/Baseline/coverage.bare-load-baseline/canonified_loaded_scripts.log
	testing/btest/Baseline/coverage.default-load-baseline/canonified_loaded_scripts.log
2013-07-29 14:21:52 -07:00
Jon Siwek
d84f6e012c Fix various documentation, mostly related to file analysis.
- Fix examples/references in the file analysis how-to/usage doc.

- Add Broxygen-generated docs for file analyzer plugins.

- Break FTP::Info type declaration out in to its own file to get
  rid of some circular dependencies (between s/b/p/ftp/main and
  s/b/p/ftp/utils).
2013-07-29 16:15:37 -05:00
Seth Hall
32f1c736f7 Some script reorg and a new intel extension script.
- policy/frameworks/intel/seen is the new location for the scripts
    that push data into the intel framework for checking.

  - The new policy/frameworks/intel/do_notice script adds an example
    mechanism for data driven notices.
2013-07-29 16:40:16 -04:00
Seth Hall
d380161244 Merge remote-tracking branch 'origin/master' into topic/seth/intel-updates 2013-07-29 11:36:00 -04:00
Seth Hall
1238e5bcf2 Undoing the FTP tests I updated earlier.
- Fixed the external tests btest config too.
2013-07-26 21:50:19 -04:00
Jon Siwek
939619889d File analysis fixes and test updates.
- Several places were just using old variable names or not loading
  scripts correctly after they'd been renamed/moved.

- Revert/adjust a change in how HTTP file handles are generated that
  broke partial content responses.

- Turn some libmagic builtin checks back on; seems some are actually
  useful (e.g. text detection seems to be a builtin).  The rule going
  forward probably will be only to turn off a builtin if we confirm it
  causes issues.

- Removed some tests that are redundant or not necessary anymore because
  the generic file analysis tests cover them.

- A couple FTP tests still fail that I think need an actual solution via
  script changes.
2013-07-25 16:51:16 -05:00
Bernhard Amann
32c2885742 Merge remote-tracking branch 'origin/master' into topic/bernhard/hyperloglog
Conflicts:
	src/Func.cc
	src/probabilistic/CMakeLists.txt
2013-07-25 14:46:38 -07:00
Robin Sommer
b97e045c9a Merge branch 'master' into topic/robin/bloom-filter-merge 2013-07-25 10:18:46 -07:00
Robin Sommer
4a7046848c bif files declared with bif_target() are now automatically compiled
in.

No more manual includes to pull them in.

(It doesn't quite work fully automatically yet for some bifs that need
script-level types defined, like the input and logging frameworks.
They still do a manual "@load foo.bif" in their main.bro to get the
order right. It's a bit tricky to fix that and would probably need
splitting main.bro into two parts; not sure that's worth it.)
2013-07-25 10:12:52 -07:00
Jon Siwek
ac6b12b5d4 Merge branch 'master' into topic/jsiwek/faf-updates
Conflicts:
	magic
2013-07-25 10:02:26 -05:00
Bernhard Amann
b7cdfc0e6e adapt to new structure 2013-07-24 12:50:01 -07:00
Bernhard Amann
9e0fd963e0 Merge remote-tracking branch 'origin/topic/robin/bloom-filter-merge' into topic/bernhard/hyperloglog
Conflicts:
	scripts/base/frameworks/sumstats/plugins/__load__.bro
	src/CMakeLists.txt
	src/NetVar.cc
	src/NetVar.h
	src/OpaqueVal.h
	src/SerialTypes.h
	src/bro.bif
2013-07-23 21:31:05 -07:00
Robin Sommer
21685d2529 Merge remote-tracking branch 'origin/topic/matthias/bloom-filter'
I'm moving the new files into a subdirectory probabilistic, and into a
corresponding namespace. We can later put code for the other
probabilistic data structures there as well.

* origin/topic/matthias/bloom-filter: (45 commits)
  Implement and test Bloom filter merging.
  Make hash functions equality comparable.
  Make counter vectors mergeable.
  Use half adder for bitwise addition and subtraction.
  Fix and test counting Bloom filter.
  Implement missing CounterVector functions.
  Tweak hasher interface.
  Add missing include for GCC.
  Fixing for unserializion error.
  Small fixes and style tweaks.
  Only serialize Bloom filter type if available.
  Create hash policies through factory.
  Remove lingering debug code.
  Factor implementation and change interface.
  Expose Bro's linear congruence PRNG as utility function.
  H3 does not check for zero length input.
  Support seeding for hashers.
  Add utility function to access first random seed.
  Update H3 documentation (and minor style nits.)
  Make H3 seed configurable.
  ...
2013-07-23 16:40:56 -07:00
Jon Siwek
73eb87a41e Exec module changes/fixes.
- Give Dir::monitor() a param for the polling interval, so different
  dirs can be monitored at different frequencies.

- Fix race in Exec::run() when reading extra output files produced by
  a process -- it was possible for Exec::run() to return before all
  extra output files had been fully read.

- Add test cases.
2013-07-23 14:16:39 -05:00
Seth Hall
f098b17429 A few test updates. 2013-07-23 11:18:49 -04:00
Jon Siwek
325f0c2a3f Coverage test fixes and whitespace/doc tweaks. 2013-07-22 14:15:35 -05:00
Seth Hall
5c3bf14d16 Fixed a scriptland state issue that manifested especially badly on proxies. 2013-07-22 14:02:56 -04:00
Jon Siwek
ca5abbf13a Merge branch 'master' into topic/jsiwek/exec-module 2013-07-22 10:23:28 -05:00
Vlad Grigorescu
deeb5ec38e Rework the DHCP analyzer to make it compatible again. 2013-07-21 20:31:23 -04:00
Seth Hall
26f8bd7ad7 Fix a reporter message in sumstats. 2013-07-20 01:21:01 -04:00
Seth Hall
9b444b2617 Updates for the Intel Framework.
- Intel importing format has changed (refer to docs).

 - All string matching is now case insensitive.

 - SMTP intel script has been updated to extract email
   addresses correctly.

 - Small fix sneaking into the smtp base script to actually
   extract individual email addresses in the To: field
   correctly.
2013-07-19 13:16:12 -04:00
Seth Hall
1e32100fed Fixing a dns reporter message in master. 2013-07-18 09:24:22 -04:00
Seth Hall
7838113dc2 Merge remote-tracking branch 'origin/master' into topic/seth/faf-updates
Conflicts:
	magic
2013-07-16 12:09:53 -04:00
Seth Hall
eb7ceb3e9a Forgot a file. 2013-07-16 12:07:33 -04:00
Seth Hall
0bfdcc1fbc Added protocol description functions that provide a super compressed log representation. 2013-07-16 12:01:50 -04:00
Seth Hall
4dd4c5344e Fix a bug where orig file information in http wasn't working right. 2013-07-12 16:12:26 -04:00
Seth Hall
b14f5a853e Added mime types to http.log 2013-07-12 16:06:40 -04:00