T1098.001 Google Chronicle · YARA-L

Detect Additional Cloud Credentials in Google Chronicle

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.

MITRE ATT&CK

Tactic
Persistence Privilege Escalation
Technique
T1098 Account Manipulation
Sub-technique
T1098.001 Additional Cloud Credentials
Canonical reference
https://attack.mitre.org/techniques/T1098/001/

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
rule T1098_001_Additional_Cloud_Credentials {
  meta:
    author          = "Detection Engineering"
    description     = "Detects addition of credentials to Azure/Entra ID service principals and applications (T1098.001). Covers service principal credential additions, certificate and secret management, app password creation for MFA bypass, and ownership changes."
    mitre_attack_tactic    = "Persistence"
    mitre_attack_technique = "T1098.001"
    severity        = "HIGH"
    confidence      = "HIGH"
    version         = "1.0"
    created         = "2026-04-13"

  events:
    $e.metadata.log_type = "AZURE_AD"
    $e.metadata.product_event_type in (
      "Add service principal credentials",
      "Update application \u2013 Certificates and secrets management",
      "Add application",
      "Update service principal",
      "Add owner to application",
      "Add app role assignment to service principal",
      "Create application password for user",
      "Update application password for user",
      "Delete application password for user"
    )
    // Include both explicit ALLOW and events with no block action (missing result = likely success)
    not $e.security_result.action = "BLOCK"
    $e.principal.user.email_addresses = $initiating_upn

  match:
    $initiating_upn over 1h

  outcome:
    $event_count              = count_distinct($e.metadata.id)
    $operations               = array_distinct($e.metadata.product_event_type)
    $target_resources         = array_distinct($e.target.resource.name)
    $source_ips               = array_distinct($e.principal.ip)
    $is_mfa_bypass_risk       = max(if($e.metadata.product_event_type = "Create application password for user", 1, 0))
    $is_sp_credential_add     = max(if($e.metadata.product_event_type = "Add service principal credentials", 1, 0))
    $is_ownership_change      = max(if($e.metadata.product_event_type = "Add owner to application", 1, 0))

  condition:
    $e
}
high severity high confidence

Google Chronicle YARA-L 2.0 rule detecting Azure/Entra ID service principal and application credential additions. Targets the AZURE_AD log type ingested via the Chronicle Azure Active Directory feed. Uses metadata.product_event_type to match the raw Azure audit operation names. The match block groups events by initiating user over a 1-hour window to surface accounts performing multiple credential operations. Outcome variables flag MFA bypass risk (app password), service principal credential additions, and ownership changes for downstream alert enrichment.

Data Sources

Google Chronicle Azure Active Directory log feedMicrosoft Entra ID Audit Logs ingested into Chronicle UDM

Required Tables

AZURE_AD (Chronicle UDM log type)

False Positives & Tuning

  • Legitimate infrastructure automation accounts (Terraform service principals, Azure DevOps managed identities) that regularly add credentials to registered applications as part of provisioning workflows
  • IT administrators performing bulk credential rotation across multiple service principals during a planned maintenance window, which may generate multiple events from a single identity
  • Third-party SaaS vendor onboarding processes that require granting their application ownership or assigning credentials to an enterprise application in the tenant
Download portable Sigma rule (.yml)

Other platforms for T1098.001


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Add Client Secret to Entra ID Application via Azure CLI

    Expected signal: Entra ID Audit Logs: OperationName='Update application – Certificates and secrets management' or 'Add service principal credentials' with Result=success. InitiatedBy will show the authenticated CLI user. TargetResources will contain the application object ID and display name. ModifiedProperties will include the new credential's KeyId, StartDate, EndDate, and CustomKeyIdentifier.

  2. Test 2Create AWS IAM Access Key for Existing User via AWS CLI

    Expected signal: AWS CloudTrail: EventName='CreateAccessKey' with requestParameters.userName=<TARGET_USERNAME>, responseElements.accessKey.accessKeyId=<NEW_KEY_ID>, responseElements.accessKey.status='Active'. UserIdentity section shows the requesting account. EventSource=iam.amazonaws.com.

  3. Test 3Add Certificate Credential to Entra ID Service Principal via PowerShell

    Expected signal: Entra ID Audit Logs: OperationName='Add service principal credentials' with Result=success. ModifiedProperties will contain KeyCredentials with Type=AsymmetricX509Cert, Usage=Verify, and the certificate's StartDate/EndDate. PowerShell ScriptBlock Logging (Event ID 4104) will capture the New-AzADSpCredential command. Sysmon Event ID 1 will show powershell.exe execution.

  4. Test 4Create Entra ID App Password for MFA Bypass via Microsoft Graph API

    Expected signal: Entra ID Audit Logs: OperationName='Create application password for user' with Result=success. InitiatedBy will show the authenticated Graph API caller. TargetResources will contain the target user's UPN and object ID. Microsoft Defender for Cloud Apps may also generate an alert for unusual MFA modification activity.

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

Related Detections