entra_id_secret_added_to_app


Description

Secrets added to applications have legitimate purposes, but can also be a method of persistence.

Query · yara_l

events:
    $app.metadata.event_type = "SERVICE_MODIFICATION"
    $app.metadata.product_event_type = /Update application.*Certificates and secrets management/
    $app.metadata.product_name = "Azure AD Directory Audit"
    $app.metadata.vendor_name = "Microsoft"
    $app.security_result.action = "ALLOW"
    $app.principal.user.userid = $user

  match:
    $user over 5m

  outcome:
    $risk_score = 65
    $event_count = count_distinct($app.metadata.id)
    $user_agent = array_distinct($app.network.http.user_agent)
    $network_session = array_distinct($app.network.session_id)
    $principal_county_region = array_distinct($app.principal.ip_geo_artifact.location.country_or_region)
    $principal_ip = array_distinct($app.principal.ip)
    $principal_email = array_distinct($app.principal.user.email_addresses)
    $target_application = array_distinct($app.target.resource.name)
    $target_application_id = array_distinct($app.target.resource.product_object_id)

  condition:
    $app
Raw source entra_id_secret_added_to_app · YARA-L
Esc
Published by chronicle/detection-rules ↗, licensed under Apache 2.0 ↗. Reproduced here unmodified.
 rule entra_id_secret_added_to_app {

  meta:
    author = "Google Cloud Security"
    description = "Secrets added to applications have legitimate purposes, but can also be a method of persistence."
    rule_id = "mr_22d3881f-f84d-42ee-a1bc-5d5eb419b769"
    rule_name = "Client Secret Added to Entra ID Application"
    tactic = "TA0003"
    technique = "T1098.001"
    type = "alert"
    platform = "azure"
    data_source = "azure ad"
    severity = "Medium"
    priority = "Medium"

  events:
    $app.metadata.event_type = "SERVICE_MODIFICATION"
    $app.metadata.product_event_type = /Update application.*Certificates and secrets management/
    $app.metadata.product_name = "Azure AD Directory Audit"
    $app.metadata.vendor_name = "Microsoft"
    $app.security_result.action = "ALLOW"
    $app.principal.user.userid = $user

  match:
    $user over 5m

  outcome:
    $risk_score = 65
    $event_count = count_distinct($app.metadata.id)
    $user_agent = array_distinct($app.network.http.user_agent)
    $network_session = array_distinct($app.network.session_id)
    $principal_county_region = array_distinct($app.principal.ip_geo_artifact.location.country_or_region)
    $principal_ip = array_distinct($app.principal.ip)
    $principal_email = array_distinct($app.principal.user.email_addresses)
    $target_application = array_distinct($app.target.resource.name)
    $target_application_id = array_distinct($app.target.resource.product_object_id)

  condition:
    $app
}

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.