Skip to content

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.

Adding correlation rules and template.

smicallef97a561fb92fb
diff --git a/correlations/cert_expired.yaml b/correlations/cert_expired.yaml
new file mode 100644
index 00000000..d7c3065c
--- /dev/null
+++ b/correlations/cert_expired.yaml
@@ -0,0 +1,18 @@
+id: cert_expired
+version: 1
+meta:
+ name: Expired SSL certificate found
+ description: >
+ A host was found with an expired SSL certificate. This may
+ pose a risk to the security of the service exposed and/or
+ cause connecting services to fail due to being unable to
+ verify the certificate.
+ risk: MEDIUM
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: SSL_CERTIFICATE_EXPIRED
+aggregation:
+ field: source.data
+headline: "Expired SSL certificate found: {source.data}"
diff --git a/correlations/cloud_bucket_open.yaml b/correlations/cloud_bucket_open.yaml
new file mode 100644
index 00000000..429b82f4
--- /dev/null
+++ b/correlations/cloud_bucket_open.yaml
@@ -0,0 +1,24 @@
+id: cloud_bucket_open
+version: 1
+meta:
+ name: Cloud storage bucket open to the Internet
+ description: >
+ A cloud storage bucket (e.g. S3) referenced from the target
+ website has been found to be open to the Internet. Such
+ buckets should be restricted so that contents cannot be
+ listed, even if needing to be publicly accessible.
+ risk: HIGH
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: CLOUD_STORAGE_BUCKET
+ - method: exact
+ field: source.type
+ value: LINKED_URL_EXTERNAL
+ - method: exact
+ field: child.type
+ value: CLOUD_STORAGE_BUCKET_OPEN
+aggregation:
+ field: data
+headline: "Cloud storage bucket found open: {data}"
diff --git a/correlations/cloud_bucket_open_related.yaml b/correlations/cloud_bucket_open_related.yaml
new file mode 100644
index 00000000..a76776df
--- /dev/null
+++ b/correlations/cloud_bucket_open_related.yaml
@@ -0,0 +1,25 @@
+id: cloud_bucket_open_related
+version: 1
+meta:
+ name: Possibly related cloud storage bucket open to the Internet
+ description: >
+ A cloud storage bucket (e.g. S3) potentially related to
+ the target has been found to be open to the Internet.
+
+ As the buckets in this case are based on name-matching, verification
+ for actual association with the target is necessary.
+ risk: LOW
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: CLOUD_STORAGE_BUCKET
+ - method: exact
+ field: source.type
+ value: not LINKED_URL_EXTERNAL
+ - method: exact
+ field: child.type
+ value: CLOUD_STORAGE_BUCKET_OPEN
+aggregation:
+ field: data
+headline: "Potentially relevant cloud storage bucket found open: {data}"
diff --git a/correlations/data_from_base64.yaml b/correlations/data_from_base64.yaml
new file mode 100644
index 00000000..97c42fc1
--- /dev/null
+++ b/correlations/data_from_base64.yaml
@@ -0,0 +1,22 @@
+id: data_from_base64
+version: 1
+meta:
+ name: Data was found within base64-encoded data
+ description: >
+ Possibly interesting data was found within base64-encoded data,
+ such as software versions, names, email addresses and hostnames.
+ risk: INFO
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: BASE64_DATA
+ - method: regex
+ field: child.data
+ value: .*
+ - method: exact
+ field: child.type
+ value: not HASH
+aggregation:
+ field: child.data
+headline: "Interesting data was found within base64-encoded data: '{child.data}'"
diff --git a/correlations/data_from_docmeta.yaml b/correlations/data_from_docmeta.yaml
new file mode 100644
index 00000000..4aa42c0c
--- /dev/null
+++ b/correlations/data_from_docmeta.yaml
@@ -0,0 +1,22 @@
+id: data_from_docmeta
+version: 1
+meta:
+ name: Data was found within document/image meta data
+ description: >
+ Possibly interesting data was found within document/image meta data,
+ such as software versions, names, email addresses and hostnames.
+ risk: INFO
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: RAW_FILE_META_DATA
+ - method: regex
+ field: child.data
+ value: .*
+ - method: exact
+ field: child.type
+ value: not HASH
+aggregation:
+ field: child.data
+headline: "Interesting data was found within document meta data: '{child.data}'"
diff --git a/correlations/database_exposed.yaml b/correlations/database_exposed.yaml
new file mode 100644
index 00000000..f4d98f06
--- /dev/null
+++ b/correlations/database_exposed.yaml
@@ -0,0 +1,46 @@
+id: database_exposed
+version: 1
+meta:
+ name: Database server exposed to the Internet
+ description: >
+ A database technology (MySQL, Oracle, Postgres, Redis,
+ Hadoop, MongoDB, Spark) was found to be accessible over
+ the Internet.
+
+ Even if authentication is required such systems should not
+ be exposed over the Internet due to the risk of misconfiguration
+ or unpatched vulnerabilities.
+ risk: HIGH
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: TCP_PORT_OPEN
+ - method: regex
+ field: data
+ value:
+ # MySQL
+ - .*:3306$
+ # Oracle
+ - .*:1521$
+ # PostgreSQL
+ - .*:5432$
+ # Redis
+ - .*:6379$
+ - .*:6380$
+ # Hadoop
+ - .*:50070$
+ - .*:50470$
+ - .*:50090$
+ - .*:500[12]0$
+ - .*:50475$
+ - .*:50075$
+ - .*:8020$
+ - .*:9000$
+ # Spark
+ - .*:7077$
+ # MongoDB
+ - .*:2701[789]$
+aggregation:
+ field: data
+headline: "Database server exposed to the Internet: {data}"
diff --git a/correlations/dev_or_test_system.yaml b/correlations/dev_or_test_system.yaml
new file mode 100644
index 00000000..dacca88a
--- /dev/null
+++ b/correlations/dev_or_test_system.yaml
@@ -0,0 +1,26 @@
+id: dev_or_test_system
+version: 1
+meta:
+ name: A host appearing to be a test or development system was found
+ description: >
+ A host that has dev, test, staging, internal or uat in its
+ name was found. This may indicate a system that is exposed
+ over the Internet unintentionally, and/or may be less secure
+ than other systems.
+ risk: MEDIUM
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: INTERNET_NAME
+ - method: regex
+ field: data
+ value:
+ - .*dev.*
+ - .*test.*
+ - .*uat.*
+ - .*internal.*
+ - .*staging.*
+aggregation:
+ field: data
+headline: "Development or internal system found: {data}"
diff --git a/correlations/dns_zone_transfer_possible.yaml b/correlations/dns_zone_transfer_possible.yaml
new file mode 100644
index 00000000..c8e12246
--- /dev/null
+++ b/correlations/dns_zone_transfer_possible.yaml
@@ -0,0 +1,18 @@
+id: dns_zone_transfer_possible
+version: 1
+meta:
+ name: DNS Zone Transfer is possible
+ description: >
+ It was possible to perform a DNS Zone Transfer with the
+ target's name server. Zone transfers can expose a significant
+ amount of information about the target network and have no
+ real need to be enabled in modern networks.
+ risk: HIGH
+collections:
+ - collect:
+ - method: exact
+ field: module
+ value: sfp_dnszonexfer
+aggregation:
+ field: source.data
+headline: "DNS Zone Transfer possible with {source.data}"
diff --git a/correlations/egress_ip_from_wikipedia.yaml b/correlations/egress_ip_from_wikipedia.yaml
new file mode 100644
index 00000000..cbc1e9b1
--- /dev/null
+++ b/correlations/egress_ip_from_wikipedia.yaml
@@ -0,0 +1,33 @@
+id: egress_ip_from_wikipedia
+version: 1
+meta:
+ name: Wikipedia page edit from target-owned network
+ description: >
+ A Wikipedia page edit was found to come from an IP address
+ within a network owned by the target. That IP address is
+ highly likely to be that of a VPN server or office egress
+ proxy/gateway.
+ risk: MEDIUM
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: NETBLOCK_OWNER
+ - collect:
+ - method: exact
+ field: type
+ value: IP_ADDRESS
+ - method: exact
+ field: child.type
+ value: WIKIPEDIA_PAGE_EDIT
+aggregation:
+ field: data
+analysis:
+ - method: match_all_to_first_collection
+ field: data
+ # Could also be 'contains' or 'exact'
+ match_method: subnet
+headline:
+ text: "Wikipedia edit from IP within target-owned network: {data}"
+ publish_collections:
+ - 1
diff --git a/correlations/email_in_multiple_breaches.yaml b/correlations/email_in_multiple_breaches.yaml
new file mode 100644
index 00000000..8d8b9f62
--- /dev/null
+++ b/correlations/email_in_multiple_breaches.yaml
@@ -0,0 +1,25 @@
+id: email_in_multiple_breaches
+version: 1
+meta:
+ name: >
+ An email address was reported to be in multiple breaches
+ description: >
+ An email address was reported to be in multiple breaches.
+
+ The presence in multiple breaches may indicate that the password
+ of the account is particularly weak, or that it was re-used across
+ the sites involved in the breaches. Note that some breaches simply
+ aggregate other breaches, or may be very old.
+ risk: HIGH
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: EMAILADDR_COMPROMISED
+aggregation:
+ field: source.data
+analysis:
+ - method: threshold
+ field: source.data
+ minimum: 2
+headline: "Email address reported in multiple breaches: {source.data}"
diff --git a/correlations/email_in_whois.yaml b/correlations/email_in_whois.yaml
new file mode 100644
index 00000000..9c6de65e
--- /dev/null
+++ b/correlations/email_in_whois.yaml
@@ -0,0 +1,24 @@
+id: email_in_whois
+version: 1
+meta:
+ name: A target-relevant email address was found in Whois data
+ description: >
+ An email address was found in Whois data that is directly
+ related to the target (e.g. same domain). The email found may
+ be that of a highly privileged person responsible for
+ maintaining the infrastructure of the target.
+
+ Email addresses are increasingly rarely found in Whois data due
+ to GDPR.
+ risk: INFO
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: EMAILADDR
+ - method: regex
+ field: source.type
+ value: .*WHOIS.*
+aggregation:
+ field: data
+headline: "Email address found in Whois record: {data}"
diff --git a/correlations/email_only_from_pasteleak_site.yaml b/correlations/email_only_from_pasteleak_site.yaml
new file mode 100644
index 00000000..46cb25be
--- /dev/null
+++ b/correlations/email_only_from_pasteleak_site.yaml
@@ -0,0 +1,35 @@
+id: email_only_from_pasteleak_site
+version: 1
+meta:
+ name: Email address only from paste/leak site
+ description: >
+ An email address was found mentioned in a paste/leak site but
+ nowhere else.
+
+ Since the email address was not found anywhere else, this may indicate
+ that the address is in some way special, perhaps not intended to
+ be publicly exposed/used or targeted in an attack.
+ risk: MEDIUM
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: EMAILADDR
+ - method: exact
+ field: source.type
+ value:
+ - LEAKSITE_CONTENT
+ - collect:
+ - method: exact
+ field: type
+ value: EMAILADDR
+ - method: exact
+ field: source.type
+ value:
+ - not LEAKSITE_CONTENT
+aggregation:
+ field: data
+analysis:
+ - method: first_collection_only
+ field: data
+headline: "Email address found only in paste/leak site: {data}"
diff --git a/correlations/host_only_from_bruteforce.yaml b/correlations/host_only_from_bruteforce.yaml
new file mode 100644
index 00000000..b4b27934
--- /dev/null
+++ b/correlations/host_only_from_bruteforce.yaml
@@ -0,0 +1,32 @@
+id: host_only_from_bruteforce
+version: 1
+meta:
+ name: Host only from bruteforcing
+ description: >
+ A hostname was found only by brute-forcing but nowhere else.
+
+ Since the host was not found anywhere else, this may indicate
+ that the host is in some way special, perhaps not intended to
+ be publicly exposed/used.
+ risk: LOW
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: INTERNET_NAME
+ - method: exact
+ field: module
+ value: sfp_dnsbrute
+ - collect:
+ - method: exact
+ field: type
+ value: INTERNET_NAME
+ - method: exact
+ field: module
+ value: not sfp_dnsbrute
+aggregation:
+ field: data
+analysis:
+ - method: first_collection_only
+ field: data
+headline: "Host found only through bruteforcing: {data}"
diff --git a/correlations/host_only_from_certificatetransparency.yaml b/correlations/host_only_from_certificatetransparency.yaml
new file mode 100644
index 00000000..833210c4
--- /dev/null
+++ b/correlations/host_only_from_certificatetransparency.yaml
@@ -0,0 +1,38 @@
+id: host_only_from_certificatetransparency
+version: 1
+meta:
+ name: Hostname only from certificate transparency
+ description: >
+ A hostname was found from certificate transparency but
+ nowhere else.
+
+ Since the host was not found anywhere else, this may indicate
+ that the host is in some way special, perhaps not intended to
+ be publicly exposed/used.
+ risk: LOW
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: INTERNET_NAME
+ - method: exact
+ field: module
+ value:
+ - sfp_crt
+ - sfp_certspotter
+ - collect:
+ - method: exact
+ field: type
+ value: INTERNET_NAME
+ - method: exact
+ field: module
+ value:
+ - not sfp_crt
+ - not sfp_certspotter
+ - not sfp_dnsresolve
+aggregation:
+ field: data
+analysis:
+ - method: first_collection_only
+ field: data
+headline: "Host found only in certificate transparency: {data}"
diff --git a/correlations/http_errors.yaml b/correlations/http_errors.yaml
new file mode 100644
index 00000000..66ac7e85
--- /dev/null
+++ b/correlations/http_errors.yaml
@@ -0,0 +1,28 @@
+id: http_errors
+version: 1
+meta:
+ name: Multiple HTTP errors found
+ description: >
+ Non-successful HTTP error codes were encountered. 401 and 403
+ are not included as these refer to authentication/authorization
+ failures.
+ risk: LOW
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: HTTP_CODE
+ - method: regex
+ field: data
+ value: ^[4-9].*$
+ # Leave out authentication/authorization failures
+ - method: regex
+ field: data
+ value: not 40[13]
+aggregation:
+ field: entity.data
+analysis:
+ - method: threshold
+ minimum: 2
+ field: data
+headline: "Multiple failure HTTP codes found at {entity.data}"
diff --git a/correlations/human_name_in_whois.yaml b/correlations/human_name_in_whois.yaml
new file mode 100644
index 00000000..a0e5e69b
--- /dev/null
+++ b/correlations/human_name_in_whois.yaml
@@ -0,0 +1,23 @@
+id: human_name_in_whois
+version: 1
+meta:
+ name: A human name was found in Whois data
+ description: >
+ A human name was found in Whois data. The name found may
+ be that of a highly privileged person responsible for
+ maintaining the infrastructure of the target.
+
+ Names are increasingly rarely found in Whois data due to
+ GDPR.
+ risk: INFO
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: HUMAN_NAME
+ - method: regex
+ field: source.type
+ value: .*WHOIS.*
+aggregation:
+ field: data
+headline: "Human name found in Whois record: {data}"
diff --git a/correlations/internal_host.yaml b/correlations/internal_host.yaml
new file mode 100644
index 00000000..62f66a23
--- /dev/null
+++ b/correlations/internal_host.yaml
@@ -0,0 +1,26 @@
+id: internal_host
+version: 1
+meta:
+ name: A host resolving to unroutable IPs was found
+ description: >
+ A host that resolves to an IP address on ranges reserved for
+ internal use (10.0.0.0/8, etc.) was found to be publicly
+ resolvable. This might reveal information about the internal
+ infrastructure and workings of the target.
+ risk: MEDIUM
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: IP_ADDRESS
+ - method: regex
+ field: data
+ value:
+ - ^192\\.168\\..*
+ - ^10\\..*
+ - method: exact
+ field: module
+ value: sfp_dnsresolve
+aggregation:
+ field: data
+headline: "An internal host was found: {data}"
diff --git a/correlations/multiple_malicious.yaml b/correlations/multiple_malicious.yaml
new file mode 100644
index 00000000..1d359b75
--- /dev/null
+++ b/correlations/multiple_malicious.yaml
@@ -0,0 +1,39 @@
+id: multiple_malicious
+version: 1
+meta:
+ name: >
+ An IP, host, subnet or email address was considered malicious by
+ multiple sources
+ description: >
+ An IP, host, subnet or email address was considered malicious by
+ multiple sources.
+
+ Such cases have a high likelihood of being genuinely malicious and
+ should be urgently investigated. Even if the entity in question is
+ not compromised, it's likely to be blocked across parts of the
+ Internet due to its presence in these lists.
+ risk: HIGH
+collections:
+ - collect:
+ - method: regex
+ field: type
+ value:
+ - MALICIOUS_*
+ - BLACKLIST_*
+ # Filter out all subnets
+ - method: regex
+ field: source.data
+ value: not .*/.*
+ # Filter out affiliates and Co-hosts
+ - method: regex
+ field: type
+ value:
+ - not .*COHOST.*
+ - not .*AFFILIATE.*
+aggregation:
+ field: source.data
+analysis:
+ - method: threshold
+ field: source.data
+ minimum: 2
+headline: "Entity considered malicious by multiple sources: {source.data}"
diff --git a/correlations/multiple_malicious_affiliate.yaml b/correlations/multiple_malicious_affiliate.yaml
new file mode 100644
index 00000000..af18d6e5
--- /dev/null
+++ b/correlations/multiple_malicious_affiliate.yaml
@@ -0,0 +1,33 @@
+id: multiple_malicious_affiliate
+version: 1
+meta:
+ name: >
+ An affiliated IP or host was considered malicious by multiple sources
+ description: >
+ An affiliated IP or host was considered malicious by multiple sources.
+
+ Such cases have a high likelihood of being genuinely malicious and
+ should be investigated depending on the nature of the relationship
+ between the target and the affiliate. Even if the entity in question is
+ not compromised, it's likely to be blocked across parts of the
+ Internet due to its presence in these lists and may therefore have
+ an impact on the target.
+ risk: LOW
+collections:
+ - collect:
+ - method: regex
+ field: type
+ value:
+ - MALICIOUS_*
+ - BLACKLIST_*
+ # Filter to only affiliated entities
+ - method: regex
+ field: type
+ value: .*AFFILIATE.*
+aggregation:
+ field: source.data
+analysis:
+ - method: threshold
+ field: source.data
+ minimum: 2
+headline: "Affiliated entity considered malicious by multiple sources: {source.data}"
diff --git a/correlations/multiple_malicious_cohost.yaml b/correlations/multiple_malicious_cohost.yaml
new file mode 100644
index 00000000..eeccb1d5
--- /dev/null
+++ b/correlations/multiple_malicious_cohost.yaml
@@ -0,0 +1,33 @@
+id: multiple_malicious_cohost
+version: 1
+meta:
+ name: >
+ A co-hosted site was considered malicious by multiple sources
+ description: >
+ A co-hosted site was considered malicious by multiple sources.
+
+ Such cases have a high likelihood of being genuinely malicious and
+ should be investigated depending on the nature of the relationship
+ between the target and the co-host. Even if the entity in question is
+ not compromised, it's likely to be blocked across parts of the
+ Internet due to its presence in these lists and may therefore have
+ an impact on the target.
+ risk: LOW
+collections:
+ - collect:
+ - method: regex
+ field: type
+ value:
+ - MALICIOUS_*
+ - BLACKLIST_*
+ # Filter to only co-hosted sites
+ - method: regex
+ field: type
+ value: .*COHOST.*
+aggregation:
+ field: source.data
+analysis:
+ - method: threshold
+ field: source.data
+ minimum: 2
+headline: "Co-hosted site considered malicious by multiple sources: {source.data}"
diff --git a/correlations/name_only_from_pasteleak_site.yaml b/correlations/name_only_from_pasteleak_site.yaml
new file mode 100644
index 00000000..492c7b3f
--- /dev/null
+++ b/correlations/name_only_from_pasteleak_site.yaml
@@ -0,0 +1,35 @@
+id: name_only_from_pasteleak_site
+version: 1
+meta:
+ name: Human name only from paste/leak site
+ description: >
+ A human name was found mentioned in a paste/leak site but
+ nowhere else.
+
+ Since the name was not found anywhere else, this may indicate
+ that the name is in some way special, perhaps not intended to
+ be publicly exposed/used or targeted in an attack.
+ risk: MEDIUM
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: INTERNET_NAME
+ - method: exact
+ field: source.type
+ value:
+ - LEAKSITE_CONTENT
+ - collect:
+ - method: exact
+ field: type
+ value: INTERNET_NAME
+ - method: exact
+ field: source.type
+ value:
+ - not LEAKSITE_CONTENT
+aggregation:
+ field: data
+analysis:
+ - method: first_collection_only
+ field: data
+headline: "Human name found only in paste/leak site: {data}"
diff --git a/correlations/open_port_version.yaml b/correlations/open_port_version.yaml
new file mode 100644
index 00000000..afc10a34
--- /dev/null
+++ b/correlations/open_port_version.yaml
@@ -0,0 +1,26 @@
+id: open_port_version
+version: 1
+meta:
+ name: Open TCP port reveals version
+ description: >
+ A possible software version has been revealed on an open port. Such
+ information may reveal the use of old/unpatched software used by
+ the target.
+ risk: INFO
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: TCP_PORT_OPEN_BANNER
+ - method: regex
+ field: data
+ value: .*[0-9]\.[0-9].*
+ - method: regex
+ field: data
+ value: not .*Mime-Version.*
+ - method: regex
+ field: data
+ value: not .*HTTP/1.*
+aggregation:
+ field: data
+headline: "Software version revealed on open port: {data}"
diff --git a/correlations/outlier_cloud.yaml b/correlations/outlier_cloud.yaml
new file mode 100644
index 00000000..548d919b
--- /dev/null
+++ b/correlations/outlier_cloud.yaml
@@ -0,0 +1,24 @@
+id: outlier_cloud
+version: 1
+meta:
+ name: Outlier Cloud provider
+ description: >
+ A cloud provider that appeared in 10% or less of the
+ total providers found. Outliers can often reveal
+ entities that are rare and therefore interesting.
+
+ Particularly in the case of cloud providers, an outlier
+ may be an indicator of Shadow IT or unmtaintained
+ infrastructure.
+ risk: MEDIUM
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: PROVIDER_HOSTING
+aggregation:
+ field: data
+analysis:
+ - method: outlier
+ maximum_percent: 10
+headline: "Outlier cloud provider found: {data}"
diff --git a/correlations/outlier_country.yaml b/correlations/outlier_country.yaml
new file mode 100644
index 00000000..f175b471
--- /dev/null
+++ b/correlations/outlier_country.yaml
@@ -0,0 +1,20 @@
+id: outlier_country
+version: 1
+meta:
+ name: Outlier country
+ description: >
+ A country that appeared in 10% or less of the total countries
+ found. Outliers can often reveal entities that are rare and
+ therefore interesting.
+ risk: INFO
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: COUNTRY_NAME
+aggregation:
+ field: data
+analysis:
+ - method: outlier
+ maximum_percent: 10
+headline: "Outlier country found: {data}"
diff --git a/correlations/outlier_email.yaml b/correlations/outlier_email.yaml
new file mode 100644
index 00000000..c58d58b6
--- /dev/null
+++ b/correlations/outlier_email.yaml
@@ -0,0 +1,20 @@
+id: outlier_email
+version: 1
+meta:
+ name: Outlier email address found
+ description: >
+ An email address that appeared in 10% or less of the
+ total email addresses found. Outliers can often reveal
+ entities that are rare and therefore interesting.
+ risk: INFO
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: EMAILADDR
+aggregation:
+ field: data
+analysis:
+ - method: outlier
+ maximum_percent: 10
+headline: "Outlier email address found: {data}"
diff --git a/correlations/outlier_hostname.yaml b/correlations/outlier_hostname.yaml
new file mode 100644
index 00000000..0b4617e3
--- /dev/null
+++ b/correlations/outlier_hostname.yaml
@@ -0,0 +1,20 @@
+id: outlier_hostname
+version: 1
+meta:
+ name: Outlier hostname
+ description: >
+ A hostname that appeared in 10% or less of the
+ total hostnames found. Outliers can often reveal
+ entities that are rare and therefore interesting.
+ risk: INFO
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: INTERNET_NAME
+aggregation:
+ field: data
+analysis:
+ - method: outlier
+ maximum_percent: 10
+headline: "Outlier hostname found: {data}"
diff --git a/correlations/outlier_ipaddress.yaml b/correlations/outlier_ipaddress.yaml
new file mode 100644
index 00000000..b3b05198
--- /dev/null
+++ b/correlations/outlier_ipaddress.yaml
@@ -0,0 +1,22 @@
+id: outlier_ipaddress
+version: 1
+meta:
+ name: Outlier IP address
+ description: >
+ An IP address that appeared in 10% or less of the
+ total IP addresses found. Outliers can often reveal
+ entities that are rare and therefore interesting.
+ risk: INFO
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value:
+ - IP_ADDRESS
+ - IPV6_ADDRESS
+aggregation:
+ field: data
+analysis:
+ - method: outlier
+ maximum_percent: 10
+headline: "Outlier IP address found: {data}"
diff --git a/correlations/outlier_registrar.yaml b/correlations/outlier_registrar.yaml
new file mode 100644
index 00000000..55686d13
--- /dev/null
+++ b/correlations/outlier_registrar.yaml
@@ -0,0 +1,23 @@
+id: outlier_registrar
+version: 1
+meta:
+ name: Outlier registrar
+ description: >
+ A registrar that appeared in 10% or less of the total registrars
+ found. Outliers can often reveal entities that are rare and
+ therefore interesting.
+
+ Particularly in the case of registrars, an outlier may be an
+ indicator of Shadow IT or unmtaintained infrastructure.
+ risk: MEDIUM
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: DOMAIN_REGISTRAR
+aggregation:
+ field: data
+analysis:
+ - method: outlier
+ maximum_percent: 10
+headline: "Outlier registrar found: {data}"
diff --git a/correlations/outlier_webserver.yaml b/correlations/outlier_webserver.yaml
new file mode 100644
index 00000000..c40dc65f
--- /dev/null
+++ b/correlations/outlier_webserver.yaml
@@ -0,0 +1,24 @@
+id: outlier_webserver
+version: 1
+meta:
+ name: Outlier web server
+ description: >
+ A web server that appeared in 10% or less of the
+ total web servers found. Outliers can often reveal
+ entities that are rare and therefore interesting.
+
+ Particularly in the case of web servers, an outlier
+ may be an indicator of Shadow IT or unmtaintained
+ infrastructure.
+ risk: MEDIUM
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: WEBSERVER_BANNER
+aggregation:
+ field: data
+analysis:
+ - method: outlier
+ maximum_percent: 10
+headline: "Outlier web server found: {data}"
diff --git a/correlations/remote_desktop_exposed.yaml b/correlations/remote_desktop_exposed.yaml
new file mode 100644
index 00000000..12be407d
--- /dev/null
+++ b/correlations/remote_desktop_exposed.yaml
@@ -0,0 +1,26 @@
+id: remote_desktop_exposed
+version: 1
+meta:
+ name: Remote desktop technology found exposed to the Internet
+ description: >
+ A remote desktop technology (RDP, VNC, NoMachine)
+ was found to be accessible over the Internet.
+
+ Even if authentication is required such systems should not
+ be exposed over the Internet due to the risk of misconfiguration
+ or unpatched vulnerabilities.
+ risk: HIGH
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: TCP_PORT_OPEN
+ - method: regex
+ field: data
+ value:
+ - .*:5900$
+ - .*:3389$
+ - .*:4000$
+aggregation:
+ field: source.data
+headline: "Remote desktop exposed to the Internet: {source.data}"
diff --git a/correlations/root_path_needs_auth.yaml b/correlations/root_path_needs_auth.yaml
new file mode 100644
index 00000000..fadb254f
--- /dev/null
+++ b/correlations/root_path_needs_auth.yaml
@@ -0,0 +1,25 @@
+id: root_path_needs_auth
+version: 1
+meta:
+ name: Website root path needs authentication
+ description: >
+ The base path of a server needs authentication, indicating the
+ server is likely sensitive or important.
+ risk: INFO
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: HTTP_CODE
+ - method: regex
+ field: data
+ value: 40[31]
+ # The source might be a host or URL
+ - method: regex
+ field: source.data
+ value:
+ - ^https?://[a-zA-Z0-9\.\-]+/?#?$
+ - ^[a-zA-Z0-9\.\-]+$
+aggregation:
+ field: source.data
+headline: "Base URL requires authentication: {source.data}"
diff --git a/correlations/stale_host.yaml b/correlations/stale_host.yaml
new file mode 100644
index 00000000..030a3327
--- /dev/null
+++ b/correlations/stale_host.yaml
@@ -0,0 +1,48 @@
+id: stale_host
+version: 1
+meta:
+ name: Stale host found
+ description: >
+ A host appears to be stale based upon various indicators such
+ as unsuccessful HTTP codes, expired SSL certificates, error
+ messages, vulnerabilities and junk files found. Such hosts
+ may be unmaintained, exposing the target to security risks.
+ risk: HIGH
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: SSL_CERTIFICATE_EXPIRED
+ - collect:
+ - method: exact
+ field: type
+ value: HTTP_CODE
+ - method: regex
+ field: data
+ value: not ^[2-3].*$
+ - method: regex
+ field: data
+ value: not 40[13]
+ - collect:
+ - method: exact
+ field: type
+ value: ERROR_MESSAGE
+ - collect:
+ - method: exact
+ field: type
+ value: JUNK_FILE
+ - collect:
+ - method: regex
+ field: type
+ value: VULNERABILITY_.*
+aggregation:
+ field: entity.data
+analysis:
+ - method: threshold
+ field: type
+ # Avoid multiple of the same type triggering. This means
+ # a minimum of 3 of different types must appear in one
+ # bucket.
+ count_unique_only: true
+ minimum: 3
+headline: "Potentially stale/unmaintained host: {entity.data}"
diff --git a/correlations/strong_affiliate_certs.yaml b/correlations/strong_affiliate_certs.yaml
new file mode 100644
index 00000000..59d30bc6
--- /dev/null
+++ b/correlations/strong_affiliate_certs.yaml
@@ -0,0 +1,39 @@
+id: strong_affiliate_certs
+version: 1
+meta:
+ name: Affiliated host/domain with strong relationship to the target
+ description: >
+ A host or domain was found to be referenced multiple times from
+ SSL certificates covering multiple target hosts.
+
+ Strong affiliates indicate potential targets that should be
+ included in the scope of scanning to ensure more complete coverage.
+ risk: INFO
+collections:
+ - collect:
+ - method: exact
+ field: module
+ value:
+ - sfp_sslcert
+ - sfp_crt
+ - sfp_certspotter
+ - method: exact
+ field: source.type
+ value:
+ - INTERNET_NAME
+ - DOMAIN_NAME
+ - method: exact
+ field: type
+ value:
+ - AFFILIATE_INTERNET_NAME
+ - AFFILIATE_DOMAIN_NAME
+ - CO_HOSTED_SITE
+ - CO_HOSTED_SITE_DOMAIN
+aggregation:
+ field: data
+analysis:
+ - method: threshold
+ field: source.data
+ count_unique_only: true
+ minimum: 2
+headline: "Affiliate with strong target relationship: {data}"
diff --git a/correlations/strong_similardomain_crossref.yaml b/correlations/strong_similardomain_crossref.yaml
new file mode 100644
index 00000000..81e60b75
--- /dev/null
+++ b/correlations/strong_similardomain_crossref.yaml
@@ -0,0 +1,25 @@
+id: strong_similardomain_crossref
+version: 1
+meta:
+ name: Similar domain with strong relationship to the target
+ description: >
+ A similar domain was found to be referenced by the target, and
+ references back, indicating a strong relationship.
+
+ Strong affiliates indicate potential targets that should be
+ included in the scope of scanning to ensure more complete coverage.
+ risk: INFO
+collections:
+ - collect:
+ - method: exact
+ field: module
+ value: sfp_crossref
+ - method: exact
+ field: type
+ value: AFFILIATE_INTERNET_NAME
+ - method: exact
+ field: source.type
+ value: SIMILARDOMAIN
+aggregation:
+ field: data
+headline: "Similar domain with strong target relationship: {data}"
diff --git a/correlations/template.yaml b/correlations/template.yaml
new file mode 100644
index 00000000..96f6000d
--- /dev/null
+++ b/correlations/template.yaml
@@ -0,0 +1,89 @@
+# Set the ID for the rule. Ensure it matches the filename (without the .yaml
+# extension) and has no spaces or other special characters.
+id: set_a_meaningful_id_here
+
+# Use version 1 for now.
+version: 1
+
+# The meta section sets meta attributes about the rule.
+meta:
+
+ # The human-readable name for the rule
+ name: This is a briefly descriptive name.
+
+ # A longer description for the rule
+ description: >
+ This is a more detailed description about the rule and ideally
+ includes some rationale explaining the risk posed, or other
+ relevant information that helps the user better understand the
+ value of the rule results.
+
+ You can have multiple paragraphs here too.
+
+ For this example rule, our goal is to find all hosts that
+ match "foo" or "bar", creating a correlation result when such a
+ host is found more than once.
+
+ # The risk the results of this rule posed. They can be one of:
+ # - HIGH (reserved for genuine cases requiring immediate action)
+ # - MEDIUM (potential high risk, needs deeper examination)
+ # - LOW (potential risk, but probably low risk or false positive)
+ # - INFO (no risk posed but potential interesting information)
+ risk: MEDIUM
+
+# Define the collections to perform here. Refer to the README.md
+# in the correlations folder for more details.
+collections:
+
+ # Each 'collect' block represents a collection of data from
+ # the SpiderFoot database. You need at least one 'collect'
+ # block for the rule to actually do something.
+ - collect:
+ # Each 'collect' block may contain multiple blocks
+ # for collecting and analyzing data. The first pulls
+ # data from the SpiderFoot database, and subsequent
+ # blocks further refine that data down to what you are
+ # interested in. You need at least one for the 'collect'
+ # block to have data.
+ #
+ # For example, this rule will extract all data elements
+ # that exactly match the INTERNET_NAME type.
+ - method: exact
+ field: type
+ value: INTERNET_NAME
+ # This next rule will filter out all the INTERNET_NAME
+ # results where data doesn't match any of the regular
+ # expressions provided.
+ - method: regex
+ field: data
+ value:
+ - .*foo.*
+ - .*bar.*
+ # What we are now left with in this collection are all
+ # INTERNET_NAME elements with data matching either .*foo.*
+ # or .*bar.*
+
+# With the data from your one or more collections, you can
+# now use 'aggregation' to define how they should be grouped
+# (if at all) for analysis at the next stage (also optional).
+aggregation:
+ # Each data element will be placed into a bucket according
+ # to its data field, which is the hostname since we have
+ # INTERNET_NAME data elements.
+ field: data
+
+# Analysis is an optional step to perform analysis on the
+# (optionally aggegated) data gathered to apply some criteria
+# determining whether a correlation creates results or not.
+analysis:
+ # Here we want to only generate a correlation result when
+ # the value of the data element's data field (the hostname
+ # in this case) appears at least two times.
+ - method: threshold
+ minimum: 2
+ field: data
+
+# With the collection, aggegation and analysis performed,
+# we can now generate the correlation result with a title
+# that represents something meaningful to the user.
+headline: "A foo or bar host was found more than once: {data}"
diff --git a/correlations/vulnerability_critical.yaml b/correlations/vulnerability_critical.yaml
new file mode 100644
index 00000000..2da2cea1
--- /dev/null
+++ b/correlations/vulnerability_critical.yaml
@@ -0,0 +1,18 @@
+id: vulnerability_critical
+version: 1
+meta:
+ name: At least one CRITICAL-rated vulnerability was found
+ description: >
+ A vulnerability rated as CRITICAL was found on a host.
+
+ Such vulnerabilities are typically easily exploitable and should
+ be urgently patched.
+ risk: HIGH
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: VULNERABILITY_CVE_CRITICAL
+aggregation:
+ field: entity.data
+headline: "Critical-rated vulnerability found on {entity.data}"
diff --git a/correlations/vulnerability_high.yaml b/correlations/vulnerability_high.yaml
new file mode 100644
index 00000000..1d386688
--- /dev/null
+++ b/correlations/vulnerability_high.yaml
@@ -0,0 +1,18 @@
+id: vulnerability_high
+version: 1
+meta:
+ name: At least one HIGH-rated vulnerability was found
+ description: >
+ A vulnerability rated as HIGH was found on a host.
+
+ Such vulnerabilities are typically easily exploitable and should
+ be urgently patched.
+ risk: HIGH
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value: VULNERABILITY_CVE_HIGH
+aggregation:
+ field: entity.data
+headline: "High-rated vulnerability found on {entity.data}"
diff --git a/correlations/vulnerability_mediumlow.yaml b/correlations/vulnerability_mediumlow.yaml
new file mode 100644
index 00000000..34c5a354
--- /dev/null
+++ b/correlations/vulnerability_mediumlow.yaml
@@ -0,0 +1,25 @@
+id: vulnerability_mediumlow
+version: 1
+meta:
+ name: Multiple MEDIUM or LOW-rated vulnerabilities were found
+ description: >
+ Multiple vulnerabilities rated as MEDIUM or LOW were found on a host.
+
+ Such vulnerabilities pose a lower risk to the target, however in
+ aggregate may be an indication that the host is not well maintained.
+ risk: MEDIUM
+collections:
+ - collect:
+ - method: exact
+ field: type
+ value:
+ - VULNERABILITY_CVE_MEDIUM
+ - VULNERABILITY_CVE_LOW
+ - VULNERABILITY_GENERAL
+aggregation:
+ field: entity.data
+analysis:
+ - method: threshold
+ field: entity.data
+ minimum: 2
+headline: "Multiple medium/low vulnerabilities found on {entity.data}"