mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00

Fixed most @load dependency issues in the process. The test is still failing in a "known" way due to hot.conn.bro and scan.bro. Adressess #545
23 lines
585 B
Text
23 lines
585 B
Text
@load base/frameworks/notice/main
|
|
@load base/frameworks/software/main
|
|
|
|
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)]);
|
|
}
|
|
}
|