T1098.001
Additional Cloud Credentials
Adversaries may add adversary-controlled credentials to a cloud account to maintain persistent access to victim accounts and instances within the environment. This includes adding credentials to Azure/Entra ID Service Principals and Applications (x509 keys and passwords), generating or importing SSH keys in AWS/GCP, creating AWS IAM access keys or login profiles, and adding app passwords to Entra ID user accounts to bypass MFA. These techniques allow persistent access even if the original compromised credentials are rotated.
Microsoft Sentinel / Defender
kusto
// T1098.001 - Additional Cloud Credentials Detection
// Covers Azure/Entra ID service principal credential additions, AWS key creation, and related activity
let LookbackPeriod = 24h;
// --- Entra ID / Azure: Service Principal / App Credential Additions ---
let EntraCredentialAdditions = AuditLogs
| where TimeGenerated > ago(LookbackPeriod)
| where OperationName in (
"Add service principal credentials",
"Update application – Certificates and secrets management",
"Add application",
"Update service principal",
"Add owner to application",
"Add app role assignment to service principal"
)
| extend InitiatingUPN = tostring(InitiatedBy.user.userPrincipalName)
| extend InitiatingApp = tostring(InitiatedBy.app.displayName)
| extend InitiatingIPAddress = tostring(InitiatedBy.user.ipAddress)
| extend TargetResource = tostring(TargetResources[0].displayName)
| extend TargetResourceId = tostring(TargetResources[0].id)
| extend TargetType = tostring(TargetResources[0].type)
| extend ModifiedProperties = TargetResources[0].modifiedProperties
| extend CredentialType = iif(
OperationName has "Certificates", "Certificate/Secret",
iif(OperationName has "credentials", "ServicePrincipalCredential", "Other")
)
| project
TimeGenerated,
OperationName,
Result,
InitiatingUPN,
InitiatingApp,
InitiatingIPAddress,
TargetResource,
TargetResourceId,
TargetType,
CredentialType,
Source = "EntraID_AuditLogs",
CorrelationId;
// --- Azure: App Password (Legacy MFA Bypass) Additions ---
let AppPasswordAdditions = AuditLogs
| where TimeGenerated > ago(LookbackPeriod)
| where OperationName in (
"Create application password for user",
"Delete application password for user",
"Update application password for user"
)
| extend InitiatingUPN = tostring(InitiatedBy.user.userPrincipalName)
| extend InitiatingIPAddress = tostring(InitiatedBy.user.ipAddress)
| extend TargetResource = tostring(TargetResources[0].displayName)
| extend TargetResourceId = tostring(TargetResources[0].id)
| extend TargetType = tostring(TargetResources[0].type)
| project
TimeGenerated,
OperationName,
Result,
InitiatingUPN,
InitiatingApp = "",
InitiatingIPAddress,
TargetResource,
TargetResourceId,
TargetType,
CredentialType = "AppPassword",
Source = "EntraID_AppPassword",
CorrelationId;
// --- Union all results ---
union EntraCredentialAdditions, AppPasswordAdditions
| where Result == "success" or Result == ""
// Flag high-risk patterns
| extend IsServiceAccount = InitiatingUPN has_any ("svc-", "service", "automation", "pipeline", "deploy")
| extend IsSelfModification = TargetResource =~ InitiatingUPN
| extend IsHighPrivTarget = TargetType in~ ("ServicePrincipal", "Application")
// Enrich with sign-in context if available
| sort by TimeGenerated desc high severity
high confidence
Data Sources
Cloud Service: Cloud Service Modification User Account: User Account Modification Azure Active Directory Audit Logs Microsoft Entra ID Audit Logs
Required Tables
AuditLogs
False Positives
- Legitimate DevOps automation rotating service principal credentials on a schedule (CI/CD pipelines, Terraform, Ansible)
- Application registrations during normal software development lifecycle where developers add test credentials
- Break-glass/emergency account setup by authorized IT administrators during incident response
- Managed Identity and service connection setup during Azure DevOps pipeline configuration by authorized teams
- App password creation by end users for legacy applications (e.g., Office clients without MFA support) when permitted by policy
Last updated: 2026-04-13 Research depth: deep
References (18)
- https://attack.mitre.org/techniques/T1098/001/
- https://msrc-blog.microsoft.com/2020/12/13/customer-guidance-on-recent-nation-state-cyber-attacks/
- https://posts.specterops.io/azure-privilege-escalation-via-service-principal-abuse-210ae2be2a5
- https://nedinthecloud.com/2019/07/16/demystifying-azure-ad-service-principals/
- https://expel.io/blog/finding-evil-in-aws/
- https://expel.io/blog/behind-the-scenes-expel-soc-alert-aws/
- https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation/
- https://sysdig.com/blog/scarleteel-2-0/
- https://permiso.io/blog/lucr-3-scattered-spider-getting-saas-y-in-the-cloud
- https://www.crowdstrike.com/blog/how-adversaries-persist-with-aws-user-federation/
- https://cloud.google.com/sdk/gcloud/reference/compute/os-login/ssh-keys/add
- https://cloud.google.com/blog/topics/threat-intelligence/untangling-iran-apt42-operations
- https://learn.microsoft.com/en-us/entra/identity/authentication/howto-mfa-app-passwords
- https://www.lacework.com/blog/detecting-ai-resource-hijacking-with-composite-alerts
- https://github.com/RhinoSecurityLabs/pacu
- https://learn.microsoft.com/en-us/azure/active-directory/reports-monitoring/reference-audit-activities
- https://learn.microsoft.com/en-us/graph/api/resources/auditlog-root
- https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azadspredential
Unlock Pro Content
Get the full detection package for T1098.001 including response playbook, investigation guide, and atomic red team tests.
Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance