-
Notifications
You must be signed in to change notification settings - Fork 86
Create attachment_pdf_file_banking_payment_from_freemail.yml #3661
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
Closed
MSAdministrator
wants to merge
12
commits into
main
from
msadministrator.new.esc-4583.pdf_banking_freemail
+68
−0
Closed
Changes from 6 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
3851d4b
Create attachment_pdf_file_banking_payment_from_freemail.yml
MSAdministrator e657dc8
Auto add rule ID
27b2dc5
Update attachment_pdf_file_banking_payment_from_freemail.yml
MSAdministrator 97cd149
Update attachment_pdf_file_banking_payment_from_freemail.yml
MSAdministrator 87a7a5d
Merge branch 'main' into msadministrator.new.esc-4583.pdf_banking_fre…
MSAdministrator d0c27a5
Update attachment_pdf_file_banking_payment_from_freemail.yml
MSAdministrator d2fd2c1
Update attachment_pdf_file_banking_payment_from_freemail.yml
MSAdministrator be43060
Merge branch 'main' into msadministrator.new.esc-4583.pdf_banking_fre…
MSAdministrator 7f005a9
Auto-format MQL and add rule IDs
c921c54
Merge branch 'main' into msadministrator.new.esc-4583.pdf_banking_fre…
aidenmitchell d24bed0
Update attachment_pdf_file_banking_payment_from_freemail.yml
MSAdministrator f29d75a
Update attachment_pdf_file_banking_payment_from_freemail.yml
MSAdministrator File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
75 changes: 75 additions & 0 deletions
75
detection-rules/attachment_pdf_file_banking_payment_from_freemail.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| name: "Attachment: PDF with banking and payment references from freemail sender" | ||
| description: "Detects PDF attachments containing banking terminology such as SWIFT codes, account numbers, and payment references from free email providers. These attachments often contain fraudulent payment instructions or fake banking documents used in business email compromise attacks." | ||
| type: "rule" | ||
| severity: "medium" | ||
| source: | | ||
| type.inbound | ||
| // Has attachment | ||
| and 0 < length(attachments) < 3 | ||
| // Short message (BEC pattern) | ||
| and length(body.current_thread.text) < 200 | ||
| // pdf with these keywords | ||
| and any(filter(attachments, .file_extension == "pdf"), | ||
| any(file.explode(.), | ||
| .depth == 1 | ||
| and ( | ||
| regex.icontains(.scan.ocr.raw, | ||
| 'swift(?: copy)?', | ||
| "bank code:", | ||
| "account number:", | ||
| "payment" | ||
| ) | ||
| ) | ||
| ) | ||
| ) | ||
| // Display name or local_part suggests executive/authority | ||
| and ( | ||
| // Common executive titles | ||
| regex.icontains(sender.display_name, | ||
| // CEO, CFO, COO, President, Chairman, Director, VP, EVP, SVP | ||
| '\b((?:C(?:hairman|[EFO]O)|President|Director|[ES]?VP))\b' | ||
| ) | ||
| // Or looks like: firstname.lastname.company@freemail | ||
| or regex.count(sender.email.local_part, '\.') == 2 | ||
| // or any defined org brands like: first.last.sublime@freemail | ||
MSAdministrator marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| or any($org_slds, strings.icontains(sender.email.local_part, .)) | ||
| or any($org_brand_names, strings.icontains(sender.email.local_part, .)) | ||
MSAdministrator marked this conversation as resolved.
Show resolved
Hide resolved
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. idk the intention of org_brand_names would be common here. I"m thinking of things like my company org_sld is |
||
| // Or contains common company abbreviations | ||
| or regex.icontains(sender.email.local_part, '\.(?:inc|corp|ltd|llc|co)$') | ||
| ) | ||
|
|
||
| // Financial/transaction language | ||
| and ( | ||
| regex.icontains(body.current_thread.text, | ||
| '(?:transaction|lawyer|wire|transfer|bank.{0.20}account)' | ||
MSAdministrator marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ) | ||
| or any(ml.nlu_classifier(body.current_thread.text).topics, | ||
| .name == "Legal and Compliance" and .confidence == "high" | ||
| ) | ||
| ) | ||
|
|
||
| // Urgency indicators | ||
| and ( | ||
| any(ml.nlu_classifier(body.current_thread.text).entities, .name == "urgency") | ||
| or regex.icontains(body.current_thread.text, | ||
| '(?:urgent|asap|immediately|today|by.*(?:friday|weekend|eod|end of day))' | ||
| ) | ||
| ) | ||
|
|
||
| // Free email provider (including Proton) | ||
MSAdministrator marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| and sender.email.domain.root_domain in $free_email_providers | ||
|
|
||
| // Unsolicited | ||
| and not profile.by_sender().solicited | ||
|
|
||
| attack_types: | ||
| - "BEC/Fraud" | ||
| tactics_and_techniques: | ||
| - "Free email provider" | ||
| - "PDF" | ||
| - "Social engineering" | ||
| detection_methods: | ||
| - "File analysis" | ||
| - "Optical Character Recognition" | ||
| - "Sender analysis" | ||
| id: "3d46be24-a640-515d-bae9-480effa2b5c8" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.