Credential phishing: Hyper-linked image leading to free file host

This rule detects messages with short or null bodies, where all attachments are images, and the image is hyperlinking to a free_file_host from an unsolicited and untrusted sender.

Sublime rule (View on GitHub)

 1name: "Credential phishing: Hyper-linked image leading to free file host"
 2description: "This rule detects messages with short or null bodies, where all attachments are images, and the image is hyperlinking to a free_file_host from an unsolicited and untrusted sender."
 3type: "rule"
 4severity: "medium"
 5source: |
 6  type.inbound
 7  and length(body.links) > 0
 8  and 0 < length(attachments) < 8
 9  and all(attachments, .file_type in $file_types_images and .size > 2000)
10  and any(body.links,
11          // fingerprints of a hyperlinked image
12          .display_text is null
13          and .display_url.url is null
14          and .href_url.domain.root_domain in $free_file_hosts
15  )
16  and (
17    // body text is very short
18    (
19      0 <= (length(body.current_thread.text)) < 10
20      or body.current_thread.text is null
21    )
22    or (
23      length(body.current_thread.text) < 900
24      // or body is most likely all warning banner (text contains the sender and common warning banner language)
25      and (
26        (
27          strings.contains(body.current_thread.text, sender.email.email)
28          and strings.contains(body.current_thread.text, 'caution')
29        )
30        or regex.icontains(body.current_thread.text,
31                           "intended recipient's use only|external email|sent from outside|you don't often|confidential"
32        )
33      )
34    )
35  )
36  
37  // negate highly trusted sender domains unless they fail DMARC authentication
38  and not (
39    (
40      sender.email.domain.root_domain in $high_trust_sender_root_domains
41      or (
42        strings.contains(sender.display_name, "via Canva")
43        and sender.email.domain.domain == "canva.com"
44      )
45    )
46    and coalesce(headers.auth_summary.dmarc.pass, false)
47  )
48  
49  // not solicited or previously flagged malicious/spam
50  and (
51    not profile.by_sender().solicited
52    or profile.by_sender().any_messages_malicious_or_spam
53  )  
54attack_types:
55  - "Credential Phishing"
56tactics_and_techniques:
57  - "Evasion"
58  - "Free file host"
59  - "Image as content"
60  - "Social engineering"
61detection_methods:
62  - "Content analysis"
63  - "Header analysis"
64  - "Sender analysis"
65  - "URL analysis"
66
67id: "f5cb1eca-667c-5750-9f00-b2b79c684ab1"
to-top