mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00
Merge remote-tracking branch 'origin/master' into topic/seth/file-entropy
# Conflicts: # scripts/test-all-policy.bro # testing/btest/Baseline/coverage.default-load-baseline/canonified_loaded_scripts.log
This commit is contained in:
commit
89b4d79f93
1081 changed files with 38403 additions and 11012 deletions
|
@ -4,7 +4,7 @@
|
|||
##!
|
||||
##! It's intended to be used from the command line like this::
|
||||
##!
|
||||
##! bro <scripts> frameworks/control/controller Control::host=<host_addr> Control::port=<host_port> Control::cmd=<command> [Control::arg=<arg>]
|
||||
##! bro <scripts> frameworks/control/controller Control::host=<host_addr> Control::host_port=<host_port> Control::cmd=<command> [Control::arg=<arg>]
|
||||
|
||||
@load base/frameworks/control
|
||||
@load base/frameworks/communication
|
||||
|
|
8
scripts/policy/frameworks/files/extract-all-files.bro
Normal file
8
scripts/policy/frameworks/files/extract-all-files.bro
Normal file
|
@ -0,0 +1,8 @@
|
|||
##! Extract all files to disk.
|
||||
|
||||
@load base/files/extract
|
||||
|
||||
event file_new(f: fa_file)
|
||||
{
|
||||
Files::add_analyzer(f, Files::ANALYZER_EXTRACT);
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
##! Perform MD5 and SHA1 hashing on all files.
|
||||
|
||||
@load base/files/hash
|
||||
|
||||
event file_new(f: fa_file)
|
||||
{
|
||||
Files::add_analyzer(f, Files::ANALYZER_MD5);
|
||||
|
|
11
scripts/policy/frameworks/intel/seen/pubkey-hashes.bro
Normal file
11
scripts/policy/frameworks/intel/seen/pubkey-hashes.bro
Normal file
|
@ -0,0 +1,11 @@
|
|||
@load base/frameworks/intel
|
||||
@load ./where-locations
|
||||
|
||||
event ssh_server_host_key(c: connection, hash: string)
|
||||
{
|
||||
local seen = Intel::Seen($indicator=hash,
|
||||
$indicator_type=Intel::PUBKEY_HASH,
|
||||
$conn=c,
|
||||
$where=SSH::IN_SERVER_HOST_KEY);
|
||||
Intel::seen(seen);
|
||||
}
|
|
@ -10,3 +10,16 @@ event ssl_extension_server_name(c: connection, is_orig: bool, names: string_vec)
|
|||
$conn=c,
|
||||
$where=SSL::IN_SERVER_NAME]);
|
||||
}
|
||||
|
||||
event ssl_established(c: connection)
|
||||
{
|
||||
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,
|
||||
$conn=c,
|
||||
$where=X509::IN_CERT]);
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ export {
|
|||
SMTP::IN_REPLY_TO,
|
||||
SMTP::IN_X_ORIGINATING_IP_HEADER,
|
||||
SMTP::IN_MESSAGE,
|
||||
SSH::IN_SERVER_HOST_KEY,
|
||||
SSL::IN_SERVER_NAME,
|
||||
SMTP::IN_HEADER,
|
||||
X509::IN_CERT,
|
||||
|
|
|
@ -2,6 +2,18 @@
|
|||
@load base/files/x509
|
||||
@load ./where-locations
|
||||
|
||||
event x509_ext_subject_alternative_name(f: fa_file, ext: X509::SubjectAlternativeName)
|
||||
{
|
||||
if ( ext?$dns )
|
||||
{
|
||||
for ( i in ext$dns )
|
||||
Intel::seen([$indicator=ext$dns[i],
|
||||
$indicator_type=Intel::DOMAIN,
|
||||
$f=f,
|
||||
$where=X509::IN_CERT]);
|
||||
}
|
||||
}
|
||||
|
||||
event x509_certificate(f: fa_file, cert_ref: opaque of x509, cert: X509::Certificate)
|
||||
{
|
||||
if ( /emailAddress=/ in cert$subject )
|
||||
|
|
|
@ -53,7 +53,7 @@ export {
|
|||
|
||||
event HTTP::log_http(rec: HTTP::Info) &priority=5
|
||||
{
|
||||
if ( rec?$host && rec?$user_agent && rec$host == "crl.microsoft.com" &&
|
||||
if ( rec?$host && rec?$user_agent && /crl.microsoft.com/ in rec$host &&
|
||||
/Microsoft-CryptoAPI\// in rec$user_agent )
|
||||
{
|
||||
if ( rec$user_agent !in crypto_api_mapping )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue