Detection rules › Sublime MQL
Attachment: Fake attachment image lure
Message (or attached message) contains an image impersonating an Outlook attachment button.
Threat classification
Sublime's own taxonomy (not MITRE ATT&CK).
| Category | Values |
|---|---|
| Attack types | Credential Phishing, Malware/Ransomware |
| Tactics and techniques | Evasion, Image as content, Social engineering |
Event coverage
Rule body MQL
type.inbound
and length(attachments) < 15
and (
// fake file attachment preview in original email
any(attachments,
.file_type in $file_types_images
and (
any(ml.logo_detect(.).brands,
.name == "FakeAttachment" and .confidence == "high"
)
or (
.size < 30000
and any(file.explode(.),
strings.icontains(.scan.ocr.raw, 'sent you')
// the attached image includes a filesize string
and regex.icontains(.scan.ocr.raw,
'\b\d+.\d{1,2}\s?(k|m)b(\s|$)'
)
)
)
)
)
// message body/screenhot
or any(ml.logo_detect(file.message_screenshot()).brands,
.name == "FakeAttachment" and .confidence == "high"
)
// Suspicious table with file size indicators
or regex.contains(body.html.raw,
"<table[^>]*>.*?<img[^>]+src=[\"']cid:[^\"']+[\"'][^>]*>.*?\\.(pdf|doc(x)|xls(x)?).*?<font[^>]*>\\s*\\d{1,4}\\.\\d{1,2}\\s*k[bB]"
)
// fake file attachment preview in attached EML
or any(attachments,
(.content_type == "message/rfc822" or .file_extension == "eml")
and any(file.parse_eml(.).attachments,
.file_type in $file_types_images
and (
any(ml.logo_detect(.).brands, .name == "FakeAttachment")
or (
.size < 30000
and any(file.explode(.),
strings.icontains(.scan.ocr.raw, 'sent you')
// the attached image includes a filesize string
and regex.icontains(.scan.ocr.raw,
'\b\d+.\d{1,2}\s?(k|m)b(\s|$)'
)
)
)
)
)
)
)
and not (
(
strings.istarts_with(subject.subject, "RE:")
or strings.istarts_with(subject.subject, "R:")
or strings.istarts_with(subject.subject, "ODG:")
or strings.istarts_with(subject.subject, "答复:")
or strings.istarts_with(subject.subject, "AW:")
or strings.istarts_with(subject.subject, "TR:")
or strings.istarts_with(subject.subject, "FWD:")
or regex.imatch(subject.subject, '(\[[^\]]+\]\s?){0,3}(re|fwd?)\s?:')
or regex.imatch(subject.subject,
'^\[?(EXT|EXTERNAL)\]?[: ]\s*(RE|FWD?|FW|AW|TR|ODG|答复):.*'
)
)
and (length(headers.references) > 0 or headers.in_reply_to is not null)
)
// negate highly trusted sender domains unless they fail DMARC authentication
and (
(
sender.email.domain.root_domain in $high_trust_sender_root_domains
and not headers.auth_summary.dmarc.pass
)
or sender.email.domain.root_domain not in $high_trust_sender_root_domains
)
and (
sender.email.domain.root_domain not in ("sharepointonline.com")
or not headers.auth_summary.dmarc.pass
)
Detection logic
Scope: inbound message.
Message (or attached message) contains an image impersonating an Outlook attachment button.
- inbound message
- length(attachments) < 15
any of:
any of
attachmentswhere all hold:- .file_type in $file_types_images
any of:
any of
ml.logo_detect(.).brandswhere all hold:- .name is 'FakeAttachment'
- .confidence is 'high'
all of:
- .size < 30000
any of
file.explode(.)where all hold:- .scan.ocr.raw contains 'sent you'
- .scan.ocr.raw matches '\\b\\d+.\\d{1,2}\\s?(k|m)b(\\s|$)'
any of
ml.logo_detect(file.message_screenshot()).brandswhere all hold:- .name is 'FakeAttachment'
- .confidence is 'high'
- body.html.raw matches '<table[^>]*>.*?<img[^>]+src=[\\"\']cid:[^\\"\']+[\\"\'][^>]*>.*?\\\\.(pdf|doc(x)|xls(x)?).*?<font[^>]*>\\\\s*\\\\d{1,4}\\\\.\\\\d{1,2}\\\\s*k[bB]'
any of
attachmentswhere all hold:any of:
- .content_type is 'message/rfc822'
- .file_extension is 'eml'
any of
file.parse_eml(.).attachmentswhere all hold:- .file_type in $file_types_images
any of:
any of
ml.logo_detect(.).brandswhere:- .name is 'FakeAttachment'
all of:
- .size < 30000
any of
file.explode(.)where all hold:- .scan.ocr.raw contains 'sent you'
- .scan.ocr.raw matches '\\b\\d+.\\d{1,2}\\s?(k|m)b(\\s|$)'
not:
all of:
any of:
- subject.subject starts with 'RE:'
- subject.subject starts with 'R:'
- subject.subject starts with 'ODG:'
- subject.subject starts with '答复:'
- subject.subject starts with 'AW:'
- subject.subject starts with 'TR:'
- subject.subject starts with 'FWD:'
- subject.subject matches '(\\[[^\\]]+\\]\\s?){0,3}(re|fwd?)\\s?:'
- subject.subject matches '^\\[?(EXT|EXTERNAL)\\]?[: ]\\s*(RE|FWD?|FW|AW|TR|ODG|答复):.*'
any of:
- length(headers.references) > 0
- headers.in_reply_to is set
any of:
all of:
- sender.email.domain.root_domain in $high_trust_sender_root_domains
not:
- headers.auth_summary.dmarc.pass
- sender.email.domain.root_domain not in $high_trust_sender_root_domains
any of:
- sender.email.domain.root_domain not in ('sharepointonline.com')
not:
- headers.auth_summary.dmarc.pass
Inspects: attachments[].content_type, attachments[].file_extension, attachments[].file_type, attachments[].size, body.html.raw, headers.auth_summary.dmarc.pass, headers.in_reply_to, headers.references, sender.email.domain.root_domain, subject.subject, type.inbound. Sensors: file.explode, file.message_screenshot, file.parse_eml, ml.logo_detect, regex.contains, regex.icontains, regex.imatch, strings.icontains, strings.istarts_with. Reference lists: $file_types_images, $high_trust_sender_root_domains.
Indicators matched (20)
| Field | Match | Value |
|---|---|---|
ml.logo_detect(attachments[]).brands[].name | equals | FakeAttachment |
ml.logo_detect(attachments[]).brands[].confidence | equals | high |
strings.icontains | substring | sent you |
regex.icontains | regex | \b\d+.\d{1,2}\s?(k|m)b(\s|$) |
ml.logo_detect(file.message_screenshot()).brands[].name | equals | FakeAttachment |
ml.logo_detect(file.message_screenshot()).brands[].confidence | equals | high |
regex.contains | regex | <table[^>]*>.*?<img[^>]+src=[\"']cid:[^\"']+[\"'][^>]*>.*?\\.(pdf|doc(x)|xls(x)?).*?<font[^>]*>\\s*\\d{1,4}\\.\\d{1,2}\\s*k[bB] |
attachments[].content_type | equals | message/rfc822 |
attachments[].file_extension | equals | eml |
ml.logo_detect(file.parse_eml(attachments[]).attachments[]).brands[].name | equals | FakeAttachment |
strings.istarts_with | prefix | RE: |
strings.istarts_with | prefix | R: |
8 more
strings.istarts_with | prefix | ODG: |
strings.istarts_with | prefix | 答复: |
strings.istarts_with | prefix | AW: |
strings.istarts_with | prefix | TR: |
strings.istarts_with | prefix | FWD: |
regex.imatch | regex | (\[[^\]]+\]\s?){0,3}(re|fwd?)\s?: |
regex.imatch | regex | ^\[?(EXT|EXTERNAL)\]?[: ]\s*(RE|FWD?|FW|AW|TR|ODG|答复):.* |
sender.email.domain.root_domain | member | sharepointonline.com |