mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 21:48:21 +00:00
FileAnalysis: misc. tweaks/fixes.
- Add a timeout flag to file_analysis.log so it's easy to tell what has had at least one timeout trigger happen. - Fix ftp-data service tag not being set for reused connections. - Fix HTTP::Incorrect_File_Type because mime types returned by FAF have the charset still in them, but the HTTP::mime_types_extensions table does not and it requires an exact string match. (still ugly) - Add TRIGGER_NEW_CONN to track files going over multiple connections. - Add an initial file/mime type guess for non-linear file transfers. - Fix a case where file/mime type detection would never be attempted if the start of the file was a content gap. - Improve mime type tracking of HTTP byte-range/partial-content, even if the requests are pipelined or over multiple connections. - I changed the modbus.events test because having the baseline output be 80+ MB is nuts and it was sensitive to connection record redefs.
This commit is contained in:
parent
f0e9cdc30a
commit
3642ecc73e
16 changed files with 79842 additions and 159442 deletions
|
@ -126,6 +126,7 @@ event bro_init() &priority=5
|
|||
}
|
||||
|
||||
redef record FileAnalysis::Info += {
|
||||
timedout: bool &log &default=F;
|
||||
conn_uids: set[string] &log &optional;
|
||||
actions_taken: set[Action] &log &optional;
|
||||
extracted_files: set[string] &log &optional;
|
||||
|
@ -135,7 +136,14 @@ redef record FileAnalysis::Info += {
|
|||
};
|
||||
|
||||
hook FileAnalysis::policy(trig: FileAnalysis::Trigger, info: FileAnalysis::Info)
|
||||
&priority=-10
|
||||
&priority=5
|
||||
{
|
||||
if ( trig != FileAnalysis::TRIGGER_TIMEOUT ) return;
|
||||
info$timedout = T;
|
||||
}
|
||||
|
||||
hook FileAnalysis::policy(trig: FileAnalysis::Trigger, info: FileAnalysis::Info)
|
||||
&priority=-5
|
||||
{
|
||||
if ( trig != FileAnalysis::TRIGGER_EOF &&
|
||||
trig != FileAnalysis::TRIGGER_DONE ) return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue