Commit graph

13262 commits

Author SHA1 Message Date
Seth Hall
e6a3dbfb5d Fixed a bug in the notice framework.
- The notice alarm shorthand PolicyItem wasn't actually setting the action.
2011-10-03 10:45:37 -04:00
Seth Hall
be30dde827 Bug fix for FTP analysis script. 2011-10-03 00:06:05 -04:00
Robin Sommer
804687fb45 Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-09-30 07:20:21 -07:00
Robin Sommer
94fb2be253 Another fix the for 1xx script code. 2011-09-30 07:19:58 -07:00
Jon Siwek
8099640bc3 Fix the way HTTP tests were checking for weirds 2011-09-30 08:21:33 -05:00
Jon Siwek
71dc6b6de3 Fixing unit tests. 2011-09-30 07:53:23 -05:00
Robin Sommer
91ed9ffa8f Fixing a bunch of memory leaks.
Courtesy of perftools. Most are not really relevant but cleanup  the
perftools output. There was a big one in the logging code as well
though.
2011-09-29 22:53:07 -07: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
c0f8b5160c Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-09-29 21:25:11 -04: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
a87cc2f5dd Updating submodule(s). 2011-09-29 15:37:01 -07:00
Robin Sommer
2252e9d90b Fixing two memory leaks. 2011-09-29 15:28:41 -07:00
Seth Hall
36dbaa5b92 Loaded scripts is indented with spaces now and makes more sense to look at.
- Updated a test to make it pass again.
2011-09-29 15:53:54 -04:00
Seth Hall
7ae4a37279 A few small updates for test baselines I updated earlier. 2011-09-29 15:52:25 -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
e15dbb2389 Updating submodule(s). 2011-09-28 17:52:05 -07:00
Robin Sommer
5f7aed6687 Merge remote-tracking branch 'origin/topic/jsiwek/http-multipart-byteranges'
* origin/topic/jsiwek/http-multipart-byteranges:
  Teach HTTP parser to derive content length of multipart/byteranges bodies.

Closes #448.
2011-09-28 17:40:36 -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
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
6b52ca5222 Small changes for the capture-loss script make the output more understandable. 2011-09-28 11:19:15 -04: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
Seth Hall
6db77dc285 Ported the capture-loss script back into Bro.
- I removed the byte loss estimate since everything indicated that
  it could frequently be inaccurate.

- It has it's own logging stream now.  Notices are only used
  when too much loss has been detected (CaptureLoss::Too_Much_Loss)

- The gap_report event isn't used anymore.  I'm scheduling events
  to get the same effect by using the get_gap_summary BiF to
  collect the gap summary on demand.
2011-09-28 00:08:53 -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
07b01ec1e9 Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-09-27 14:55:24 -04:00
Seth Hall
8db949678d Fix a small bug in the metrics framework. 2011-09-27 14:42:55 -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
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
Robin Sommer
24bb14390b Updating submodule(s). 2011-09-25 14:18:53 -07:00
Robin Sommer
c9c4f64650 Updating submodule(s). 2011-09-25 14:17:33 -07:00
Robin Sommer
03ffce66fe Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-09-25 14:15:52 -07:00
Seth Hall
827dcea586 Updating some test baselines.
- I see 5 broken tests currently.
2011-09-25 08:09:37 -04: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
38792875b3 Add shorthand variable for modifying suppression intervals.
- Notice::type_suppression_intervals: table[Notice::Type] of interval
  can be used to modify the suppression intervals for entire types of
  notices.
2011-09-25 02:30:55 -04:00
Seth Hall
99a31ef21c EOF SSL protocol violations are only generated a single time now. 2011-09-25 02:11:04 -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
Seth Hall
5911520563 Cleanup and fixes to notice framework.
- Fixed the notice_policy log.

- Predicate functions are now logged.

- Predicate functions are now optional.  If not given, it's assumed that
  the result should always apply.
2011-09-25 01:10:07 -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
b3408d145c Merge branch 'master' of ssh://git.bro-ids.org/bro 2011-09-25 00:28:53 -04:00
Seth Hall
c395d14d92 Updating broctl branch 2011-09-25 00:28:19 -04:00
Robin Sommer
d289db34db Communication fix and extension.
- Removing unnecessary log flushing. Closes #498.

- Adding new BiF disconnect() that shuts a connection to a peer down.

- terminate_connection() now first flushes any still buffered log
  messages.
2011-09-24 21:23:25 -07:00
Jon Siwek
ee30268164 Teach HTTP parser to derive content length of multipart/byteranges bodies.
Addresses #488.
2011-09-23 10:31:20 -05:00
Robin Sommer
3b7806379c Adding &transient attribute to top-level SSL pac array type.
This avoids complete buffering of all SSL sessions in memory.

Closes #574.
2011-09-22 21:21:25 -07:00
Robin Sommer
a2edff9385 Updating baselines. 2011-09-22 19:52:11 -07:00
Robin Sommer
98d4b5e867 Updating submodule(s). 2011-09-22 19:34:12 -07:00
Robin Sommer
c9b9bab473 Merge remote-tracking branch 'origin/topic/seth/notice-suppression'
* origin/topic/seth/notice-suppression:
  Updated a notice related baseline and added a necessary @load line.
  Notice suppression clean up and notice/cluster integrtion fixes.
  Updates for notice suppression to use the &create_expire attribute
  Small, mostly cosmetic updates and fixing a test.
  Fix crash on exit (addresses #607).
  Duplicate notice suppression.

Closes #623.
2011-09-22 19:20:34 -07:00
Robin Sommer
fc491c087b Merge branch 'master', remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix PktSrc setting next_timestamp even when no packet available
  Fix lack of NUL-termination in to_upper/to_lower BIF's return val.
  Fixing unit tests and some minor bugs.
  Fix broctl cluster log rotation (addresses #619)

* master:
2011-09-22 19:04:54 -07:00