EXPLORE
← Back to Explore
sublimehighRule

Attachment: HTML attachment with Javascript location

Recursively scans files and archives to detect HTML smuggling techniques.

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 .size <= 5000
        and any(file.explode(.),
                any(.scan.javascript.identifiers, . == "location")
                and length(.scan.javascript.identifiers) < 100
        )
)

Author

vector_sec

Data Sources

Email MessagesEmail HeadersEmail Attachments

Platforms

email
Raw Content
name: "Attachment: HTML attachment with Javascript location"
description: |
  Recursively scans files and archives to detect HTML smuggling techniques.
type: "rule"
severity: "high"
authors:
  - twitter: "vector_sec"
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 .size <= 5000
          and any(file.explode(.),
                  any(.scan.javascript.identifiers, . == "location")
                  and length(.scan.javascript.identifiers) < 100
          )
  )
attack_types:
  - "Credential Phishing"
  - "Malware/Ransomware"
tactics_and_techniques:
  - "Evasion"
  - "HTML smuggling"
  - "Scripting"
detection_methods:
  - "Archive analysis"
  - "Content analysis"
  - "File analysis"
  - "Javascript analysis"
  - "HTML analysis"
id: "e0611295-afb2-5766-ac37-00fe81253487"