Detection rules › Sublime MQL

Attachment: File execution via Javascript

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

Javascript contains identifiers or strings that may attempt to execute files.

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_type in $file_extensions_common_archives
        and any(file.explode(.),
                any(.scan.javascript.identifiers,
                    strings.ilike(., 'ActiveXObject', 'ShellExecute')
                )
                or (
                  length(.scan.javascript.strings) > 0
                  and all(.scan.javascript.strings,
                          strings.ilike(., 'Shell.Application', '*.exe')
                  )
                )
        )
)

Detection logic

Scope: inbound message.

Javascript contains identifiers or strings that may attempt to execute files.

  1. inbound message
  2. any of attachments where all hold:
    • .file_type in $file_extensions_common_archives
    • any of file.explode(.) where any holds:
      • any of .scan.javascript.identifiers where:
        • . matches any of 2 patterns
          • ActiveXObject
          • ShellExecute
      • all of:
        • length(.scan.javascript.strings) > 0
        • all of .scan.javascript.strings where:
          • . matches any of 2 patterns
            • Shell.Application
            • *.exe

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

Indicators matched (4)

FieldMatchValue
strings.ilikesubstringActiveXObject
strings.ilikesubstringShellExecute
strings.ilikesubstringShell.Application
strings.ilikesubstring*.exe