Detection rules › Sublime MQL

PDF attachment with Google (AE) redirecting to a php or zip file

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

Detects a PDF attachment with a link that contains a Google.ae redirect URL.

Threat classification

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

CategoryValues
Attack typesMalware/Ransomware
Tactics and techniquesOpen redirect, PDF

Event coverage

Rule body MQL

type.inbound
and any(attachments,
        .file_type == "pdf"
        and any(file.explode(.),
                any(.scan.pdf.urls,
                    // url encoded q=http
                    strings.starts_with(.query_params, "q=%68%74%74%70")
                    // url encoded .php or .zip
                    and (
                      strings.contains(.query_params, ".%70%68%70")
                      or strings.contains(.query_params, "%2e%7a%69%70")
                    )
                    and .domain.root_domain == "google.ae"
                )
        )
)

Detection logic

Scope: inbound message.

Detects a PDF attachment with a link that contains a Google.ae redirect URL.

  1. inbound message
  2. any of attachments where all hold:
    • .file_type is 'pdf'
    • any of file.explode(.) where:
      • any of .scan.pdf.urls where all hold:
        • .query_params starts with 'q=%68%74%74%70'
        • any of:
          • .query_params contains '.%70%68%70'
          • .query_params contains '%2e%7a%69%70'
        • .domain.root_domain is 'google.ae'

Inspects: attachments[].file_type, type.inbound. Sensors: file.explode, strings.contains, strings.starts_with.

Indicators matched (5)

FieldMatchValue
attachments[].file_typeequalspdf
strings.starts_withprefixq=%68%74%74%70
strings.containssubstring.%70%68%70
strings.containssubstring%2e%7a%69%70
file.explode(attachments[])[].scan.pdf.urls[].domain.root_domainequalsgoogle.ae