Analytic rule catalog
SpyCloud identity access record exposure
Back
| Id | cd8ec49c-b654-49be-b040-e552b8eba7c8 |
| Rulename | SpyCloud identity access record exposure |
| Description | #DONT_CORR# ‘Identifies exposure of identity access material such as session cookies, OAuth tokens, or SSO credentials. This material can grant direct account access without a password, so it bypasses password resets and single-factor controls. Revoking active sessions is the primary containment action. |
| Severity | High |
| Tactics | CredentialAccess DefenseEvasion |
| Techniques | T1539 T1528 T1550 |
| Required data connectors | SpyCloudEnterpriseProtectionCCF |
| Kind | Scheduled |
| Query frequency | 1h |
| Query period | 1h |
| Trigger threshold | 0 |
| Trigger operator | gt |
| Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/SpyCloud%20Enterprise%20Protection%20CCF/Analytic%20Rules/AR_Access_Records_30.yaml |
| Version | 1.0.0 |
| Arm template | cd8ec49c-b654-49be-b040-e552b8eba7c8.json |
// Human-readable constant for the severity threshold used below
let severityThreshold = 30;
SpyCloudBreachWatchlistV2_CL
| where Severity == severityThreshold
| extend AccountName = Username, AccountEmail = Email, HostName = UserHostName,
AccountUpn = iff(isnotempty(Email), Email, Username),
// Under AlertPerResult every row becomes its own alert, so mv-expand on IPAddresses
// would raise one alert per IP for the same identity. Take the first address instead.
IPAddress = tostring(IPAddresses[0])
// One alert per exposed identity. Session revocation acts per user, so a user appearing
// several times in the same window would otherwise be revoked repeatedly. Deduplication is
// per rule execution, so a reappearance in a later window correctly raises a new alert.
| summarize arg_max(TimeGenerated, *) by AccountUpn
| project TimeGenerated, DocumentId, SourceId, SpyCloudPublishDate, AccountEmail,
AccountName, AccountUpn, HostName, TargetDomain, TargetUrl, AccountType, PasswordType,
InfectedMachineId, InfectedTime, UserOS, IPAddress
tactics:
- CredentialAccess
- DefenseEvasion
name: SpyCloud identity access record exposure
version: 1.0.0
queryFrequency: 1h
requiredDataConnectors:
- connectorId: SpyCloudEnterpriseProtectionCCF
dataTypes:
- SpyCloudBreachWatchlistV2_CL
customDetails:
InfectedTime: InfectedTime
InfectedMachineId: InfectedMachineId
DocumentID: DocumentId
SpyCloudPublishDate: SpyCloudPublishDate
id: cd8ec49c-b654-49be-b040-e552b8eba7c8
triggerThreshold: 0
entityMappings:
- fieldMappings:
- identifier: FullName
columnName: AccountUpn
entityType: Account
- fieldMappings:
- identifier: MailboxPrimaryAddress
columnName: AccountEmail
entityType: Mailbox
- fieldMappings:
- identifier: HostName
columnName: HostName
entityType: Host
- fieldMappings:
- identifier: Address
columnName: IPAddress
entityType: IP
queryPeriod: 1h
alertDetailsOverride:
alertDisplayNameFormat: SpyCloud identity access record exposure - {{AccountUpn}}
severity: High
relevantTechniques:
- T1539
- T1528
- T1550
eventGroupingSettings:
aggregationKind: AlertPerResult
description: |
#DONT_CORR#
'Identifies exposure of identity access material such as session cookies, OAuth tokens,
or SSO credentials. This material can grant direct account access without a password,
so it bypasses password resets and single-factor controls. Revoking active sessions is
the primary containment action.'
triggerOperator: gt
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/SpyCloud%20Enterprise%20Protection%20CCF/Analytic%20Rules/AR_Access_Records_30.yaml
kind: Scheduled
query: |
// Human-readable constant for the severity threshold used below
let severityThreshold = 30;
SpyCloudBreachWatchlistV2_CL
| where Severity == severityThreshold
| extend AccountName = Username, AccountEmail = Email, HostName = UserHostName,
AccountUpn = iff(isnotempty(Email), Email, Username),
// Under AlertPerResult every row becomes its own alert, so mv-expand on IPAddresses
// would raise one alert per IP for the same identity. Take the first address instead.
IPAddress = tostring(IPAddresses[0])
// One alert per exposed identity. Session revocation acts per user, so a user appearing
// several times in the same window would otherwise be revoked repeatedly. Deduplication is
// per rule execution, so a reappearance in a later window correctly raises a new alert.
| summarize arg_max(TimeGenerated, *) by AccountUpn
| project TimeGenerated, DocumentId, SourceId, SpyCloudPublishDate, AccountEmail,
AccountName, AccountUpn, HostName, TargetDomain, TargetUrl, AccountType, PasswordType,
InfectedMachineId, InfectedTime, UserOS, IPAddress
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workspace": {
"type": "String"
}
},
"resources": [
{
"apiVersion": "2024-01-01-preview",
"id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/cd8ec49c-b654-49be-b040-e552b8eba7c8')]",
"kind": "Scheduled",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/cd8ec49c-b654-49be-b040-e552b8eba7c8')]",
"properties": {
"alertDetailsOverride": {
"alertDisplayNameFormat": "SpyCloud identity access record exposure - {{AccountUpn}}"
},
"alertRuleTemplateName": "cd8ec49c-b654-49be-b040-e552b8eba7c8",
"customDetails": {
"DocumentID": "DocumentId",
"InfectedMachineId": "InfectedMachineId",
"InfectedTime": "InfectedTime",
"SpyCloudPublishDate": "SpyCloudPublishDate"
},
"description": "#DONT_CORR#\n'Identifies exposure of identity access material such as session cookies, OAuth tokens,\nor SSO credentials. This material can grant direct account access without a password,\nso it bypasses password resets and single-factor controls. Revoking active sessions is\nthe primary containment action.'\n",
"displayName": "SpyCloud identity access record exposure",
"enabled": true,
"entityMappings": [
{
"entityType": "Account",
"fieldMappings": [
{
"columnName": "AccountUpn",
"identifier": "FullName"
}
]
},
{
"entityType": "Mailbox",
"fieldMappings": [
{
"columnName": "AccountEmail",
"identifier": "MailboxPrimaryAddress"
}
]
},
{
"entityType": "Host",
"fieldMappings": [
{
"columnName": "HostName",
"identifier": "HostName"
}
]
},
{
"entityType": "IP",
"fieldMappings": [
{
"columnName": "IPAddress",
"identifier": "Address"
}
]
}
],
"eventGroupingSettings": {
"aggregationKind": "AlertPerResult"
},
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/SpyCloud%20Enterprise%20Protection%20CCF/Analytic%20Rules/AR_Access_Records_30.yaml",
"query": "// Human-readable constant for the severity threshold used below\nlet severityThreshold = 30;\nSpyCloudBreachWatchlistV2_CL\n| where Severity == severityThreshold\n| extend AccountName = Username, AccountEmail = Email, HostName = UserHostName,\n AccountUpn = iff(isnotempty(Email), Email, Username),\n // Under AlertPerResult every row becomes its own alert, so mv-expand on IPAddresses\n // would raise one alert per IP for the same identity. Take the first address instead.\n IPAddress = tostring(IPAddresses[0])\n// One alert per exposed identity. Session revocation acts per user, so a user appearing\n// several times in the same window would otherwise be revoked repeatedly. Deduplication is\n// per rule execution, so a reappearance in a later window correctly raises a new alert.\n| summarize arg_max(TimeGenerated, *) by AccountUpn\n| project TimeGenerated, DocumentId, SourceId, SpyCloudPublishDate, AccountEmail,\n AccountName, AccountUpn, HostName, TargetDomain, TargetUrl, AccountType, PasswordType,\n InfectedMachineId, InfectedTime, UserOS, IPAddress\n",
"queryFrequency": "PT1H",
"queryPeriod": "PT1H",
"severity": "High",
"subTechniques": [],
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"CredentialAccess",
"DefenseEvasion"
],
"techniques": [
"T1528",
"T1539",
"T1550"
],
"templateVersion": "1.0.0",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0
},
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
}
]
}