Detection rules › Sublime MQL

Attachment: HTML smuggling with embedded base64-encoded executable

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

HTML attachmemt contains a base-64 encoded executable.

Threat classification

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

CategoryValues
Attack typesMalware/Ransomware
Tactics and techniquesEvasion, HTML smuggling

Event coverage

Rule body MQL

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(.),
                (
                  .file_extension in~ ("html", "htm", "shtml", "dhtml")
                  or .flavors.mime == "text/plain"
                )
                and any(.flavors.yara, . == 'base64_pe')
        )
)

Detection logic

Scope: inbound message.

HTML attachmemt contains a base-64 encoded executable.

  1. inbound message
  2. any of attachments where all hold:
    • any of:
      • .file_extension in ('html', 'htm', 'shtml', 'dhtml')
      • .file_extension in $file_extensions_common_archives
      • .file_type is 'html'
    • any of file.explode(.) where all hold:
      • any of:
        • .file_extension in ('html', 'htm', 'shtml', 'dhtml')
        • .flavors.mime is 'text/plain'
      • any of .flavors.yara where:
        • . is 'base64_pe'

Inspects: attachments[].file_extension, attachments[].file_type, type.inbound. Sensors: file.explode. Reference lists: $file_extensions_common_archives.

Indicators matched (11)

FieldMatchValue
attachments[].file_extensionmemberhtml
attachments[].file_extensionmemberhtm
attachments[].file_extensionmembershtml
attachments[].file_extensionmemberdhtml
attachments[].file_typeequalshtml
file.explode(attachments[])[].file_extensionmemberhtml
file.explode(attachments[])[].file_extensionmemberhtm
file.explode(attachments[])[].file_extensionmembershtml
file.explode(attachments[])[].file_extensionmemberdhtml
file.explode(attachments[])[].flavors.mimeequalstext/plain
file.explode(attachments[])[].flavors.yara[]equalsbase64_pe