1+ [metadata ]
2+ creation_date = " 2025/12/01"
3+ integration = [" aws" , " gcp" , " azure" ]
4+ maturity = " production"
5+ updated_date = " 2025/12/01"
6+
7+ [rule ]
8+ author = [" Elastic" ]
9+ description = """
10+ This rule detects authenticated sessions accessing secret stores across multiple cloud providers from the same source
11+ address within a short period of time. Adversaries with access to compromised credentials or session tokens may attempt
12+ to retrieve secrets from services such as AWS Secrets Manager, Google Secret Manager, or Azure Key Vault in rapid
13+ succession to expand their access or exfiltrate sensitive information.
14+ """
15+ from = " now-9m"
16+ interval = " 1m"
17+ language = " esql"
18+ license = " Elastic License v2"
19+ name = " Multiple Cloud Secrets Accessed by Source Address"
20+ note = """ ## Triage and analysis
21+
22+ ### Multiple Cloud Secrets Accessed by Source Address
23+
24+ This alert identifies a single source IP address accessing secret-management APIs across **multiple cloud providers**
25+ (e.g., AWS Secrets Manager, Google Secret Manager, Azure Key Vault) within a short timeframe.
26+ This behavior is strongly associated with **credential theft, session hijacking, or token replay**, where an adversary
27+ uses stolen authenticated sessions to harvest secrets across cloud environments.
28+
29+ Unexpected cross-cloud secret retrieval is uncommon and typically indicates automation misuse or malicious activity.
30+
31+ ### Possible investigation steps
32+
33+ - Validate the principal
34+ - Identify the user, service account, workload identity, or application making the requests.
35+ - Confirm whether this identity is expected to operate across more than one cloud provider.
36+ - Review related activity
37+ - Look for additional alerts involving the same identity, source IP, or token over the last 24–48 hours.
38+ - Identify whether the source IP has been observed performing unusual authentication, privilege escalation,
39+ or reconnaissance.
40+ - Check application or service context
41+ - Determine whether any workload legitimately pulls secrets from multiple cloud providers.
42+ - Review deployment pipelines or integration layers that might legitimately bridge AWS, Azure, and GCP.
43+ - Analyze user agent and invocation patterns
44+ - Compare `user_agent.original` or equivalent fields against expected SDKs or automation tools.
45+ - Suspicious indicators include CLI tools, unknown libraries, browser user agents, or custom scripts.
46+ - Inspect IP reputation and origin
47+ - Determine whether the source IP corresponds to a managed workload (EC2, GCE, Azure VM) or an unexpected host.
48+ - Validate that the associated instance or host is under your control and behaving normally.
49+ - Review IAM permissions and accessed secrets
50+ - Check the policies attached to the identity.
51+ - Verify whether the accessed secrets are sensitive, unused, or unrelated to the identity’s purpose.
52+ - Assess potential compromise scope
53+ - If compromise is suspected, enumerate other assets accessed by the same identity in the last 24 hours.
54+ - Look for lateral movement, privilege escalation, or abnormal API usage.
55+
56+ ### False positive analysis
57+
58+ - Validate whether the source IP is associated with a legitimate multi-cloud orchestration tool, automation pipeline,
59+ or shared CI/CD system.
60+ - Confirm that the identity is authorized to access secrets across multiple cloud services.
61+ - If activity is expected, consider adding exceptions that pair account identity, source IP, and expected user agent
62+ to reduce noise.
63+
64+ ### Response and remediation
65+
66+ - Initiate incident response** if the activity is unauthorized or suspicious.
67+ - Restrict or disable** the affected credentials or service accounts.
68+ - Rotate all accessed secrets** and review other secrets the identity can access.
69+ - Analyze systems** that may have leaked credentials, such as compromised hosts or exposed tokens.
70+ - Harden identity security:
71+ - Enforce MFA for users where applicable.
72+ - Reduce permissions to least privilege.
73+ - Review trust relationships, workload identities, and cross-cloud integrations.
74+ - Search for persistence mechanisms** such as newly created keys, roles, or service accounts.
75+ - Improve monitoring and audit visibility** by ensuring logging is enabled across all cloud environments.
76+ - Determine root cause** (phishing, malware, token replay, exposed credential, etc.) and close the vector to prevent recurrence.
77+ """
78+ references = [
79+ " https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_GetSecretValue.html" ,
80+ " https://docs.cloud.google.com/secret-manager/docs/samples/secretmanager-access-secret-version" ,
81+ " https://learn.microsoft.com/en-us/azure/key-vault/secrets/about-secrets" ,
82+ " https://www.wiz.io/blog/shai-hulud-2-0-ongoing-supply-chain-attack" ,
83+ ]
84+ risk_score = 73
85+ rule_id = " 472b4944-d810-43cf-83dc-7d080ae1b8dd"
86+ severity = " high"
87+ tags = [
88+ " Domain: Cloud" ,
89+ " Data Source: AWS" ,
90+ " Data Source: Amazon Web Services" ,
91+ " Data Source: AWS Secrets Manager" ,
92+ " Data Source: Azure" ,
93+ " Data Source: Azure Activity Logs" ,
94+ " Data Source: GCP" ,
95+ " Data Source: Google Cloud Platform" ,
96+ " Tactic: Credential Access" ,
97+ " Resources: Investigation Guide" ,
98+ ]
99+ timestamp_override = " event.ingested"
100+ type = " esql"
101+
102+ query = '''
103+ FROM logs-* metadata _id, _version, _index
104+ | WHERE
105+ (
106+ /* AWS Secrets Manager */
107+ (event.dataset == "aws.cloudtrail"
108+ AND event.provider == "secretsmanager.amazonaws.com"
109+ AND event.action IN ("GetSecretValue", "BatchGetSecretValue"))
110+
111+ OR
112+
113+ /* Azure Key Vault (activity logs) */
114+ (
115+ event.dataset == "azure.activitylogs"
116+ AND azure.activitylogs.operation_name LIKE "MICROSOFT.KEYVAULT/VAULTS/SECRETS*"
117+ ) or
118+
119+ /* Azure Managed HSM secret */
120+ (
121+ event.dataset == "azure.activitylogs" AND
122+ azure.activitylogs.operation_name LIKE "MICROSOFT.KEYVAULT/managedHSM/keys/*")
123+ )
124+
125+ OR
126+
127+ /* Google Secret Manager */
128+ (
129+ event.dataset IN ("googlecloud.audit", "gcp.audit")
130+ AND event.action == "google.cloud.secretmanager.v1.SecretManagerService.AccessSecretVersion"
131+ )
132+ )
133+ AND source.ip IS NOT NULL
134+ | STATS
135+ Esql.dc_dataset = COUNT_DISTINCT(event.dataset),
136+ Esql.event_action_values = VALUES(event.action),
137+ Esql.users = VALUES(user.name)
138+ BY source.ip
139+ | WHERE Esql.dc_dataset >= 2
140+ '''
141+
142+
143+
144+ [[rule .threat ]]
145+ framework = " MITRE ATT&CK"
146+ [[rule .threat .technique ]]
147+ id = " T1555"
148+ name = " Credentials from Password Stores"
149+ reference = " https://attack.mitre.org/techniques/T1555/"
150+ [[rule .threat .technique .subtechnique ]]
151+ id = " T1555.006"
152+ name = " Cloud Secrets Management Stores"
153+ reference = " https://attack.mitre.org/techniques/T1555/006/"
154+
155+
156+
157+ [rule .threat .tactic ]
158+ id = " TA0006"
159+ name = " Credential Access"
160+ reference = " https://attack.mitre.org/tactics/TA0006/"
0 commit comments