Commit graph

15 commits

Author SHA1 Message Date
Daniel Thayer
01a899255e Convert more redef-able constants to runtime options 2018-08-24 16:05:44 -05:00
Daniel Thayer
dc0904a7f3 Convert some redef-able constants to runtime options 2018-08-15 10:17:14 -05: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
Seth Hall
cafd35e746 Updates the files event api and brings file reassembly up to master. 2014-09-26 00:40:37 -04:00
Jon Siwek
bebedcd873 Merge branch 'master' into topic/jsiwek/file-signatures
Conflicts:
	scripts/policy/frameworks/files/detect-MHR.bro
2014-03-24 14:35:37 -05:00
Jon Siwek
d3f88ba9d1 Improve performance of MHR script, addresses BIT-1139.
The MHR script involves a "when" statement which can be expensive due to
the way it clones frames/vals.  In this case, the fa_file record is
expensive to clone, but this change works around that by unrolling only
the necessary fields from it that are needed to populate a Notice::Info
record.  A drawback to this is that the full fa_file or connection
records aren't available in the Notice::Info record when evaluating
Notice::policy hooks for MHR hit notices (though they can possibly be
recovered by using e.g. the lookup_connection() builtin_function).
2014-03-11 13:18:14 -05:00
Jon Siwek
095a68b2ec Various minor changes related to file mime type detection.
- Improve or just remove some file magic signatures ported from libmagic
  that were too general and matched incorrectly too often.

- Fix MHR script's use of fa_file$mime_type before checking if it's
  initialized.  It may be uninitialized if no signatures match.

- The "fa_file" record now contains a "mime_types" field that contains
  all magic signatures that matched the file content (where the
  "mime_type" field is just a shortcut for the strongest match).
2014-03-06 11:41:10 -06:00
Vlad Grigorescu
8ad2ab44e2 Change MHR notice sub message URL to a redef. 2013-11-05 17:10:19 -05:00
Vlad Grigorescu
09779836cb Update VirusTotal URL to work with changes to their website. 2013-11-05 12:06:33 -05:00
Daniel Thayer
24da7ab839 Fix typos and formatting in the policy/frameworks docs
Also updated some tests related to these changes.
2013-10-21 01:23:08 -05:00
Seth Hall
f098b17429 A few test updates. 2013-07-23 11:18:49 -04:00
Seth Hall
3d5c17e9e0 Add jar files to the default MHR lookups. 2013-07-10 23:46:01 -04:00
Seth Hall
be8c947c04 Adding CAB files for MHR checking. 2013-07-10 17:04:09 -04:00
Seth Hall
bf4f57383f Improve malware hash registry script.
- Include a link to a virustotal search in the notice sub message field.

 - Give all information returned from Team Cymru in the notice message.

 - Add more file types to match on to the default set.
2013-07-10 16:52:39 -04:00
Seth Hall
df2841458d Large overhaul in name and appearance for file analysis. 2013-07-05 02:00:14 -04:00