-
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.
Merge branch 'main' into morriscode-gitgudnoob
- Loading branch information
Showing
12 changed files
with
187 additions
and
41 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
detection-rules/attachment_credential_phishing_image_as_content.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,59 @@ | ||
name: "Credential Phishing: Image as content, short or no body contents" | ||
description: | | ||
This rule identifies incoming messages with minimal links, all image attachments and either empty, brief | ||
or the body text is only a warning banner/disclaimer. It also checks for truncated PNG images or logos in addition | ||
to high-confidence credit theft intentions. | ||
type: "rule" | ||
severity: "medium" | ||
source: | | ||
type.inbound | ||
and length(body.links) < 2 | ||
and 0 < (length(attachments)) < 3 | ||
and ( | ||
// body text is very short | ||
( | ||
0 <= (length(body.current_thread.text)) < 10 or body.current_thread.text is null | ||
) | ||
or ( | ||
length(body.current_thread.text) < 900 | ||
// or body is most likely all warning banner (text contains the sender and common warning banner language) | ||
and ( | ||
( | ||
strings.contains(body.current_thread.text, sender.email.email) | ||
and strings.contains(body.current_thread.text, 'caution') | ||
) | ||
or regex.icontains(body.current_thread.text, | ||
"intended recipient's use only|external email|sent from outside|you don't often" | ||
) | ||
) | ||
) | ||
) | ||
and ( | ||
all(attachments, | ||
(.file_type in $file_types_images) | ||
and ( | ||
any(file.explode(.), | ||
any(.scan.exiftool.fields, .value == "Truncated PNG image") | ||
or ( | ||
any(ml.logo_detect(..).brands, .name is not null) | ||
and any(ml.nlu_classifier(.scan.ocr.raw).intents, | ||
.name == "cred_theft" and .confidence == "high" | ||
) | ||
) | ||
) | ||
) | ||
) | ||
) | ||
attack_types: | ||
- "Credential Phishing" | ||
tactics_and_techniques: | ||
- "Evasion" | ||
- "Image as content" | ||
detection_methods: | ||
- "Computer Vision" | ||
- "Content analysis" | ||
- "File analysis" | ||
- "Header analysis" | ||
- "Natural Language Understanding" | ||
- "Optical Character Recognition" | ||
id: "01313f38-d0d1-5240-b407-8f9158639277" |
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
36 changes: 36 additions & 0 deletions
36
detection-rules/attachment_html_smuggling_line_break_obfuscation.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,36 @@ | ||
name: "Attachment: HTML smuggling with excessive line break obfuscation" | ||
description: | | ||
Credential Phishing attacks have been observed using excessive line breaks to obfuscate javascript functions within html files. | ||
type: "rule" | ||
severity: "high" | ||
source: | | ||
type.inbound | ||
and any(attachments, | ||
( | ||
.file_extension in~ ("html", "htm", "shtml", "dhtml") | ||
or .file_extension in~ $file_extensions_common_archives | ||
or .file_type == "html" | ||
) | ||
and any(file.explode(.), | ||
any(.scan.strings.strings, | ||
// return new line padded obfuscation | ||
regex.contains(., '(\\r\\n\S{2}){50,}') | ||
and strings.contains(., 'decodeURIComponent') | ||
) | ||
) | ||
) | ||
attack_types: | ||
- "Credential Phishing" | ||
- "Malware/Ransomware" | ||
tactics_and_techniques: | ||
- "Encryption" | ||
- "Evasion" | ||
- "HTML smuggling" | ||
- "Scripting" | ||
detection_methods: | ||
- "Archive analysis" | ||
- "Content analysis" | ||
- "File analysis" | ||
- "HTML analysis" | ||
- "Javascript analysis" | ||
id: "7e901440-5751-5d94-8b2d-47eb3c0e2b9d" |
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
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
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
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
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
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
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
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
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: "Open redirect: U.S. Antarctic Program Data Center (USAP-DC)" | ||
description: | | ||
Message contains use of the U.S. Antarctic Program Data Center (USAP-DC) open redirect. | ||
type: "rule" | ||
severity: "medium" | ||
source: | | ||
type.inbound | ||
and any(body.links, | ||
.href_url.domain.root_domain == "usap-dc.org" | ||
and .href_url.path =~ "/tracker" | ||
and strings.starts_with(.href_url.query_params, "type=dataset&url=http") | ||
) | ||
attack_types: | ||
- "Credential Phishing" | ||
- "Malware/Ransomware" | ||
tactics_and_techniques: | ||
- "Open redirect" | ||
detection_methods: | ||
- "URL analysis" | ||
id: "c499d041-1e95-52a5-bc7e-857376e1a873" |