Microsoft Sentinel Analytic Rules
cloudbrothers.infoAzure Sentinel RepoToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

1Password - Secret extraction post vault access change by administrator

Back
Id6711b747-16d7-4df4-9f61-8633617f45d7
Rulename1Password - Secret extraction post vault access change by administrator
DescriptionThis will alert when a secret extraction has occurred after an administrator has changed their own vault access permissions within that same vault.

Ref: https://1password.com/

Ref: https://github.com/securehats/
SeverityHigh
TacticsCredentialAccess
TechniquesT1555
Required data connectors1Password
KindScheduled
Query frequency5m
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/1Password/Analytics Rules/1Password - Secret Extraction Post Vault Access Change By Administrator.yaml
Version1.0.0
Arm template6711b747-16d7-4df4-9f61-8633617f45d7.json
Deploy To Azure
let lookback = 1h;
let secretExtractionActivity =
    OnePasswordEventLogs_CL
    | where TimeGenerated between (ago(lookback) .. now())
    | where log_source == "itemusages"
    | where action has_any("server-fetch", "reveal", "secure-copy")
;
OnePasswordEventLogs_CL
| where log_source == "auditevents"
| where (action == "grant" and object_type  == "uva") or (action == "update" and object_type  == "uva")
| where tostring(actor_details.uuid) == tostring(aux_details.uuid)
| extend
    userUuid = tostring(actor_details.uuid)
    , vaultUuid = tostring(object_uuid)
| join (
    secretExtractionActivity
    | extend
        userUuid = tostring(user.uuid)
        , vaultUuid = tostring(vault_uuid)
    )
    on $left.userUuid == $right.userUuid and $left.vaultUuid == $right.vaultUuid
| extend
    auditevents = bag_pack("action", action, "object_type", object_type)
    , itemusages = bag_pack("action", action1, "object_type", object_type1)
    , vault_details = bag_pack("vault_uuid", vault_uuid1, "item_uuid", item_uuid1)
| project
    TimeGenerated
    , actor_details
    , target_details = aux_details
    , location_details = location
    , client_details = client1
    , auditevents
    , itemusages
    , vault_details
    , TargetUsername = tostring(user1.email)
    , SrcIpAddr = tostring(client1.ip_address)
id: 6711b747-16d7-4df4-9f61-8633617f45d7
triggerThreshold: 0
incidentConfiguration:
  createIncident: true
  groupingConfiguration:
    lookbackDuration: 1h
    matchingMethod: AllEntities
    enabled: true
    reopenClosedIncident: false
suppressionDuration: 1h
version: 1.0.0
queryPeriod: 1h
eventGroupingSettings:
  aggregationKind: SingleAlert
name: 1Password - Secret extraction post vault access change by administrator
suppressionEnabled: false
requiredDataConnectors:
- connectorId: 1Password
  dataTypes:
  - OnePasswordEventLogs_CL
triggerOperator: gt
relevantTechniques:
- T1555
query: |-
  let lookback = 1h;
  let secretExtractionActivity =
      OnePasswordEventLogs_CL
      | where TimeGenerated between (ago(lookback) .. now())
      | where log_source == "itemusages"
      | where action has_any("server-fetch", "reveal", "secure-copy")
  ;
  OnePasswordEventLogs_CL
  | where log_source == "auditevents"
  | where (action == "grant" and object_type  == "uva") or (action == "update" and object_type  == "uva")
  | where tostring(actor_details.uuid) == tostring(aux_details.uuid)
  | extend
      userUuid = tostring(actor_details.uuid)
      , vaultUuid = tostring(object_uuid)
  | join (
      secretExtractionActivity
      | extend
          userUuid = tostring(user.uuid)
          , vaultUuid = tostring(vault_uuid)
      )
      on $left.userUuid == $right.userUuid and $left.vaultUuid == $right.vaultUuid
  | extend
      auditevents = bag_pack("action", action, "object_type", object_type)
      , itemusages = bag_pack("action", action1, "object_type", object_type1)
      , vault_details = bag_pack("vault_uuid", vault_uuid1, "item_uuid", item_uuid1)
  | project
      TimeGenerated
      , actor_details
      , target_details = aux_details
      , location_details = location
      , client_details = client1
      , auditevents
      , itemusages
      , vault_details
      , TargetUsername = tostring(user1.email)
      , SrcIpAddr = tostring(client1.ip_address)  
queryFrequency: 5m
description: |-
  This will alert when a secret extraction has occurred after an administrator has changed their own vault access permissions within that same vault.
  Ref: https://1password.com/
  Ref: https://github.com/securehats/  
entityMappings:
- entityType: Account
  fieldMappings:
  - columnName: TargetUsername
    identifier: FullName
- entityType: IP
  fieldMappings:
  - columnName: SrcIpAddr
    identifier: Address
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/1Password/Analytics Rules/1Password - Secret Extraction Post Vault Access Change By Administrator.yaml
kind: Scheduled
severity: High
tactics:
- CredentialAccess
{
  "$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/6711b747-16d7-4df4-9f61-8633617f45d7')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/6711b747-16d7-4df4-9f61-8633617f45d7')]",
      "properties": {
        "alertRuleTemplateName": "6711b747-16d7-4df4-9f61-8633617f45d7",
        "customDetails": null,
        "description": "This will alert when a secret extraction has occurred after an administrator has changed their own vault access permissions within that same vault.\nRef: https://1password.com/\nRef: https://github.com/securehats/",
        "displayName": "1Password - Secret extraction post vault access change by administrator",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "TargetUsername",
                "identifier": "FullName"
              }
            ]
          },
          {
            "entityType": "IP",
            "fieldMappings": [
              {
                "columnName": "SrcIpAddr",
                "identifier": "Address"
              }
            ]
          }
        ],
        "eventGroupingSettings": {
          "aggregationKind": "SingleAlert"
        },
        "incidentConfiguration": {
          "createIncident": true,
          "groupingConfiguration": {
            "enabled": true,
            "lookbackDuration": "PT1H",
            "matchingMethod": "AllEntities",
            "reopenClosedIncident": false
          }
        },
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/1Password/Analytics Rules/1Password - Secret Extraction Post Vault Access Change By Administrator.yaml",
        "query": "let lookback = 1h;\nlet secretExtractionActivity =\n    OnePasswordEventLogs_CL\n    | where TimeGenerated between (ago(lookback) .. now())\n    | where log_source == \"itemusages\"\n    | where action has_any(\"server-fetch\", \"reveal\", \"secure-copy\")\n;\nOnePasswordEventLogs_CL\n| where log_source == \"auditevents\"\n| where (action == \"grant\" and object_type  == \"uva\") or (action == \"update\" and object_type  == \"uva\")\n| where tostring(actor_details.uuid) == tostring(aux_details.uuid)\n| extend\n    userUuid = tostring(actor_details.uuid)\n    , vaultUuid = tostring(object_uuid)\n| join (\n    secretExtractionActivity\n    | extend\n        userUuid = tostring(user.uuid)\n        , vaultUuid = tostring(vault_uuid)\n    )\n    on $left.userUuid == $right.userUuid and $left.vaultUuid == $right.vaultUuid\n| extend\n    auditevents = bag_pack(\"action\", action, \"object_type\", object_type)\n    , itemusages = bag_pack(\"action\", action1, \"object_type\", object_type1)\n    , vault_details = bag_pack(\"vault_uuid\", vault_uuid1, \"item_uuid\", item_uuid1)\n| project\n    TimeGenerated\n    , actor_details\n    , target_details = aux_details\n    , location_details = location\n    , client_details = client1\n    , auditevents\n    , itemusages\n    , vault_details\n    , TargetUsername = tostring(user1.email)\n    , SrcIpAddr = tostring(client1.ip_address)",
        "queryFrequency": "PT5M",
        "queryPeriod": "PT1H",
        "severity": "High",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "CredentialAccess"
        ],
        "techniques": [
          "T1555"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}