Commit graph

58 commits

Author SHA1 Message Date
Seth Hall
097354a43f Updates for the urls.bro script. Fixes BIT-1404. 2015-06-01 11:38:26 -04:00
Jon Siwek
23f04835c6 Deprecate split* family of BIFs.
These functions are now deprecated in favor of alternative versions that
return a vector of strings rather than a table of strings.

Deprecated functions:

- split: use split_string instead.
- split1: use split_string1 instead.
- split_all: use split_string_all instead.
- split_n: use split_string_n instead.
- cat_string_array: see join_string_vec instead.
- cat_string_array_n: see join_string_vec instead.
- join_string_array: see join_string_vec instead.
- sort_string_array: use sort instead instead.
- find_ip_addresses: use extract_ip_addresses instead.

Changed functions:

- has_valid_octets: uses a string_vec parameter instead of string_array.

Addresses BIT-924, BIT-757.
2015-01-21 15:34:42 -06:00
Johanna Amann
5836feb64d Do not change global event parameters in exec.bro
Addresses BIT-1294
2014-11-27 10:00:48 -08:00
Robin Sommer
9d3cfaddaa Merge branch 'master' of https://github.com/anthonykasza/bro
- I've changed/extended the URI record fields a bit:
        - path is always the full path including the full file name
        - if there's no path, the field still still be set set "/".
        - file_name is the full name including extenstion, and
          file_base and file_ext split it out.

    - Adding a test exercising a bunch of URLs.
2014-11-18 12:21:06 -08:00
akasza
ea79c07730 uri parsing complete 2014-11-06 19:52:03 -08:00
akasza
69ce4d3038 uri_decompose complete, need btests 2014-11-06 19:47:28 -08:00
akasza
3c42350e77 uri parsing function 2014-11-05 20:44:03 -08:00
Robin Sommer
4216a5eb1c Merge remote-tracking branch 'origin/topic/struck/BIT-1277'
* origin/topic/struck/BIT-1277:
  [ADD] Added the feature to return 0 content to the python http test server and added functionality for post requests
  [ADD] added baseline for the new active-http test and added a test to check for the content-length 0 fix.
  [ADD] added baseline for the new exec test and added a test to check for the empty files fix.
  [FIX] exec should write an empty string when file is empty instead of the filename
  [FIX] Add files to result table even if the files are empty

BIT-1277 #merged
2014-10-24 11:43:09 -07:00
Christian Struck
04746c7ffc [FIX] exec should write an empty string when file is empty instead of the filename 2014-10-22 11:57:03 -07:00
Christian Struck
4c305d6b92 [FIX] Add files to result table even if the files are empty 2014-10-20 15:59:58 -07:00
Daniel Thayer
d230eed7f8 Fix a doc build warning 2014-05-16 16:05:03 -05:00
Robin Sommer
78ab8de60d Merge remote-tracking branch 'origin/topic/vladg/radius'
* origin/topic/vladg/radius:
  Fix a couple memleaks.
  Basic RADIUS functionality implemented.
  Basic RADIUS support - checkpoint
2014-02-14 11:26:13 -08:00
Vlad Grigorescu
9e0b0f9187 Basic RADIUS support - checkpoint 2013-11-19 20:20:36 -05:00
Seth Hall
26be082951 Return the Dir module to file name tracking instead of inode tracking. 2013-10-29 11:09:55 -04:00
Daniel Thayer
4b8171f74a Document which Bro script vars are set by BroControl 2013-10-22 16:40:29 -05:00
Daniel Thayer
e724e5d392 Do not include documentation of commented-out items
Some documentation of commented-out items was being output to HTML,
which was causing that documentation to be merged with the
documentation of the next item.  Fixed by changing "##" to "#" so
that the doc comments are not included in the HTML.
2013-10-22 13:46:09 -05:00
Daniel Thayer
92dc8e5880 Fix typos and formatting in the base/utils docs 2013-10-16 20:41:56 -05:00
Jon Siwek
db470a637a Documentation fixes.
This cleans up most of the warnings from sphinx (broken :doc: links,
broxygen role misuses, etc.).  The remaining ones should be harmless,
but not quick to silence.

I found that the README for each component was a copy from the actual
repo, so I turned those in to symlinks so they don't get out of date.
2013-09-03 15:59:40 -05:00
Jon Siwek
1531980f3d Exec module and raw input reader fixes.
- Do stream mode for commands done by exec module, it seems important
  in some cases (e.g. ensure requested stdin is fully written).

- For cases where the raw input reader knows the child process has been
  reaped, set the childpid member to a sentinel value to indicate such
  so we don't later think we should kill it or wait on it anymore.

- More error checking on dup2/close calls.  Set sentinel values when
  closing ends of pipes to prevent double closing a fd.

- Signal flag not set when raw input reader's child exits as a result
  of a signal.  Left out a test for this -- might be portability issues
  (e.g. Ubuntu seems to do things different regarding the exit code and
  also is printing "Killed" to stderr where other platforms don't).
2013-08-02 17:27:10 -05: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
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
Jon Siwek
325f0c2a3f Coverage test fixes and whitespace/doc tweaks. 2013-07-22 14:15:35 -05:00
Jon Siwek
ca5abbf13a Merge branch 'master' into topic/jsiwek/exec-module 2013-07-22 10:23:28 -05:00
Seth Hall
5dbc354898 extract_filename_from_content_disposition is still hacky but more closely aligns with RFC5987 2013-07-09 14:05:36 -04:00
Jon Siwek
e45933562e Fix broken/missing documentation. 2013-05-23 16:53:42 -05:00
Seth Hall
ae9a02140e Fix the issue with transaction ID reuse in a single DNS connection.
- Each transaction ID within a connection is now maintained as
   a queue of DNS::Info logging records.

 - New function added to the queue.bro script to support
   peeking at the new gettable item in the queue without removing it.
2013-05-17 10:35:08 -04:00
Robin Sommer
b9249ecf9d Layout tweaks for the sumstats code, and preliminary updates for NEWS.
The layout changes are mostly whitespace and some comment rewrapping.
No functional changes.
2013-04-28 15:35:21 -07: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
a615601269 Trying to fix a state maintenance issue. 2013-04-11 09:42:46 -04:00
Seth Hall
f1d165956a Fix path compression to include removing "/./".
- This involved a fix to the FTP scripts that relied on the old behavior.
2013-04-02 00:16:56 -04:00
Seth Hall
b477d2b02d Measurement framework is ready for testing.
- New, expanded API.
 - Calculations moved into plugins.
 - Scripts using measurement framework ported.
 - Updated the script-land queue implementation to make it more generic.
 -
2013-04-01 17:04:15 -04:00
Seth Hall
0f99956417 Added Exec, Dir, and ActiveHTTP modules. 2013-03-13 14:36:27 -04:00
Seth Hall
09cbaa7ccc Merge remote-tracking branch 'origin/master' into topic/seth/metrics-merge
Conflicts:
	testing/btest/Baseline/coverage.default-load-baseline/canonified_loaded_scripts.log
	testing/btest/Baseline/scripts.base.frameworks.notice.cluster/manager-1.notice.log
	testing/btest/Baseline/scripts.base.frameworks.notice.suppression-cluster/manager-1.notice.log
	testing/btest/Baseline/scripts.base.protocols.ftp.gridftp/notice.log
2013-03-13 00:26:55 -04:00
Bernhard Amann
986b346e3f remove the byte_len and length bifs 2013-03-06 13:45:42 -08:00
Seth Hall
9e1d5d87de New script to detect FTP bruteforcing.
- Created a new time utils library.
2013-01-04 23:34:57 -05:00
Seth Hall
69030fdff3 Merge remote-tracking branch 'origin/master' into topic/seth/metrics-merge 2012-12-17 10:00:34 -05:00
Seth Hall
0cf98ac325 Improved file name extraction for SMTP when file name is included in Content-Type header. 2012-12-13 10:27:08 -05:00
Seth Hall
d61d175a04 Merge remote-tracking branch 'origin/master' into topic/seth/metrics-merge 2012-12-04 00:17:43 -05:00
Seth Hall
f956554c74 Slightly fix up file name extraction from Content-Disposition headers. 2012-12-03 11:57:00 -05:00
Seth Hall
2add60b4b1 A function wasn't returning a value like it should be. 2012-11-28 15:22:45 -05:00
Seth Hall
5b81cfe7e2 Implemented a nearly generic Queue in scriptland. 2012-11-19 23:42:19 -05:00
Robin Sommer
a40b00d4ab Merge branch 'topic/robin/intel-framework-merge'
* topic/robin/intel-framework-merge: (22 commits)
  Fixing tests after intel-framework merge.
  Extracting URLs from message bodies over SMTP and sending them to Intel framework.
  Small comment updates in the Intel framework CIF support.
  Intelligence framework documentation first draft.
  Only the manager tries to read files with the input framework now.
  Initial support for Bro's Intel framework with the Collective Intelligence Framework.
  Initial API for Intel framework is complete.
  Fixed an issue with cluster data distribution.
  Updating some intel framework test baselines.
  Reworked cluster intelligence data distribution mechanism and fixed tests.
  Lots more intelligence checking in SMTP traffic.
  Added intelligence check for "Received" path checking and a bit of reshuffling.
  Added sources to the intel log.
  Fixing a problem with intel distribution on clusters.
  Updated intel framework test to include matching.
  Restructuring the scripts that feed data into the intel framework slightly.
  One test for cluster transparency of the intel framework.
  Fixed a cluster support bug.
  Intelligence framework checkpoint
  Major updates to fix the Intel framework API.
  ...

Closes #914.
2012-11-05 16:00:38 -08:00
Robin Sommer
4e12813445 Fixing tests after modbus merge. 2012-11-05 15:58:38 -08:00
Seth Hall
172a6345b8 Extracting URLs from message bodies over SMTP and sending them to Intel framework.
- New utils package for URLs.

- Two functions in the URLs utils.  find_all_urls and
  find_all_urls_without_scheme.
2012-10-31 08:46:40 -04:00
Jon Siwek
905e4d3a14 Change IPv6 output format to no longer automatically be bracketed.
Instead, the `addr_to_uri` script-level function can be used to
explicitly add brackets to an address if it's IPv6 and will be
included in a URI or when a ":<port>" needs to be appended to it.
2012-05-07 12:55:54 -05:00
Robin Sommer
232b7688b2 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Add two more TLS extension values that we see in live traffic.
  Fixed IPv6 link local unicast CIDR and added	IPv6 loopback to private address space.
  Fixed a problem where cluster workers were still processing notices in some cases.
  Added Carrier Grade NAT CIDR and link local IPv6 to "private_address_space"
2012-05-03 11:45:00 -07:00
Seth Hall
8f91ecee71 Fixed IPv6 link local unicast CIDR and added IPv6 loopback to private address space. 2012-04-27 01:24:41 -04:00
Seth Hall
8c14b5a911 Added Carrier Grade NAT CIDR and link local IPv6 to "private_address_space" 2012-04-25 14:38:11 -04:00