mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 07:08:19 +00:00
23 lines
575 B
Text
23 lines
575 B
Text
@load base/frameworks/notice
|
|
@load base/frameworks/software
|
|
|
|
module Software;
|
|
|
|
export {
|
|
redef enum Notice::Type += {
|
|
Vulnerable_Version,
|
|
};
|
|
|
|
## This is a table of software versions indexed by the name of the
|
|
## software and yielding the latest version that is vulnerable.
|
|
const vulnerable_versions: table[string] of Version &redef;
|
|
}
|
|
|
|
event log_software(rec: Info)
|
|
{
|
|
if ( rec$name in vulnerable_versions &&
|
|
cmp_versions(rec$version, vulnerable_versions[rec$name]) <= 0 )
|
|
{
|
|
NOTICE([$note=Vulnerable_Version, $src=rec$host, $msg=software_fmt(rec)]);
|
|
}
|
|
}
|