Detection rules › Sublime MQL
Attachment: Fake scan-to-email
Message and attachment resemble an email from a scan-to-email service or device with credential theft language.
Threat classification
Sublime's own taxonomy (not MITRE ATT&CK).
| Category | Values |
|---|---|
| Attack types | Credential Phishing |
| Tactics and techniques | Free file host, Image as content, PDF, Social engineering |
Event coverage
| Message attribute |
|---|
| attachments (collection) |
| body.current_thread |
| sender.email |
| type |
Rule body MQL
type.inbound
and (
length(body.current_thread.text) < 1500
// body length without disclaimer is shorter than 1500 characters
or (
any(map(filter(ml.nlu_classifier(body.current_thread.text).entities,
.name == "disclaimer"
),
.text
),
(length(body.current_thread.text) - length(.)) < 1500
)
)
)
and (
3 of (
strings.icontains(body.current_thread.text, "Number of Images:"),
strings.icontains(body.current_thread.text, "Attachment File Type:"),
strings.icontains(body.current_thread.text, "Device Model:"),
strings.icontains(body.current_thread.text, "Device Name:"),
strings.icontains(body.current_thread.text, "Resolution:"),
strings.icontains(body.current_thread.text, "File Format:"),
strings.icontains(body.current_thread.text, "Device Location:")
)
or (
3 of (
strings.ilike(body.current_thread.text, "*scan date*"),
strings.ilike(body.current_thread.text, "*was sent from*"),
strings.ilike(body.current_thread.text, "*of pages*"),
strings.ilike(body.current_thread.text, "*scanned file*"),
)
or any(file.explode(file.message_screenshot()),
3 of (
strings.ilike(body.current_thread.text, "*scan date*"),
strings.ilike(body.current_thread.text, "*was sent from*"),
strings.ilike(body.current_thread.text, "*of pages*"),
strings.ilike(body.current_thread.text, "*scanned file*"),
strings.icontains(body.current_thread.text, "Number of Images:"),
strings.icontains(body.current_thread.text,
"Attachment File Type:"
),
strings.icontains(body.current_thread.text, "Device Name:"),
strings.icontains(body.current_thread.text, "Device Location:"),
strings.icontains(body.current_thread.text, "Device Model:")
)
)
)
)
and (
(
length(filter(attachments, .file_type in ("pdf"))) == 1
and any(attachments,
.file_type == "pdf"
and (
any(file.explode(.),
(
strings.ilike(.scan.ocr.raw,
"*scan date*",
"*was sent from*",
"*of pages*",
"*verif*document*",
"*scanned file*"
)
or any(ml.nlu_classifier(.scan.ocr.raw).intents,
.name == "cred_theft"
)
or any(ml.logo_detect(..).brands,
.name in ("DocuSign", "Microsoft")
)
)
and length(.scan.url.urls) == 1
)
// encrypted pdf
or any(file.explode(.),
any(.scan.exiftool.fields, .key == "Encryption")
or (
.scan.entropy.entropy > 7
and any(.scan.strings.strings,
strings.icontains(., "/Encrypt")
)
)
)
)
)
)
or length(filter(attachments, .file_type in ("doc", "docx"))) == 1
)
and sender.email.domain.domain not in~ $org_domains
and (
not profile.by_sender().solicited
or (
profile.by_sender().any_messages_malicious_or_spam
and not profile.by_sender().any_messages_benign
)
)
and not profile.by_sender().any_messages_benign
Detection logic
Scope: inbound message.
Message and attachment resemble an email from a scan-to-email service or device with credential theft language.
- inbound message
any of:
- length(body.current_thread.text) < 1500
any of
map(...)where:- length(body.current_thread.text) - length(.) < 1500
any of:
at least 3 of 7: body.current_thread.text contains any of 7 patterns
Number of Images:Attachment File Type:Device Model:Device Name:Resolution:File Format:Device Location:
any of:
at least 3 of 4: body.current_thread.text matches any of 4 patterns
*scan date**was sent from**of pages**scanned file*
any of
file.explode(...)where:at least 3 of:
- body.current_thread.text matches '*scan date*'
- body.current_thread.text matches '*was sent from*'
- body.current_thread.text matches '*of pages*'
- body.current_thread.text matches '*scanned file*'
- body.current_thread.text contains 'Number of Images:'
- body.current_thread.text contains 'Attachment File Type:'
- body.current_thread.text contains 'Device Name:'
- body.current_thread.text contains 'Device Location:'
- body.current_thread.text contains 'Device Model:'
any of:
all of:
- length(filter(attachments, .file_type in ('pdf'))) is 1
any of
attachmentswhere all hold:- .file_type is 'pdf'
any of:
any of
file.explode(.)where all hold:any of:
.scan.ocr.raw matches any of 5 patterns
*scan date**was sent from**of pages**verif*document**scanned file*
any of
ml.nlu_classifier(.scan.ocr.raw).intentswhere:- .name is 'cred_theft'
any of
ml.logo_detect(.).brandswhere:- .name in ('DocuSign', 'Microsoft')
- length(.scan.url.urls) is 1
any of
file.explode(.)where any holds:any of
.scan.exiftool.fieldswhere:- .key is 'Encryption'
all of:
- .scan.entropy.entropy > 7
any of
.scan.strings.stringswhere:- . contains '/Encrypt'
- length(filter(attachments, .file_type in ('doc', 'docx'))) is 1
- sender.email.domain.domain not in $org_domains
any of:
not:
- profile.by_sender().solicited
all of:
- profile.by_sender().any_messages_malicious_or_spam
not:
- profile.by_sender().any_messages_benign
not:
- profile.by_sender().any_messages_benign
Inspects: attachments[].file_type, body.current_thread.text, sender.email.domain.domain, type.inbound. Sensors: file.explode, file.message_screenshot, ml.logo_detect, ml.nlu_classifier, profile.by_sender, strings.icontains, strings.ilike. Reference lists: $org_domains.
Indicators matched (22)
| Field | Match | Value |
|---|---|---|
ml.nlu_classifier(body.current_thread.text).entities[].name | equals | disclaimer |
strings.icontains | substring | Number of Images: |
strings.icontains | substring | Attachment File Type: |
strings.icontains | substring | Device Model: |
strings.icontains | substring | Device Name: |
strings.icontains | substring | Resolution: |
strings.icontains | substring | File Format: |
strings.icontains | substring | Device Location: |
strings.ilike | substring | *scan date* |
strings.ilike | substring | *was sent from* |
strings.ilike | substring | *of pages* |
strings.ilike | substring | *scanned file* |
10 more
attachments[].file_type | member | pdf |
attachments[].file_type | equals | pdf |
strings.ilike | substring | *verif*document* |
ml.nlu_classifier(file.explode(attachments[])[].scan.ocr.raw).intents[].name | equals | cred_theft |
ml.logo_detect(attachments[]).brands[].name | member | DocuSign |
ml.logo_detect(attachments[]).brands[].name | member | Microsoft |
file.explode(attachments[])[].scan.exiftool.fields[].key | equals | Encryption |
strings.icontains | substring | /Encrypt |
attachments[].file_type | member | doc |
attachments[].file_type | member | docx |