Back
Id891315d2-e080-4ac8-af5a-50bae17f2d4d
RulenamePROD (TM019.1) - TRUST - A new AD Trust has been established
DescriptionA new Trust has been established with the Forest or Domains. The other forest should have a Tier Model deployed.
SeverityHigh
TacticsPrivilegeEscalation
TechniquesT1484.002
Required data connectorsSecurityEvents
WindowsSecurityEvents
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Microsoft%20Active%20Directory%20Tier%20Model/Analytic%20Rules/TM019_TRUSTANewADTrustHasBeenEstablished.yaml
Version1.0.0
Arm template891315d2-e080-4ac8-af5a-50bae17f2d4d.json
Deploy To Azure
SecurityEvent 
| where EventID == 5137 and EventData has '"ObjectClass">trustedDomain' and EventData has 'CN=System'
| extend ObjectName = extract("(?i)CN=([^,]+),(?i)CN=System", 1, EventData)
| extend ActivityType = extract("([a-zA-Z]+)\\.$", 1, Activity)
| extend Domain = extract("([^.]+\\.[^.]+)$", 1, Computer)
| project TimeGenerated
        , ObjectName
        , ActivityType
        , Account
        , Domain
        , Computer
        , Channel
        , EventID
        , EventData
relevantTechniques:
- T1484.002
triggerThreshold: 0
id: 891315d2-e080-4ac8-af5a-50bae17f2d4d
eventGroupingSettings:
  aggregationKind: AlertPerResult
alertDetailsOverride:
  alertDisplayNameFormat: (TM019.1) A new Trust has been established, ensure the other Forest and Domains have the Tier Model deployed
  alertDescriptionFormat: Ensure the Tier Model has been deployed in the other Forest and Domain. Ensure Trust has been configured and secured properly.
queryPeriod: 1h
triggerOperator: gt
incidentConfiguration:
  createIncident: true
  groupingConfiguration:
    matchingMethod: AllEntities
    enabled: false
    reopenClosedIncident: false
    lookbackDuration: PT5H
status: Available
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Microsoft%20Active%20Directory%20Tier%20Model/Analytic%20Rules/TM019_TRUSTANewADTrustHasBeenEstablished.yaml
queryFrequency: 1h
requiredDataConnectors:
- dataTypes:
  - SecurityEvent
  connectorId: SecurityEvents
- dataTypes:
  - SecurityEvent
  connectorId: WindowsSecurityEvents
version: 1.0.0
tactics:
- PrivilegeEscalation
query: |
  SecurityEvent 
  | where EventID == 5137 and EventData has '"ObjectClass">trustedDomain' and EventData has 'CN=System'
  | extend ObjectName = extract("(?i)CN=([^,]+),(?i)CN=System", 1, EventData)
  | extend ActivityType = extract("([a-zA-Z]+)\\.$", 1, Activity)
  | extend Domain = extract("([^.]+\\.[^.]+)$", 1, Computer)
  | project TimeGenerated
          , ObjectName
          , ActivityType
          , Account
          , Domain
          , Computer
          , Channel
          , EventID
          , EventData
name: PROD (TM019.1) - TRUST - A new AD Trust has been established
severity: High
entityMappings:
- entityType: Account
  fieldMappings:
  - identifier: FullName
    columnName: ObjectName
- entityType: Host
  fieldMappings:
  - identifier: HostName
    columnName: Computer
- entityType: Account
  fieldMappings:
  - identifier: FullName
    columnName: Account
customDetails:
  ObjectName: ObjectName
  ActivityType: ActivityType
  EventID: EventID
  Account: Account
  EventData: EventData
  Domain: Domain
  Computer: Computer
  Channel: Channel
description: |
  A new Trust has been established with the Forest or Domains. The other forest should have a Tier Model deployed.
kind: Scheduled
{
  "$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/891315d2-e080-4ac8-af5a-50bae17f2d4d')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/891315d2-e080-4ac8-af5a-50bae17f2d4d')]",
      "properties": {
        "alertDetailsOverride": {
          "alertDescriptionFormat": "Ensure the Tier Model has been deployed in the other Forest and Domain. Ensure Trust has been configured and secured properly.",
          "alertDisplayNameFormat": "(TM019.1) A new Trust has been established, ensure the other Forest and Domains have the Tier Model deployed"
        },
        "alertRuleTemplateName": "891315d2-e080-4ac8-af5a-50bae17f2d4d",
        "customDetails": {
          "Account": "Account",
          "ActivityType": "ActivityType",
          "Channel": "Channel",
          "Computer": "Computer",
          "Domain": "Domain",
          "EventData": "EventData",
          "EventID": "EventID",
          "ObjectName": "ObjectName"
        },
        "description": "A new Trust has been established with the Forest or Domains. The other forest should have a Tier Model deployed.\n",
        "displayName": "PROD (TM019.1) - TRUST - A new AD Trust has been established",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "ObjectName",
                "identifier": "FullName"
              }
            ]
          },
          {
            "entityType": "Host",
            "fieldMappings": [
              {
                "columnName": "Computer",
                "identifier": "HostName"
              }
            ]
          },
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "Account",
                "identifier": "FullName"
              }
            ]
          }
        ],
        "eventGroupingSettings": {
          "aggregationKind": "AlertPerResult"
        },
        "incidentConfiguration": {
          "createIncident": true,
          "groupingConfiguration": {
            "enabled": false,
            "lookbackDuration": "PT5H",
            "matchingMethod": "AllEntities",
            "reopenClosedIncident": false
          }
        },
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Microsoft%20Active%20Directory%20Tier%20Model/Analytic%20Rules/TM019_TRUSTANewADTrustHasBeenEstablished.yaml",
        "query": "SecurityEvent \n| where EventID == 5137 and EventData has '\"ObjectClass\">trustedDomain' and EventData has 'CN=System'\n| extend ObjectName = extract(\"(?i)CN=([^,]+),(?i)CN=System\", 1, EventData)\n| extend ActivityType = extract(\"([a-zA-Z]+)\\\\.$\", 1, Activity)\n| extend Domain = extract(\"([^.]+\\\\.[^.]+)$\", 1, Computer)\n| project TimeGenerated\n        , ObjectName\n        , ActivityType\n        , Account\n        , Domain\n        , Computer\n        , Channel\n        , EventID\n        , EventData\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "High",
        "status": "Available",
        "subTechniques": [
          "T1484.002"
        ],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "PrivilegeEscalation"
        ],
        "techniques": [
          "T1484"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}