mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Fixing intel framework tests.
This commit is contained in:
parent
ed14bdc77e
commit
a98c78c0d1
6 changed files with 43 additions and 38 deletions
|
@ -199,9 +199,10 @@ rest_target(${psd} policy/frameworks/files/hash-all-files.bro)
|
||||||
rest_target(${psd} policy/frameworks/intel/do_notice.bro)
|
rest_target(${psd} policy/frameworks/intel/do_notice.bro)
|
||||||
rest_target(${psd} policy/frameworks/intel/seen/conn-established.bro)
|
rest_target(${psd} policy/frameworks/intel/seen/conn-established.bro)
|
||||||
rest_target(${psd} policy/frameworks/intel/seen/dns.bro)
|
rest_target(${psd} policy/frameworks/intel/seen/dns.bro)
|
||||||
rest_target(${psd} policy/frameworks/intel/seen/http-host-header.bro)
|
rest_target(${psd} policy/frameworks/intel/seen/file-hashes.bro)
|
||||||
|
rest_target(${psd} policy/frameworks/intel/seen/file-names.bro)
|
||||||
|
rest_target(${psd} policy/frameworks/intel/seen/http-headers.bro)
|
||||||
rest_target(${psd} policy/frameworks/intel/seen/http-url.bro)
|
rest_target(${psd} policy/frameworks/intel/seen/http-url.bro)
|
||||||
rest_target(${psd} policy/frameworks/intel/seen/http-user-agents.bro)
|
|
||||||
rest_target(${psd} policy/frameworks/intel/seen/smtp-url-extraction.bro)
|
rest_target(${psd} policy/frameworks/intel/seen/smtp-url-extraction.bro)
|
||||||
rest_target(${psd} policy/frameworks/intel/seen/smtp.bro)
|
rest_target(${psd} policy/frameworks/intel/seen/smtp.bro)
|
||||||
rest_target(${psd} policy/frameworks/intel/seen/ssl.bro)
|
rest_target(${psd} policy/frameworks/intel/seen/ssl.bro)
|
||||||
|
|
|
@ -104,13 +104,13 @@ export {
|
||||||
|
|
||||||
## If a file was associated with this intelligence hit,
|
## If a file was associated with this intelligence hit,
|
||||||
## this is the uid for the file.
|
## this is the uid for the file.
|
||||||
fuid: string &log &optional;
|
fuid: string &log &optional;
|
||||||
## A mime type if the intelligence hit is related to a file.
|
## A mime type if the intelligence hit is related to a file.
|
||||||
## If the $f field is provided this will be automatically filled out.
|
## If the $f field is provided this will be automatically filled out.
|
||||||
file_mime_type: string &log &optional;
|
file_mime_type: string &log &optional;
|
||||||
## Frequently files can be "described" to give a bit more context.
|
## Frequently files can be "described" to give a bit more context.
|
||||||
## If the $f field is provided this field will be automatically filled out.
|
## If the $f field is provided this field will be automatically filled out.
|
||||||
file_desc: string &log &optional;
|
file_desc: string &log &optional;
|
||||||
|
|
||||||
## Where the data was seen.
|
## Where the data was seen.
|
||||||
seen: Seen &log;
|
seen: Seen &log;
|
||||||
|
@ -265,22 +265,25 @@ function has_meta(check: MetaData, metas: set[MetaData]): bool
|
||||||
|
|
||||||
event Intel::match(s: Seen, items: set[Item]) &priority=5
|
event Intel::match(s: Seen, items: set[Item]) &priority=5
|
||||||
{
|
{
|
||||||
if ( s$f?$conns && |s$f$conns| == 1 )
|
|
||||||
{
|
|
||||||
for ( cid in s$f$conns )
|
|
||||||
s$conn = s$f$conns[cid];
|
|
||||||
}
|
|
||||||
|
|
||||||
local info = Info($ts=network_time(), $seen=s);
|
local info = Info($ts=network_time(), $seen=s);
|
||||||
|
|
||||||
if ( ! info?$fuid )
|
if ( s?$f )
|
||||||
info$fuid = s$f$id;
|
{
|
||||||
|
if ( s$f?$conns && |s$f$conns| == 1 )
|
||||||
|
{
|
||||||
|
for ( cid in s$f$conns )
|
||||||
|
s$conn = s$f$conns[cid];
|
||||||
|
}
|
||||||
|
|
||||||
if ( ! info?$file_mime_type && s$f?$mime_type )
|
if ( ! info?$fuid )
|
||||||
info$file_mime_type = s$f$mime_type;
|
info$fuid = s$f$id;
|
||||||
|
|
||||||
if ( ! info?$file_desc )
|
if ( ! info?$file_mime_type && s$f?$mime_type )
|
||||||
info$file_desc = Files::describe(s$f);
|
info$file_mime_type = s$f$mime_type;
|
||||||
|
|
||||||
|
if ( ! info?$file_desc )
|
||||||
|
info$file_desc = Files::describe(s$f);
|
||||||
|
}
|
||||||
|
|
||||||
if ( s?$conn )
|
if ( s?$conn )
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,9 +18,10 @@
|
||||||
@load frameworks/intel/seen/__load__.bro
|
@load frameworks/intel/seen/__load__.bro
|
||||||
@load frameworks/intel/seen/conn-established.bro
|
@load frameworks/intel/seen/conn-established.bro
|
||||||
@load frameworks/intel/seen/dns.bro
|
@load frameworks/intel/seen/dns.bro
|
||||||
@load frameworks/intel/seen/http-host-header.bro
|
@load frameworks/intel/seen/file-hashes.bro
|
||||||
|
@load frameworks/intel/seen/file-names.bro
|
||||||
|
@load frameworks/intel/seen/http-headers.bro
|
||||||
@load frameworks/intel/seen/http-url.bro
|
@load frameworks/intel/seen/http-url.bro
|
||||||
@load frameworks/intel/seen/http-user-agents.bro
|
|
||||||
@load frameworks/intel/seen/smtp-url-extraction.bro
|
@load frameworks/intel/seen/smtp-url-extraction.bro
|
||||||
@load frameworks/intel/seen/smtp.bro
|
@load frameworks/intel/seen/smtp.bro
|
||||||
@load frameworks/intel/seen/ssl.bro
|
@load frameworks/intel/seen/ssl.bro
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
#empty_field (empty)
|
#empty_field (empty)
|
||||||
#unset_field -
|
#unset_field -
|
||||||
#path intel
|
#path intel
|
||||||
#open 2013-07-19-17-05-48
|
#open 2013-08-14-03-46-32
|
||||||
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p seen.indicator seen.indicator_type seen.where sources
|
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p fuid file_mime_type file_desc seen.indicator seen.indicator_type seen.where sources
|
||||||
#types time string addr port addr port string enum enum table[string]
|
#types time string addr port addr port string string string string enum enum table[string]
|
||||||
1374253548.038580 - - - - - 123.123.123.123 Intel::ADDR Intel::IN_ANYWHERE worker-1
|
1376451992.872806 - - - - - - - - 123.123.123.123 Intel::ADDR Intel::IN_ANYWHERE worker-1
|
||||||
#close 2013-07-19-17-05-57
|
#close 2013-08-14-03-46-42
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
#empty_field (empty)
|
#empty_field (empty)
|
||||||
#unset_field -
|
#unset_field -
|
||||||
#path intel
|
#path intel
|
||||||
#open 2013-07-19-17-04-26
|
#open 2013-08-14-03-47-03
|
||||||
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p seen.indicator seen.indicator_type seen.where sources
|
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p fuid file_mime_type file_desc seen.indicator seen.indicator_type seen.where sources
|
||||||
#types time string addr port addr port string enum enum table[string]
|
#types time string addr port addr port string string string string enum enum table[string]
|
||||||
1374253466.857185 - - - - - e@mail.com Intel::EMAIL SOMEWHERE source1
|
1376452023.137179 - - - - - - - - e@mail.com Intel::EMAIL SOMEWHERE source1
|
||||||
1374253466.857185 - - - - - 1.2.3.4 Intel::ADDR SOMEWHERE source1
|
1376452023.137179 - - - - - - - - 1.2.3.4 Intel::ADDR SOMEWHERE source1
|
||||||
#close 2013-07-19-17-04-26
|
#close 2013-08-14-03-47-03
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
#empty_field (empty)
|
#empty_field (empty)
|
||||||
#unset_field -
|
#unset_field -
|
||||||
#path intel
|
#path intel
|
||||||
#open 2013-07-19-17-06-57
|
#open 2013-08-14-03-47-23
|
||||||
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p seen.indicator seen.indicator_type seen.where sources
|
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p fuid file_mime_type file_desc seen.indicator seen.indicator_type seen.where sources
|
||||||
#types time string addr port addr port string enum enum table[string]
|
#types time string addr port addr port string string string string enum enum table[string]
|
||||||
1374253617.312158 - - - - - 1.2.3.4 Intel::ADDR Intel::IN_A_TEST source1
|
1376452043.835810 - - - - - - - - 1.2.3.4 Intel::ADDR Intel::IN_A_TEST source1
|
||||||
1374253617.312158 - - - - - e@mail.com Intel::EMAIL Intel::IN_A_TEST source1
|
1376452043.835810 - - - - - - - - e@mail.com Intel::EMAIL Intel::IN_A_TEST source1
|
||||||
1374253618.332565 - - - - - 1.2.3.4 Intel::ADDR Intel::IN_A_TEST source1
|
1376452044.855238 - - - - - - - - 1.2.3.4 Intel::ADDR Intel::IN_A_TEST source1
|
||||||
1374253618.332565 - - - - - e@mail.com Intel::EMAIL Intel::IN_A_TEST source1
|
1376452044.855238 - - - - - - - - e@mail.com Intel::EMAIL Intel::IN_A_TEST source1
|
||||||
#close 2013-07-19-17-07-06
|
#close 2013-08-14-03-47-32
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue