Attachment: RFC822 containing suspicious file sharing language with links from untrusted sender
This rule identifies messages with an RFC822 attachment contains language indicative of suspicious file-sharing activity. It checks both the original sender and the nested sender against highly trusted domains. The original message is unsolicited, and has not been previously flagged as a false positive.
Sublime rule (View on GitHub)
1name: "Attachment: RFC822 containing suspicious file sharing language with links from untrusted sender"
2description: "This rule identifies messages with an RFC822 attachment contains language indicative of suspicious file-sharing activity. It checks both the original sender and the nested sender against highly trusted domains. The original message is unsolicited, and has not been previously flagged as a false positive."
3type: "rule"
4severity: "medium"
5source: |
6 type.inbound
7 and any(attachments,
8 .file_type == "unknown"
9 and (.content_type == "message/rfc822" or .file_extension in ('eml'))
10 and regex.contains(file.parse_eml(.).subject.subject,
11 '(shared.{0,30}with you|View Document)'
12 )
13 and 0 < length(file.parse_eml(.).body.links) < 10
14 and file.parse_eml(.).sender.email.email not in $recipient_emails
15
16 // exclude bounce backs & read receipts
17 and not strings.like(file.parse_eml(.).sender.email.local_part,
18 "*postmaster*",
19 "*mailer-daemon*",
20 "*administrator*"
21 )
22 and not regex.imatch(file.parse_eml(.).subject.subject,
23 "(undeliverable|read:).*"
24 )
25 and not any(file.parse_eml(.).attachments,
26 .content_type == "message/delivery-status"
27 )
28
29 // negate highly trusted sender domains in the nested eml unless they fail DMARC
30 and not (
31 file.parse_eml(.).sender.email.domain.root_domain in $high_trust_sender_root_domains
32 and coalesce(file.parse_eml(.).headers.auth_summary.dmarc.pass, false)
33 )
34 // negate org domains that passed dmarc
35 and not file.parse_eml(.).sender.email.domain.root_domain in $org_domains
36 )
37
38 // negate highly trusted sender domains unless they fail DMARC authentication
39 and not (
40 sender.email.domain.root_domain in $high_trust_sender_root_domains
41 and coalesce(headers.auth_summary.dmarc.pass, false)
42 )
43 and (
44 not profile.by_sender().solicited
45 or (
46 profile.by_sender().any_messages_malicious_or_spam
47 and not profile.by_sender().any_messages_benign
48 )
49 )
50 and not profile.by_sender().any_messages_benign
51
52attack_types:
53 - "Credential Phishing"
54tactics_and_techniques:
55 - "Evasion"
56 - "Social engineering"
57detection_methods:
58 - "File analysis"
59 - "Header analysis"
60 - "Natural Language Understanding"
61 - "Sender analysis"
62id: "d96854d7-d0a2-5342-a363-cee1ad51e7c9"