← Back to Explore
sublimemediumRule
Attachment: HTML file contains exclusively Javascript
Attached HTML file does not contain any HTML other than a <script> block.
Detection Query
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(.),
length(.scan.strings.strings) == 1
and any(.scan.strings.strings,
regex.imatch(., '\s{0,}<script.*')
)
and any(.scan.strings.strings,
strings.ends_with(., "</script>")
)
)
)
Data Sources
Email MessagesEmail HeadersEmail Attachments
Platforms
email
Raw Content
name: "Attachment: HTML file contains exclusively Javascript"
description: |
Attached HTML file does not contain any HTML other than a <script> block.
type: "rule"
severity: "medium"
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(.),
length(.scan.strings.strings) == 1
and any(.scan.strings.strings,
regex.imatch(., '\s{0,}<script.*')
)
and any(.scan.strings.strings,
strings.ends_with(., "</script>")
)
)
)
attack_types:
- "Credential Phishing"
- "Malware/Ransomware"
tactics_and_techniques:
- "Evasion"
- "HTML smuggling"
- "Scripting"
detection_methods:
- "Archive analysis"
- "File analysis"
id: "b6d38168-20bb-5550-8843-6af9426af8b1"