Detection rules › Sublime MQL
Attachment: Invoice and W-9 PDFs with suspicious creators
Detects messages containing two PDF attachments where one has invoice-related naming patterns and another contains W-9 tax form indicators, with at least one PDF generated by Chrome or wkhtmltopdf tools, commonly used in business email compromise attacks targeting financial processes.
Threat classification
Sublime's own taxonomy (not MITRE ATT&CK).
| Category | Values |
|---|---|
| Attack types | BEC/Fraud |
| Tactics and techniques | PDF, Social engineering, Impersonation: Brand |
Event coverage
| Message attribute |
|---|
| attachments (collection) |
| headers.auth_summary |
| sender.email |
| type |
Rule body MQL
type.inbound
and length(distinct(attachments, .sha1)) == 2
and length(filter(attachments, .file_type == "pdf")) == 2
// either of them are chrome/wkhtmltopdf
and any(filter(attachments, .file_type == "pdf"),
beta.parse_exif(.).creator == "Chromium"
or strings.icontains(beta.parse_exif(.).creator, "wkhtmltopdf")
or strings.icontains(beta.parse_exif(.).creator, "HeadlessChrome")
)
and any(attachments,
strings.istarts_with(.file_name, 'lnv')
or strings.istarts_with(.file_name, 'inv-')
or strings.istarts_with(.file_name, "invoice_")
or regex.contains(.file_name, '^Invoice\s\d{8,9}')
or regex.contains(.file_name, '^INV[0-9]{7}')
or regex.contains(.file_name, '^INV#[0-9]{12}')
or strings.icontains(beta.ocr(.).text, "Executive Business Coaching")
or strings.icontains(beta.ocr(.).text, "Executive Coaching")
or strings.icontains(beta.ocr(.).text, "Professional Services")
or strings.icontains(beta.ocr(.).text, "Business Systems Integration")
or strings.icontains(beta.ocr(.).text, "Consulting & Advisory")
or strings.icontains(beta.ocr(.).text, "Zoomlnfo")
)
and any(attachments,
.file_name == ".pdf"
or regex.contains(beta.ocr(.).text, 'W[=-]9')
or regex.icontains(.file_name, 'w-?9')
)
and not (
sender.email.domain.root_domain in ('intuit.com')
and coalesce(headers.auth_summary.dmarc.pass, false)
)
Detection logic
Scope: inbound message.
Detects messages containing two PDF attachments where one has invoice-related naming patterns and another contains W-9 tax form indicators, with at least one PDF generated by Chrome or wkhtmltopdf tools, commonly used in business email compromise attacks targeting financial processes.
- inbound message
- length(distinct(attachments, .sha1)) is 2
- length(filter(attachments, .file_type == 'pdf')) is 2
any of
filter(attachments)where any holds:- beta.parse_exif(.).creator is 'Chromium'
- beta.parse_exif(.).creator contains 'wkhtmltopdf'
- beta.parse_exif(.).creator contains 'HeadlessChrome'
any of
attachmentswhere any holds:- .file_name starts with 'lnv'
- .file_name starts with 'inv-'
- .file_name starts with 'invoice_'
- .file_name matches '^Invoice\\s\\d{8,9}'
- .file_name matches '^INV[0-9]{7}'
- .file_name matches '^INV#[0-9]{12}'
- beta.ocr(.).text contains 'Executive Business Coaching'
- beta.ocr(.).text contains 'Executive Coaching'
- beta.ocr(.).text contains 'Professional Services'
- beta.ocr(.).text contains 'Business Systems Integration'
- beta.ocr(.).text contains 'Consulting & Advisory'
- beta.ocr(.).text contains 'Zoomlnfo'
any of
attachmentswhere any holds:- .file_name is '.pdf'
- beta.ocr(.).text matches 'W[=-]9'
- .file_name matches 'w-?9'
not:
all of:
- sender.email.domain.root_domain in ('intuit.com')
- coalesce(headers.auth_summary.dmarc.pass)
Inspects: attachments[].file_name, attachments[].file_type, attachments[].sha1, headers.auth_summary.dmarc.pass, sender.email.domain.root_domain, type.inbound. Sensors: beta.ocr, beta.parse_exif, regex.contains, regex.icontains, strings.icontains, strings.istarts_with.
Indicators matched (19)
| Field | Match | Value |
|---|---|---|
attachments[].file_type | equals | pdf |
strings.icontains | substring | wkhtmltopdf |
strings.icontains | substring | HeadlessChrome |
strings.istarts_with | prefix | lnv |
strings.istarts_with | prefix | inv- |
strings.istarts_with | prefix | invoice_ |
regex.contains | regex | ^Invoice\s\d{8,9} |
regex.contains | regex | ^INV[0-9]{7} |
regex.contains | regex | ^INV#[0-9]{12} |
strings.icontains | substring | Executive Business Coaching |
strings.icontains | substring | Executive Coaching |
strings.icontains | substring | Professional Services |
7 more
strings.icontains | substring | Business Systems Integration |
strings.icontains | substring | Consulting & Advisory |
strings.icontains | substring | Zoomlnfo |
attachments[].file_name | equals | .pdf |
regex.contains | regex | W[=-]9 |
regex.icontains | regex | w-?9 |
sender.email.domain.root_domain | member | intuit.com |