Back
Idead4deed-9d48-4646-aee0-6b46c2dd1ae6
RulenameSpyCloud infostealer malware credential exposure
Description#DONT_CORR#

‘Identifies credentials harvested by infostealer malware on a compromised device. This

exposure may indicate an actively compromised endpoint with associated command-and-control

risk.
SeverityHigh
TacticsCredentialAccess
CommandAndControl
TechniquesT1555
T1071
Required data connectorsSpyCloudEnterpriseProtectionCCF
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/SpyCloud%20Enterprise%20Protection%20CCF/Analytic%20Rules/AR_malware_25.yaml
Version1.0.0
Arm templateead4deed-9d48-4646-aee0-6b46c2dd1ae6.json
Deploy To Azure
// Human-readable constant for the severity threshold used below
let severityThreshold = 25;
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 machine and isolate it repeatedly.
    // Take the first address instead.
    IPAddress = tostring(IPAddresses[0])
// One alert per infected machine. InfectedMachineId is populated on every malware record,
// so it is a reliable dedupe key; without this a machine seen several times in the same
// window raises duplicate alerts and is acted on more than once. Deduplication is per rule
// execution, so a machine reappearing in a later window correctly raises a new alert.
| summarize arg_max(TimeGenerated, *) by InfectedMachineId
| project TimeGenerated, DocumentId, SourceId, SpyCloudPublishDate, AccountEmail,
    AccountName, AccountUpn, HostName, InfectedMachineId, InfectedTime, UserOS,
    IPAddress
tactics:
- CredentialAccess
- CommandAndControl
name: SpyCloud infostealer malware credential exposure
version: 1.0.0
queryFrequency: 1h
requiredDataConnectors:
- connectorId: SpyCloudEnterpriseProtectionCCF
  dataTypes:
  - SpyCloudBreachWatchlistV2_CL
customDetails:
  InfectedTime: InfectedTime
  InfectedMachineId: InfectedMachineId
  DocumentID: DocumentId
  SpyCloudPublishDate: SpyCloudPublishDate
id: ead4deed-9d48-4646-aee0-6b46c2dd1ae6
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 infostealer malware credential exposure - {{HostName}}
severity: High
relevantTechniques:
- T1555
- T1071
eventGroupingSettings:
  aggregationKind: AlertPerResult
description: |
  #DONT_CORR#
  'Identifies credentials harvested by infostealer malware on a compromised device. This
  exposure may indicate an actively compromised endpoint with associated command-and-control
  risk.'
triggerOperator: gt
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/SpyCloud%20Enterprise%20Protection%20CCF/Analytic%20Rules/AR_malware_25.yaml
kind: Scheduled
query: |
  // Human-readable constant for the severity threshold used below
  let severityThreshold = 25;
  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 machine and isolate it repeatedly.
      // Take the first address instead.
      IPAddress = tostring(IPAddresses[0])
  // One alert per infected machine. InfectedMachineId is populated on every malware record,
  // so it is a reliable dedupe key; without this a machine seen several times in the same
  // window raises duplicate alerts and is acted on more than once. Deduplication is per rule
  // execution, so a machine reappearing in a later window correctly raises a new alert.
  | summarize arg_max(TimeGenerated, *) by InfectedMachineId
  | project TimeGenerated, DocumentId, SourceId, SpyCloudPublishDate, AccountEmail,
      AccountName, AccountUpn, HostName, 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/ead4deed-9d48-4646-aee0-6b46c2dd1ae6')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/ead4deed-9d48-4646-aee0-6b46c2dd1ae6')]",
      "properties": {
        "alertDetailsOverride": {
          "alertDisplayNameFormat": "SpyCloud infostealer malware credential exposure - {{HostName}}"
        },
        "alertRuleTemplateName": "ead4deed-9d48-4646-aee0-6b46c2dd1ae6",
        "customDetails": {
          "DocumentID": "DocumentId",
          "InfectedMachineId": "InfectedMachineId",
          "InfectedTime": "InfectedTime",
          "SpyCloudPublishDate": "SpyCloudPublishDate"
        },
        "description": "#DONT_CORR#\n'Identifies credentials harvested by infostealer malware on a compromised device. This\nexposure may indicate an actively compromised endpoint with associated command-and-control\nrisk.'\n",
        "displayName": "SpyCloud infostealer malware credential 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_malware_25.yaml",
        "query": "// Human-readable constant for the severity threshold used below\nlet severityThreshold = 25;\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 machine and isolate it repeatedly.\n    // Take the first address instead.\n    IPAddress = tostring(IPAddresses[0])\n// One alert per infected machine. InfectedMachineId is populated on every malware record,\n// so it is a reliable dedupe key; without this a machine seen several times in the same\n// window raises duplicate alerts and is acted on more than once. Deduplication is per rule\n// execution, so a machine reappearing in a later window correctly raises a new alert.\n| summarize arg_max(TimeGenerated, *) by InfectedMachineId\n| project TimeGenerated, DocumentId, SourceId, SpyCloudPublishDate, AccountEmail,\n    AccountName, AccountUpn, HostName, InfectedMachineId, InfectedTime, UserOS,\n    IPAddress\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "High",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "CommandAndControl",
          "CredentialAccess"
        ],
        "techniques": [
          "T1071",
          "T1555"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}