zeek/scripts/policy/frameworks/intel/seen/smb-filenames.bro
Stephen Hosom 8ce6d67acc Add SMB::IN_FILE_NAME to Intel::Where enum
This should reduce the ambiguity of where precisely the indicator was
seen so that it isn't confused with the normal File::IN_NAME hit.
2019-02-27 08:53:52 -05:00

20 lines
No EOL
540 B
Text

@load base/frameworks/intel
@load ./where-locations
event file_new(f: fa_file)
{
if ( f$source != "SMB" )
return;
for ( id in f$conns )
{
local c = f$conns[id];
if ( c?$smb_state && c$smb_state?$current_file && c$smb_state$current_file?$name )
{
Intel::seen([$indicator=c$smb_state$current_file$name,
$indicator_type=Intel::FILE_NAME,
$f=f,
$where=SMB::IN_FILE_NAME]);
}
}
}