Link: Large guest list with suspicious link

Detects inbound messages containing a large guest list alongside a suspicious link

Sublime rule (View on GitHub)

 1name: "Link: Large guest list with suspicious link"
 2description: "Detects inbound messages containing a large guest list alongside a suspicious link"
 3type: "rule"
 4severity: "medium"
 5source: |
 6  type.inbound
 7  and strings.contains(body.current_thread.text,
 8                       '(Guest list is too large to display)',
 9                       '(Gästeliste zu groß zum Anzeigen)',
10                       '(La liste des invités est trop longue pour être affichée)',
11                       '(La liste des invités est trop importante pour être affichée)',
12                       '(Список гостей слишком велик, невозможно отобразить его полностью)',
13                       '(Elenco invitati troppo lungo per la visualizzazione)',
14                       '(A lista de convidados é muito grande para ser exibida)',
15                       '(Gæstelisten er for lang til at blive vist)'
16  )
17  and any(body.current_thread.links,
18          (
19            .href_url.path == '/'
20            and regex.imatch(.href_url.query_params, '[A-Za-z0-9+/]{8}')
21            and length(.href_url.query_params_decoded) == 1
22            and all(flatten(values(.href_url.query_params_decoded)), . == '')
23          )
24          // destination TLD is invalid, so the URL never resolves
25          or (
26            .href_url.scheme in ("http", "https")
27            and .href_url.domain.valid == false
28            and .href_url.path is not null
29            and .href_url.path != '/'
30            and (
31              .href_url.domain.sld is not null
32              // a doubled scheme parses the host down to "https", so no sld
33              or regex.imatch(.href_url.url, 'https?:\/\/https?:\/\/.*')
34            )
35          )
36          or any(ml.link_analysis(.).final_dom.links,
37                 .href_url.path == '/'
38                 and regex.imatch(.href_url.query_params, '[A-Za-z0-9+/]{8}')
39                 and length(.href_url.query_params_decoded) == 1
40                 and all(flatten(values(.href_url.query_params_decoded)), . == '')
41          )
42          or ml.link_analysis(., mode="aggressive").effective_url.domain.root_domain in (
43            'workers.dev'
44          )
45          or length(filter(.href_url.rewrite.encoders,
46                           . != 'google_open_redirect'
47                    )
48          ) > length(distinct(filter(.href_url.rewrite.encoders,
49                                     . != 'google_open_redirect'
50                              )
51                     )
52          )
53          or (
54            strings.contains(.display_url.url, 'drive.google.com')
55            and .mismatched == true
56          )
57          // minimal js landing page
58          or length(filter(ml.link_analysis(., mode="aggressive").unique_urls_accessed,
59                           .url == ..href_url.url
60                           or (
61                             strings.starts_with(.url, ..href_url.url)
62                             and regex.icontains(.url,
63                                                 '[a-z]{3,}\.[0-9a-f]{20}\.js'
64                             )
65                           )
66                           or .url == strings.concat(..href_url.url,
67                                                     'favicon.png'
68                           )
69                           or .url == strings.concat('https://',
70                                                     ..href_url.domain.domain,
71                                                     '/',
72                                                     'favicon.ico'
73                           )
74                    )
75          ) == 3
76          // SVG Shield
77          or strings.contains(ml.link_analysis(.).final_dom.raw,
78                              'M12 2L4 5V11C4 16.19 7.41 21.05 12 22.5C16.59 21.05 20 16.19 20 11V5L12 2Z'
79          )
80          // links directly to a S3 bucket
81          or (
82            .href_url.domain.root_domain == "amazonaws.com"
83            and strings.icontains(.href_url.domain.subdomain, "s3")
84          )
85  )  
86attack_types:
87  - "Credential Phishing"
88tactics_and_techniques:
89  - "Evasion"
90  - "Social engineering"
91detection_methods:
92  - "Content analysis"
93  - "URL analysis"
94id: "f2e73678-90c5-530e-a70c-8e043e18400d"
to-top