You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rules/integrations/azure/initial_access_entra_id_oauth_user_impersonation_scope.toml
+36-3Lines changed: 36 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
creation_date = "2025/07/03"
3
3
integration = ["azure"]
4
4
maturity = "production"
5
-
updated_date = "2025/09/26"
5
+
updated_date = "2025/10/06"
6
6
7
7
[rule]
8
8
author = ["Elastic"]
@@ -18,10 +18,10 @@ from = "now-9m"
18
18
index = ["filebeat-*", "logs-azure.signinlogs-*"]
19
19
language = "kuery"
20
20
license = "Elastic License v2"
21
-
name = "Suspicious Entra ID OAuth User Impersonation Scope Detected"
21
+
name = "Entra ID OAuth user_impersonation Scope for Unusual User and Client"
22
22
note = """## Triage and Analysis
23
23
24
-
### Investigating Suspicious Entra ID OAuth User Impersonation Scope Detected
24
+
### Investigating Entra ID OAuth user_impersonation Scope for Unusual User and Client
25
25
26
26
Identifies rare occurrences of OAuth workflow for a user principal that is single factor authenticated, with an OAuth scope containing `user_impersonation`, and a token issuer type of `AzureAD`. This rule is designed to detect suspicious
27
27
OAuth user impersonation attempts in Microsoft Entra ID, particularly those involving the `user_impersonation` scope, which is often used by adversaries to gain unauthorized access to user accounts. The rule focuses on sign-in events where
@@ -82,9 +82,42 @@ event.dataset: azure.signinlogs and
82
82
azure.signinlogs.properties.token_issuer_type: "AzureAD" and
83
83
azure.signinlogs.properties.token_protection_status_details.sign_in_session_status: "unbound" and
84
84
azure.signinlogs.properties.user_type: "Member" and
85
+
azure.signinlogs.properties.conditional_access_status: "notApplied" and
86
+
not user_agent.original: Mozilla*PKeyAuth/1.0 and
87
+
not azure.signinlogs.properties.device_detail.operating_system: (Ios* or Android*) and
@@ -38,7 +38,7 @@ This rule highlights sudo invoked with the chroot (-R/--chroot) option outside n
38
38
- Extract the chroot target path from the event and enumerate its etc and lib directories for attacker-seeded NSS artifacts (nsswitch.conf, libnss_*, ld.so.preload) and fake passwd/group files, noting recent mtime, ownership, and world-writable files.
39
39
- Pivot to file-creation and modification telemetry to identify processes and users that populated that path shortly before execution (e.g., curl, wget, tar, git, gcc), linking them to the invoking user to establish intent.
40
40
- Review session and process details to see if a shell or interpreter was launched inside the chroot and whether an euid transition to 0 occurred, indicating a successful privilege escalation.
41
-
- Confirm sudo’s package version and build options and the user’s sudoers policy (secure_path/env_* settings and any NOPASSWD allowances) to assess exploitability and whether chroot usage was authorized.
41
+
- Confirm sudo's package version and build options and the user’s sudoers policy (secure_path/env_* settings and any NOPASSWD allowances) to assess exploitability and whether chroot usage was authorized.
42
42
- Collect and preserve the chroot directory contents and relevant audit/log artifacts, and scope by searching for similar chroot invocations or NSS file seeds across the host and fleet.
43
43
44
44
### False positive analysis
@@ -105,7 +105,7 @@ type = "eql"
105
105
query = '''
106
106
process where host.os.type == "linux" and event.type == "start" and
107
107
event.action in ("exec", "exec_event", "start", "executed", "process_started", "ProcessRollup2") and
108
-
process.name == "sudo" and process.args in ("-R", "--chroot") and
108
+
process.name == "sudo" and process.args like ("-R", "--chroot*") and
109
109
// To enforce the -R and --chroot arguments to be for sudo specifically, while wildcarding potential full sudo paths
110
110
process.command_line like ("*sudo -R*", "*sudo --chroot*")
0 commit comments