Detection rules › Sublime MQL

Attachment: HTML file with excessive padding and suspicious patterns

Severity
high
Type
rule
Source
github.com/sublime-security/sublime-rules

Attached HTML file contains excessive line breaks and suspicious Javascript patterns.

Threat classification

Sublime's own taxonomy (not MITRE ATT&CK).

CategoryValues
Attack typesCredential Phishing, Malware/Ransomware
Tactics and techniquesEvasion, HTML smuggling

Event coverage

Rule body MQL

type.inbound
and any(attachments,
        (
          .content_type == "text/html"
          or .file_extension in~ ("html", "htm", "shtml", "dhtml")
          or .file_type == "html"
        )
        and any(file.explode(.),
                any(.scan.yara.matches, .name == "HTML_EXCESSIVE_PADDING")
        )
)

Detection logic

Scope: inbound message.

Attached HTML file contains excessive line breaks and suspicious Javascript patterns.

  1. inbound message
  2. any of attachments where all hold:
    • any of:
      • .content_type is 'text/html'
      • .file_extension in ('html', 'htm', 'shtml', 'dhtml')
      • .file_type is 'html'
    • any of file.explode(.) where:
      • any of .scan.yara.matches where:
        • .name is 'HTML_EXCESSIVE_PADDING'

Inspects: attachments[].content_type, attachments[].file_extension, attachments[].file_type, type.inbound. Sensors: file.explode.

Indicators matched (7)

FieldMatchValue
attachments[].content_typeequalstext/html
attachments[].file_extensionmemberhtml
attachments[].file_extensionmemberhtm
attachments[].file_extensionmembershtml
attachments[].file_extensionmemberdhtml
attachments[].file_typeequalshtml
file.explode(attachments[])[].scan.yara.matches[].nameequalsHTML_EXCESSIVE_PADDING