Detection rules › Sublime MQL

Attachment: Embedded VBScript in MHT file

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

MHT files can be used to run VBScript, which can run malicious code.

Threat classification

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

CategoryValues
Attack typesMalware/Ransomware
Tactics and techniquesEvasion, Scripting

Event coverage

Rule body MQL

type.inbound
and any(attachments,
        (
          .file_extension =~ "mht"
          or .file_extension in~ $file_extensions_common_archives
        )

        // ensure there's an mht file (if it's in an archive)
        and any(file.explode(.), .file_extension =~ "mht")
        and any(file.explode(.),
                any(.scan.html.scripts, .language == "VBScript")
        )
)

Detection logic

Scope: inbound message.

MHT files can be used to run VBScript, which can run malicious code.

  1. inbound message
  2. any of attachments where all hold:
    • any of:
      • .file_extension is 'mht'
      • .file_extension in $file_extensions_common_archives
    • any of file.explode(.) where:
      • .file_extension is 'mht'
    • any of file.explode(.) where:
      • any of .scan.html.scripts where:
        • .language is 'VBScript'

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

Indicators matched (3)

FieldMatchValue
attachments[].file_extensionequalsmht
file.explode(attachments[])[].file_extensionequalsmht
file.explode(attachments[])[].scan.html.scripts[].languageequalsVBScript