-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create links_attached_emls.yml (#2075)
- Loading branch information
1 parent
79adc85
commit 31bae4d
Showing
10 changed files
with
143 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: "Links in Attached EML" | ||
type: "query" | ||
source: | | ||
filter(map(attachments, | ||
distinct( | ||
map(file.parse_eml(.).body.links, .href_url.url), .) | ||
), | ||
length(.) > 0 | ||
) | ||
severity: "informational" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: "Domains in Attached EML" | ||
type: "query" | ||
source: | | ||
filter(map(attachments, | ||
distinct( | ||
map(file.parse_eml(.).body.links, .href_url.domain.domain), .) | ||
), | ||
length(.) > 0 | ||
) | ||
severity: "informational" |
10 changes: 10 additions & 0 deletions
10
insights/attachments/links_free_file_host_attached_eml.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: "Links to Free File Hosts in Attached EML" | ||
type: "query" | ||
source: | | ||
filter(map(attachments, | ||
distinct( | ||
map(filter(file.parse_eml(.).body.links, .href_url.domain.root_domain in $free_file_hosts), .href_url.url), .) | ||
), | ||
length(.) > 0 | ||
) | ||
severity: "medium" |
10 changes: 10 additions & 0 deletions
10
insights/attachments/links_free_subdomain_host_attached_eml.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: "Links to Free Subdomain Host in Attached EML" | ||
type: "query" | ||
source: | | ||
filter(map(attachments, | ||
distinct( | ||
map(filter(file.parse_eml(.).body.links, .href_url.domain.root_domain in $free_subdomain_hosts and .href_url.domain.subdomain is not null and .href_url.domain.subdomain != "www"), .href_url.url), .) | ||
), | ||
length(.) > 0 | ||
) | ||
severity: "medium" |
17 changes: 17 additions & 0 deletions
17
insights/attachments/links_low_reputation_attached_eml.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: "Links With Low Reputation in Attached EML" | ||
type: "query" | ||
source: | | ||
filter(map(attachments, | ||
distinct(map(filter(file.parse_eml(.).body.links, | ||
.href_url.domain.root_domain not in $tranco_1m | ||
and .href_url.domain.root_domain not in $org_domains | ||
and .href_url.domain.root_domain != "sublimesecurity.com" | ||
), | ||
.href_url.url | ||
), | ||
. | ||
) | ||
), | ||
length(.) > 0 | ||
) | ||
severity: "low" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: "QR Code Link in Attached EML" | ||
type: "query" | ||
source: | | ||
map(attachments, | ||
map(filter(file.parse_eml(.).attachments, | ||
.file_type in $file_types_images | ||
or .file_extension in $file_extensions_macros | ||
or .file_type == "pdf" | ||
), | ||
map(filter(file.explode(.), .scan.qr.type == "url"), .scan.qr.url.url) | ||
) | ||
) | ||
severity: "medium" |
22 changes: 22 additions & 0 deletions
22
insights/attachments/links_qr_contains_recipient_email_attached_eml.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: "Recipient Email in QR Code Link of Attached EML" | ||
type: "query" | ||
source: | | ||
map(attachments, | ||
map(file.parse_eml(.).attachments, | ||
map(filter(file.explode(.), | ||
.scan.qr.type == "url" | ||
and ( | ||
any(file.parse_eml(...).recipients.to, | ||
strings.contains(..scan.qr.url.url, .email.email) | ||
) | ||
or | ||
any(recipients.to, | ||
strings.contains(..scan.qr.url.url, .email.email) | ||
) | ||
) | ||
), | ||
.scan.qr.url.url | ||
) | ||
) | ||
) | ||
severity: "high" |
20 changes: 20 additions & 0 deletions
20
insights/attachments/links_qr_free_subdomain_attached_eml.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: "QR Code Link to Free Subdomain in Attached EML" | ||
type: "query" | ||
source: | | ||
map(attachments, | ||
map(filter(file.parse_eml(.).attachments, | ||
.file_type in $file_types_images | ||
or .file_extension in $file_extensions_macros | ||
or .file_type == "pdf" | ||
), | ||
map(filter(file.explode(.), | ||
.scan.qr.type == "url" | ||
and .scan.qr.url.domain.root_domain in $free_subdomain_hosts | ||
and .scan.qr.url.domain.subdomain is not null | ||
and .scan.qr.url.domain.subdomain != "www" | ||
), | ||
.scan.qr.url.url | ||
) | ||
) | ||
) | ||
severity: "high" |
16 changes: 16 additions & 0 deletions
16
insights/attachments/links_recipient_email_attached_emls.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: "Recipient Email in Link in Attached EML" | ||
type: "query" | ||
source: | | ||
map(attachments, | ||
map(filter(file.parse_eml(.).body.links, | ||
any(file.parse_eml(..).recipients.to, | ||
strings.contains(..href_url.url, .email.email) | ||
) | ||
or any(recipients.to, | ||
strings.contains(..href_url.url, .email.email) | ||
) | ||
), | ||
.href_url.url | ||
), | ||
) | ||
severity: "medium" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: "Links to URL Shortener in Attached EML" | ||
type: "query" | ||
source: | | ||
filter(map(attachments, | ||
distinct(map(filter(file.parse_eml(.).body.links, | ||
.href_url.domain.root_domain in $url_shorteners | ||
), | ||
.href_url.url | ||
), | ||
. | ||
) | ||
), | ||
length(.) > 0 | ||
) | ||
severity: "medium" |