Skip to content

Update attachment_fake_attachment_image.yml #2692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions detection-rules/attachment_fake_attachment_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,25 @@ source: |
)
)
)
// message body/screenhot
or (
any(ml.logo_detect(beta.message_screenshot()).brands,
.name == "FakeAttachment"
)
or (
length(body.current_thread.text) < 2000
and strings.icontains(body.current_thread.text, 'sent you')
// the attached image includes a filesize string
and regex.icontains(body.current_thread.text,
'\b\d+.\d{1,2}\s?(k|m)b(\s|$)'
)
)
)
// 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")
Expand Down Expand Up @@ -55,6 +74,9 @@ source: |
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
Expand Down
Loading