EXPLORE
← Back to Explore
sublimehighRule

Attachment: HTML smuggling with high entropy and other signals

Recursively scans files and archives to detect HTML smuggling techniques.

MITRE ATT&CK

defense-evasionexecution

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(.),
                .scan.entropy.entropy >= 5
                and any(.scan.strings.strings,
                        regex.icontains(., "fromCharCode")
                        and regex.icontains(., "parseInt")
                        and regex.icontains(., "charCodeAt")
                        and regex.icontains(., '(\\x0.*?){50}')
                )
        )
)

Data Sources

Email MessagesEmail HeadersEmail Attachments

Platforms

email
Raw Content
name: "Attachment: HTML smuggling with high entropy and other signals"
description: |
  Recursively scans files and archives to detect HTML smuggling techniques.
references:
  - "https://www.microsoft.com/security/blog/2021/11/11/html-smuggling-surges-highly-evasive-loader-technique-increasingly-used-in-banking-malware-targeted-attacks/"
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(.),
                  .scan.entropy.entropy >= 5
                  and any(.scan.strings.strings,
                          regex.icontains(., "fromCharCode")
                          and regex.icontains(., "parseInt")
                          and regex.icontains(., "charCodeAt")
                          and regex.icontains(., '(\\x0.*?){50}')
                  )
          )
  )
attack_types:
  - "Malware/Ransomware"
tactics_and_techniques:
  - "Evasion"
  - "HTML smuggling"
  - "Scripting"
detection_methods:
  - "Archive analysis"
  - "Content analysis"
  - "File analysis"
  - "HTML analysis"
id: "be157288-1955-5ad1-bd6e-4e862248274b"