Commit graph

62 commits

Author SHA1 Message Date
Seth Hall
70004cb04d Small updates to address the "globals" ticket.
Fixes #633
2011-11-30 11:35:53 -05:00
Robin Sommer
fa76330afb Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Binary packaging script tweaks.
  More default "weird" tuning for the "SYN_with_data" notice.
  Tiny bugfix for http file extraction along with test.
2011-11-15 07:53:36 -08:00
Seth Hall
d14349a6f8 Merge remote-tracking branch 'origin/master' into fastpath 2011-11-14 16:06:44 -05:00
Seth Hall
b12d2c768e Tiny bugfix for http file extraction along with test. 2011-11-14 15:24:15 -05:00
Seth Hall
ae3ae9a75b Awful fix for SSH login detection.
- We need a counted measure of payload bytes (not ack tracking and
  not with the IP header which is what we have now).
2011-10-27 09:41:34 -04:00
Jon Siwek
55978d1c18 Changed generated root cert DN format for RFC2253 compliance. 2011-10-25 11:09:31 -05:00
Seth Hall
4753f2aeca Adding extra fields to smtp and http to track transaction depth.
- This will for help linking in analysis scripts and databases later.

- Test baseline updates coming in a few minutes.
2011-10-25 11:34:48 -04:00
Seth Hall
2131468b08 Merging this branch. It's working better than the existing code. 2011-10-25 11:17:19 -04:00
Seth Hall
dcc8d8456a Removed some fields from http analysis that weren't commonly needed or were wrong. 2011-10-25 09:32:31 -04:00
Jon Siwek
522e0e4d46 Update Mozilla trust roots to index certs by subject distinguished name. 2011-10-25 07:52:24 -05:00
Seth Hall
e6a8489780 Testing a fix for SSH login detection heuristic. 2011-10-25 00:01:04 -04:00
Seth Hall
8b56c54348 Slightly restructured http file hashing to fix a bug. 2011-10-21 14:03:31 -04:00
Seth Hall
8661abe9d9 Small script refinements and documentation updates. 2011-10-21 13:58:58 -04:00
Seth Hall
6d67f7830d Added to the likely_server_ports set for protocols with analyzers.
- Updated some tests since Bro is getting the direction
  correct now.

- Updated BPF filter test since I added a few ports to IRC
  as well.
2011-10-07 13:44:28 -04:00
Seth Hall
686946d0dd Internal simplication for FTP analysis scripts. 2011-10-07 13:36:02 -04:00
Seth Hall
8600b676e6 Fixed a TODO in the DNS analysis script. 2011-10-07 13:32:44 -04:00
Jon Siwek
c9a540b992 Add check for optional HTTP::Info status_code. 2011-10-04 14:27:51 -05:00
Seth Hall
be30dde827 Bug fix for FTP analysis script. 2011-10-03 00:06:05 -04:00
Robin Sommer
221d1663be Merge branch 'master' of ssh://git.bro-ids.org/bro
Conflicts:
	scripts/base/protocols/http/main.bro
2011-09-29 18:54:50 -07:00
Seth Hall
012d8cfc5f Fix for shutdown bug in http scripts.
- The bug was introduced with the recent 1xx update.

- I updated some tests that seemed be written wrong.
2011-09-29 21:25:00 -04:00
Robin Sommer
f7521ad222 Fixing occasional HTTP crash with new 1xx code.
Sometimes the status_code field isn't set. Adding check for that, hope
that's all that needed.
2011-09-29 16:18:25 -07:00
Robin Sommer
4d6a90ce89 Merge remote-tracking branch 'origin/topic/jsiwek/http-1xx-replies'
* origin/topic/jsiwek/http-1xx-replies:
  Change logging of HTTP 1xx responses to occur in their own columns.
  Fix handling of HTTP 1xx response codes (addresses #411).
2011-09-28 17:10:40 -07:00
Seth Hall
c621da523b Since these now measure "seen" data, set the default to 0.
- A null value no longer fits since if there is no body
  a value of zero makes sense.  Previously, a null value would
  makes sense because the Content-Length header may not have
  been sent which would leave the field null.
2011-09-28 11:18:24 -04:00
Jon Siwek
7af3977a50 Change logging of HTTP 1xx responses to occur in their own columns.
Instead of as entirely new log lines (addresses #411).
2011-09-27 14:15:23 -05: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
64e821624b Fix handling of HTTP 1xx response codes (addresses #411).
Changed the parser to not treat 1xx response codes as a final answer
to an unanswered request -- a later response is still expected.

The scripting layer will also not finish a request-reply pair when
seeing 1xx's, instead it logs both the 1xx and final response messages
with associated information of the current request as they're seen.
2011-09-26 17:37:29 -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
3449321dc1 Fix a problem with accidental and mistaken HTTP log lines. 2011-09-25 00:56:53 -04:00
Seth Hall
f53d5fe0b9 Added session ID to the SSL logging. 2011-09-20 13:59:22 -04:00
Seth Hall
16eafb771f Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-09-20 13:56:02 -04:00
Seth Hall
b20edb8542 Updated the mozilla root certs. 2011-09-20 13:55:36 -04:00
Seth Hall
123a3bd4e3 Small rework with ssl base script to reduce memory usage.
- We are now removing the SSL analyzer after logging the session
  infomrtion.  This seems to help a lot with overly high memroy
  consumption.
2011-09-16 23:47:04 -04:00
Robin Sommer
9ee8a9f806 Testing/external scripts no longer compute MD5 checksums for SMTP
entities.

Before, whether they did depended on libmagic. To do that,
smpt/entities.bro gets a new option `never_calc_md5`.

Also restructuring the tests a bit so that load a common
testing-setup.bro scripts that can set a global configuration.
2011-09-15 15:42:10 -07:00
Seth Hall
af6c7c8b1a HTTP body size measurement added to http log.
- The value of the content-length headers has now been removed
  but it could be added back locally at an installation by a user.

- Added fields to indicate if some parsing interruption happened
  during the body transfer.

- Closes #581
2011-09-13 21:34:29 -04:00
Seth Hall
ee1884ca93 Another change to possibly fix the SSL memory consumption problem.
- If a protocol violation happens, Bro now logs what it has seen
  up until the protocol violation and deletes the c$ssl record
  so that a long lived connection with a protocol violation does
  continue to hold the memory.
2011-09-13 09:09:55 -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
Robin Sommer
db8ab89c3a Merge remote branch 'origin/topic/jsiwek/misc-doc-fixes'
* origin/topic/jsiwek/misc-doc-fixes:
  More tweaks to generated script docs.
  Various changes to documentation framework.

Closes #598.
2011-09-08 09:07:20 -07:00
Seth Hall
4931aa815f Delete SSL certificates from memory after ssl_established event.
- This is an attempt at fixing the memory issues brought about by
  the introduction of the new SSL analyzer.  My initial testing
  shows a hefty memory saving.
2011-09-08 01:52:25 -04:00
Seth Hall
e07e4ca117 Cleaned up some small SSL mistakes. 2011-09-07 15:11:01 -04:00
Jon Siwek
80e154ba3c Various changes to documentation framework.
- Reorganize top-level 'doc' Makefile target so submodules can easily
  add their own doc-generating routines to it.  e.g. the Bro project
  makes a placeholder 'doc' target, then adds 'restdoc', 'sphinxdoc';
  later Broccoli can add it's own target as a dependency for generating
  API docs.

- Fixed generated docs for BIFs not being organized under a base/
  subdirectory like the original source files.

- Fixed documentation style for function parameters not applying to
  functions declared as record fields.

- Misc. script documentation tweaks to address warnings given by Sphinx.
2011-09-07 10:02:15 -05: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
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
9160898d03 The SSH::Login notice type has returned. 2011-08-24 12:55:28 -04:00
Gregor Maier
89d5e01d38 Tune when c$conn is set.
After discussion with Seth we now set c$conn in
connection_state_remove() with priority 5, and log it with priority -5.
If users want to extend c$conn before connection_state_remove, they can
just create c$conn and add custom fields.

Addresses: #554
2011-08-19 14:42:48 -07: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
95d84da1b0 Set c$conn (for logging) in new_connection() event.
c$conn was originally set in connection_established(), which is only
used by TCP connections, and in connection_state_remove(). Using
new_connection() allows us to have c$conn available for any connection
and for any script that wants to extend logging to conn.log.
2011-08-11 15:29:54 -07:00
Gregor Maier
fe5624fb06 Add ConnSize_Analyzer's fields to conn.log 2011-08-11 12:21:42 -07:00
Gregor Maier
88f7db927e SSH base scripts: make sure ConnSizeAnalyzer variables are available before using them. 2011-08-11 12:20:38 -07:00
Jon Siwek
351b13d1c8 Fix more bare-mode @load dependency problems 2011-08-11 11:47:12 -05:00