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

* 'topic/mohan/intel-event-groups' of https://github.com/Mohan-Dhawan/zeek:
coalesce smtp handlers for ADDR
Add fine-grained groups for Intel events
(cherry picked from commit d5e1dc27c6
)
26 lines
831 B
Text
26 lines
831 B
Text
@load base/frameworks/intel
|
|
@load base/protocols/ssl
|
|
@load ./where-locations
|
|
|
|
event ssl_extension_server_name(c: connection, is_orig: bool, names: string_vec) &group="Intel::DOMAIN"
|
|
{
|
|
if ( is_orig && c?$ssl && c$ssl?$server_name )
|
|
Intel::seen([$indicator=c$ssl$server_name,
|
|
$indicator_type=Intel::DOMAIN,
|
|
$conn=c,
|
|
$where=SSL::IN_SERVER_NAME]);
|
|
}
|
|
|
|
event ssl_established(c: connection) &group="Intel::DOMAIN"
|
|
{
|
|
if ( ! c$ssl?$cert_chain || |c$ssl$cert_chain| == 0 ||
|
|
! c$ssl$cert_chain[0]?$x509 )
|
|
return;
|
|
|
|
if ( c$ssl$cert_chain[0]$x509?$certificate && c$ssl$cert_chain[0]$x509$certificate?$cn )
|
|
Intel::seen([$indicator=c$ssl$cert_chain[0]$x509$certificate$cn,
|
|
$indicator_type=Intel::DOMAIN,
|
|
$fuid=c$ssl$cert_chain[0]$fuid,
|
|
$conn=c,
|
|
$where=X509::IN_CERT]);
|
|
}
|