Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Rule: Attachment html base64 script source #821

Closed
wants to merge 12 commits into from
Closed
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: "Attachment: HTML Smuggling with base64 script source"
morriscode marked this conversation as resolved.
Show resolved Hide resolved
description: |
Potential HTML smuggling attacks from new senders.
This rule detects HTML files as attachments or within archives that contain base64 script sources from new or outlier senders.
morriscode marked this conversation as resolved.
Show resolved Hide resolved
type: "rule"
severity: "medium"
source: |
type.inbound
and (
any(attachments,
(
.file_extension in~ ("html", "htm", "shtml", "dhtml")
or .file_type == "html"
or .content_type == "text/html"
)
and any(file.explode(.),
length(.scan.strings.strings) < 20
and any(.scan.strings.strings,
regex.icontains(., 'script src="data:text/html;base64')
morriscode marked this conversation as resolved.
Show resolved Hide resolved
)
)
)
morriscode marked this conversation as resolved.
Show resolved Hide resolved
or any(attachments,
(.file_extension in~ $file_extensions_common_archives)
and any(file.explode(.),
(
.file_extension in~ ("html", "htm", "shtml", "dhtml")
or ..file_type == "html"
or ..content_type == "text/html"
)
and length(.scan.strings.strings) < 20
and any(.scan.strings.strings,
regex.icontains(., 'script src="data:text/html;base64')
morriscode marked this conversation as resolved.
Show resolved Hide resolved
)
)
)
)
// first-time sender
and (
profile.by_sender().prevalence in ("new", "outlier")
or (
profile.by_sender().any_malicious_messages
and not profile.by_sender().any_false_positives
)
)
attack_types:
- "Credential Phishing"
- "Malware/Ransomware"
tactics_and_techniques:
- "Evasion"
- "HTML smuggling"
detection_methods:
- "Archive analysis"
- "Content analysis"
- "File analysis"
- "HTML analysis"
- "Sender analysis"

id: "f352db77-f2c9-5cfc-b8d3-8adf889f70f3"
Loading