Sublime Security high experimental mql
Link: Suspicious Office 365 app authorization (OAuth) link
Detects inbound messages with body links to a suspicious Office 365 app authorization (OAuth) request. The app may be compromised or was stood up for malicious purposes. Once the app has been authorized, the attacker will have read or write permissions to the user's Office 365 account.
Detection Logic
type.inbound
and any([body.links, body.current_thread.links],
any(.,
(
(
.href_url.domain.domain in (
'login.microsoftonline.com',
'login.microsoft.com'
)
or strings.icontains(.href_url.query_params,
"login.microsoftonline.com",
'login.microsoft.com'
)
)
and (
strings.ilike(.href_url.query_params,
'*offline_access*',
'*.readwrite*',
'*.read*',
'*ctx=*',
'*prompt=none*'
)
or (
(
strings.icontains(.href_url.path, '/common/reprocess')
or strings.icontains(.href_url.query_params,
"/common/reprocess"
)
)
and strings.icontains(.href_url.query_params, 'ctx=')
and strings.icontains(.href_url.query_params, 'sessionId=')
)
)
)
or any(flatten(values(.href_url.query_params_decoded)),
any(strings.scan_base64(., ignore_padding=true),
strings.icontains(., "login.microsoftonline.com")
and strings.ilike(.,
'*offline_access*',
'*.readwrite*',
'*.read*',
'*prompt=none*'
)
)
)
)
) Field Validations
Loading…
Comments (0)
Loading comments...