Detection rules › Sublime MQL

Attachment: JavaScript file with suspicious base64-encoded executable

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

JavaScript attachment or compressed JavaScript file containing a base64 encoded executable.

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 in~ $file_extensions_common_archives
          or .file_extension in ("js", "jar")
        )
        and any(file.explode(.),
                (
                  (
                    .file_extension in ("js", "jar")
                    or any(.flavors.yara, . == "javascript_file")
                  )
                  and any(.flavors.yara, . == 'base64_pe')
                )
        )
)

Detection logic

Scope: inbound message.

JavaScript attachment or compressed JavaScript file containing a base64 encoded executable.

  1. inbound message
  2. any of attachments where all hold:
    • any of:
      • .file_extension in $file_extensions_common_archives
      • .file_extension in ('js', 'jar')
    • any of file.explode(.) where all hold:
      • any of:
        • .file_extension in ('js', 'jar')
        • any of .flavors.yara where:
          • . is 'javascript_file'
      • any of .flavors.yara where:
        • . is 'base64_pe'

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

Indicators matched (6)

FieldMatchValue
attachments[].file_extensionmemberjs
attachments[].file_extensionmemberjar
file.explode(attachments[])[].file_extensionmemberjs
file.explode(attachments[])[].file_extensionmemberjar
file.explode(attachments[])[].flavors.yara[]equalsjavascript_file
file.explode(attachments[])[].flavors.yara[]equalsbase64_pe