Commit graph

394 commits

Author SHA1 Message Date
Seth Hall
dc47203cd7 Fixing the SSL analysis crashes differently. 2011-10-04 14:40:49 -04:00
Seth Hall
a649be6d9e Bug fix and style updates. 2011-10-04 14:36:31 -04:00
Seth Hall
5a45c246e5 Updates for known-certs.
- Fixed a crash.

- Made some other small style updates.
2011-10-04 14:32:11 -04:00
Seth Hall
5a04190ffe More adjustment to reduce Weird volumes.
- New script extracted from weird.bro to implement the
  connection related "weird" data into an optionally
  loaded script.

- Adjusted the default notice tuning to stop ignoring
  the connection related weirds since they aren't loaded
  by default anymore.
2011-10-04 13:58:55 -04:00
Seth Hall
04a9a0dc38 Fixed an error when calculating x509 certificate hashes (reported by Martin Holste). 2011-10-04 13:19:11 -04:00
Jon Siwek
870bdf796d Fix some of the coverage unit tests. 2011-10-03 16:57:29 -05:00
Seth Hall
549661bd11 Updates to improve SSL scripts.
- Certificate validation volume has been greatly cut down by
  caching results.

- Cert hashing is now done in one place instead of being repeated
  everywhere a cert hash was needed.

- Some small cleanups for notice suppression that should greatly reduce
  duplicate notice volume about invalid certificates.
2011-10-03 13:58:42 -04:00
Seth Hall
936e6ad746 Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-09-29 13:07:37 -04:00
Seth Hall
0118621613 Taking advantage of yet another trick to get installed browser plugins.
- With the software-browser-plugins script you can watch for Omniture
  advertising servers to grab the list of installed plugins.

- I reorganized the plugin detection a bit too to abstract it better.

- Removed the WEB_ prefix from all of the Software::Type HTTP enums.
  They were essentially redundant due to the full name already being
  HTTP::SERVER (for example).
2011-09-29 13:07:28 -04:00
Robin Sommer
a84a422240 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Various unit test cleanup.
2011-09-28 16:54:23 -07:00
Seth Hall
9e2ddac572 Fixes for known-services.
- I was wildly misunderstanding the semantics of the
  connection_state_remove event.  That's fixed now in
  my brain and in the script.

- If a service isn't detected, logging is delayed by
  2 minutes to try and allow for another connection
  to happen that actually does the protocol correctly
  and detectably.
2011-09-28 12:51:44 -04:00
Seth Hall
19f1e34408 Deleting scripts that aren't ready to be included.
- scan.bro and hot.conn.bro will be returning soon.

- The rest are going to return as updated protocol analysis
  scripts and new/updated frameworks later.
2011-09-27 14:40:11 -04:00
Jon Siwek
a71ab223c4 Various unit test cleanup.
Updated README and collected coverage-related tests in a common dir.

There are still coverage failures resulting from either the following
scripts not being @load'd in the default bro mode:

base/frameworks/time-machine/notice.bro
base/protocols/http/partial-content.bro
base/protocols/rpc/main.bro

Or the following result in errors when @load'd:

policy/protocols/conn/scan.bro
policy/hot.conn.bro

If these are all scripts-in-progress, can we move them all to live
outside the main scripts/ directory until they're ready?
2011-09-27 12:41:30 -05:00
Seth Hall
8710d3749f New SSL policy scripts.
- protocols/ssl/expiring-certs uses time based information from
  certificates to determine if they will expire soon, have already
  expired, or haven't yet become valid.

- protocols/ssl/extract-certs-pem is a script for taking certs off
  the line and converting them to PEM certificates with the openssl
  command line tool then dumping them to a file.
2011-09-25 02:42:36 -04:00
Seth Hall
43ea0ba182 Some script level fixes.
- Fixed a type name conflict in the Known namespace.

- Fixed a DPD framework bug that was causing Reporter messages.
2011-09-25 02:09:50 -04:00
Jon Siwek
d2118200ea Fixing unit tests and some minor bugs. 2011-09-22 12:42:16 -05:00
Seth Hall
c8e6255666 More options for the header-names.bro script. 2011-09-14 22:44:17 -04:00
Seth Hall
f32b567c85 New script for logging header names and values.
- Closes #519.
2011-09-13 22:33:26 -04:00
Seth Hall
c87704cc25 Small usability and correctness updates.
- Removed an notice definition from the base SSL scripts.

- Moved a logging stream ID into the export section for known-services
  and bumped priority for creating the stream.

- Adding configuration knobs for the SQL injection attack detection
  script and renaming the HTTP::SQL_Injection_Attack notice to
  HTTP::SQL_Injection_Attack_Against

- Bumped priority when creating Known::CERTS_LOG.
2011-09-12 16:14:28 -04:00
Seth Hall
e07e4ca117 Cleaned up some small SSL mistakes. 2011-09-07 15:11:01 -04:00
Seth Hall
11c437faa3 Logging framework update and mass Log::ID renaming.
- Log path's are generated in the scripting land
  now.  The default Log stream ID to path string
  mapping works like this:
    - Notice::LOG -> "notice"
    - Notice::POLICY_LOG -> "notice_policy"
    - TestModule::LOG -> "test_module"

- Logging streams updated across all of the shipped
  scripts to be more user friendly.  Instead of
  the logging stream ID HTTP::HTTP, we now have
  HTTP::LOG, etc.

- The priorities on some bro_init handlers have
  been adjusted to make the process of applying
  filters or disabling streams easier for users.
2011-09-03 01:10:17 -04:00
Jon Siwek
13a09aa488 Fixes for GeoIP support (addresses #538).
- Missing GeoIP databases now generate warnings/errors that go through
  the reporter framework instead of hitting GeoIP's internal use of
  stderr

- lookup_location now just queries for country code if the city database
  was not loaded, which gets rid of invalid database type errors.

- lookup_location now leaves missing fields uninitialized in the
  returned geo_location record value.  Updated existing scripts to
  check for initialized fields in geo_location records before use.

- Fixed support for GeoIP's IPv6 API and databases
2011-08-30 17:02:07 -05:00
Seth Hall
fc5f22cb5d Merge remote-tracking branch 'origin/topic/jsiwek/reorg-followup' 2011-08-25 16:44:31 -04:00
Seth Hall
562abfb0d1 Merge remote-tracking branch 'origin/topic/gregor/script-polishing'
* origin/topic/gregor/script-polishing:
  Tune when c$conn is set.
  Set c$conn (for logging) in new_connection() event.
  (Semiautomatically) convert the comments in bare-init.bro into autodoc ones.
  Add ConnSize_Analyzer's fields to conn.log
  SSH base scripts: make sure ConnSizeAnalyzer variables are available before using them.
  Make reference to the other script a link
2011-08-25 13:17:49 -04:00
Seth Hall
c750f0c327 Fixing bug in "interesting hostnames" detection. 2011-08-22 16:38:24 -04:00
Seth Hall
a7f6e4c582 Adding metrics framework intermediate updates.
- Since each host in a cluster has it's own view of the metrics
  the only time the manager would get a chance for a global view
  is the break_interval.  This update improves that time.  If a
  worker crosses 10% of the full threshold, it will send it's
  value to the manager which can then ask the rest of the cluster
  for a global view.  The manager then adds all of the values for
  each workers metric indexes together and will do the notice
  if it crosses the threshold so that it isn't dependent on
  waiting for the break interval to hit.  This functionality
  works completely independently of the break_interval too.  Logging
  will happen as normal.

- Small update for SSH bruteforcer detection to match additions in
  the metrics framework API.

- The hope is that this update is mostly invisible from anyone's
  perspective.  The only affect it should have on users is to better
  the detection of metric values crossing thresholds on cluster
  deployments.
2011-08-21 00:32:00 -04:00
Seth Hall
82f94881c0 Improvements to metrics. SSH bruteforcing detection now done with metrics framework. 2011-08-16 11:47:49 -04:00
Jon Siwek
e37430ef66 Merge branch 'master' into topic/jsiwek/reorg-followup 2011-08-16 09:52:05 -05:00
Seth Hall
8286fdeea1 Updates for SQL injection attack detection to match the metrics framework updates. 2011-08-16 08:28:08 -04:00
Jon Siwek
33fce8a71d Misc. doc/script/test cleanup.
- fixing some Metrics::add_data() call signatures
- slight refactors to cluster framework @if and adding a NONE NodeType for
  so local_node_type() will return that instead of just emitting an error
  when cluster mode isn't enabled
- `make restdoc` target now uses bro's bare-mode
- bro scripts generated from bifs now really only live in the build/src/base/
  directory and changed the DocSourcesList.cmake to dynamically figure out
  what bifs exist by looking in src/ instead of build/src/
- add some missing @load dependencies
2011-08-15 17:29:41 -05:00
Jon Siwek
2a9ea6b8ba Merge branch 'master' into topic/jsiwek/autodoc-fixes
Conflicts:
	scripts/CMakeLists.txt
	scripts/base/frameworks/cluster/setup-connections.bro
	scripts/base/frameworks/communication/__load__.bro
	scripts/base/frameworks/metrics/conn-example.bro
	scripts/base/frameworks/metrics/http-example.bro
	scripts/site/local.bro
2011-08-13 09:31:06 -05:00
Gregor Maier
7ea0646f30 Make reference to the other script a link 2011-08-11 10:31:36 -07:00
Jon Siwek
351b13d1c8 Fix more bare-mode @load dependency problems 2011-08-11 11:47:12 -05:00
Jon Siwek
59e5fc5633 Merge branch 'master' into topic/jsiwek/reorg-followup
Conflicts:
	scripts/base/frameworks/cluster/setup-connections.bro
	scripts/base/protocols/ssh/main.bro
2011-08-11 10:56:20 -05:00
Seth Hall
423769c61d Updates to local.bro 2011-08-11 08:26:40 -04:00
Seth Hall
b45c175147 Split out more SMTP analysis functionality. 2011-08-11 08:26:20 -04:00
Seth Hall
9c2273b7a7 Updates for SSH scripts. 2011-08-11 01:35:50 -04:00
Jon Siwek
f517d0e0ad Merge branch 'master' into topic/jsiwek/reorg-followup 2011-08-10 19:59:18 -05:00
Jon Siwek
47500ceef4 Add a test that checks each individual script can be loaded in bare-mode.
Fixed most @load dependency issues in the process.  The test is still
failing in a "known" way due to hot.conn.bro and scan.bro.

Adressess #545
2011-08-10 15:38:21 -05:00
Seth Hall
adc486c673 Merge remote-tracking branch 'origin/topic/jsiwek/smtp-refactor'
- While updating, I did some further work on the branch.

- New function in the base/utils/files for extracting filenames
  from content-dispositions.

- New script for entity excerpt extraction if you aren't interested
  in full extraction.  The data goes a log field too.

- Some renaming and reorganization of types.

- Updated tests to work with new code.

* origin/topic/jsiwek/smtp-refactor:
  Make the doc.coverage test happy.
  SMTP script refactor. (addresses #509)

Conflicts:
	doc/scripts/DocSourcesList.cmake
	policy/protocols/smtp/__load__.bro
	policy/protocols/smtp/base/__load__.bro
2011-08-10 13:34:31 -04:00
Seth Hall
9fa3bcffdd Metrics framework checkpoint.
- Metrics API is much more similar to the Logging framework's API now.

- Filters define all output and metrics collection now.

- Initial attempt at thresholding and generating notices.
2011-08-09 11:12:02 -04:00
Jon Siwek
4ac6d0ae2e Fixes for script auto-documentation.
- Fixing the parts of the `make restdoc` and `make doc` process that were
  broken by the last Bro script re-organization

- Generated documentation for Bro scripts derived from BiFs now use the
  original BiF source file as the "original source file" link

- Renaming of the internal POLICYDEST definition and other misc places that
  refer to "policy" scripts; that terminology doesn't make total sense now

- Added a documentation blacklist reminder test that will fail if there's
  scripts that are blacklisted from being documentated because they're still
  in progress

- Some minor Bro script changes to fix small @load dependency errors

Addresses #543
2011-08-08 19:50:45 -05:00
Seth Hall
d6a67f7c1f Merge branch 'master' of ssh://git.bro-ids.org/bro
Conflicts:
	scripts/base/frameworks/control/main.bro
2011-08-05 23:11:40 -04:00
Seth Hall
597a4d6704 Hopefully the last major script reorganization.
- policy/ renamed to scripts/

- By default BROPATH now contains:
	- scripts/
	- scripts/policy
	- scripts/site

- *Nearly* all tests pass.

- All of scripts/base/ is loaded by main.cc
	- Can be disabled by setting $BRO_NO_BASE_SCRIPTS
	- Scripts in scripts/base/ don't use relative path loading to ease use of BRO_NO_BASE_SCRIPTS (to copy and paste that script).

- The scripts in scripts/base/protocols/ only (or soon will only) do logging and state building.

- The scripts in scripts/base/frameworks/ add functionality without causing any additional overhead.

- All "detection" activity happens through scripts in scripts/policy/.

- Communications framework modified temporarily to need an environment variable to actually enable (ENABLE_COMMUNICATION=1)
	- This is so the communications framework can be loaded as part
	  of the base without causing trouble when it's not needed.
	- This will be removed once a resolution to ticket #540 is reached.
2011-08-05 23:09:53 -04:00