Link: Self-service platform link to Microsoft login redirect

Detects inbound emails containing links to self-service creation platforms that lead to a final destination page embedding links to Microsoft login domains with OAuth or session parameters such as offline_access, read/write scopes, ctx, or sessionId. This pattern is indicative of abuse of legitimate hosting services to stage credential or consent phishing pages that redirect victims to Microsoft authentication flows.

Sublime rule (View on GitHub)

 1name: "Link: Self-service platform link to Microsoft login redirect"
 2description: "Detects inbound emails containing links to self-service creation platforms that lead to a final destination page embedding links to Microsoft login domains with OAuth or session parameters such as offline_access, read/write scopes, ctx, or sessionId. This pattern is indicative of abuse of legitimate hosting services to stage credential or consent phishing pages that redirect victims to Microsoft authentication flows."
 3type: "rule"
 4severity: "medium"
 5source: |
 6  type.inbound
 7  and (
 8    any(body.current_thread.links,
 9        (
10          .href_url.domain.root_domain in $self_service_creation_platform_domains
11          or .href_url.domain.domain in $self_service_creation_platform_domains
12        )
13        and any(ml.link_analysis(.).final_dom.links,
14                (
15                  .href_url.domain.domain in (
16                    'login.microsoftonline.com',
17                    'login.microsoft.com'
18                  )
19                  or strings.icontains(.href_url.query_params,
20                                       "login.microsoftonline.com",
21                                       'login.microsoft.com'
22                  )
23                )
24                and (
25                  strings.ilike(.href_url.query_params,
26                                '*offline_access*',
27                                '*.readwrite*',
28                                '*.read*',
29                                '*ctx=*',
30                                '*prompt=none*'
31                  )
32                  or (
33                    (
34                      strings.icontains(.href_url.path, '/common/reprocess')
35                      or strings.icontains(.href_url.query_params,
36                                           "/common/reprocess"
37                      )
38                    )
39                    and strings.icontains(.href_url.query_params, 'ctx=')
40                    and strings.icontains(.href_url.query_params, 'sessionId=')
41                  )
42                )
43        )
44    )
45  )  
46attack_types:
47  - "Credential Phishing"
48tactics_and_techniques:
49  - "Open redirect"
50  - "Social engineering"
51detection_methods:
52  - "URL analysis"
53  - "HTML analysis"
54  - "Content analysis"
55related_detections:
56  - "link_office365_suspicious_app_authorization.yml"
57  - "attachment_link_office365_suspicious_app_authorization.yml"
58  - "attachment_eml_link_office365_suspicious_app_authorization.yml"
59  - "attachment_ics_link_office365_suspicious_app_authorization.yml"
60id: "848a0abf-8b53-5c03-bad7-a8b9c1e9acc2"
to-top