1Password - Secret extraction post vault access change by administrator
Id | 6711b747-16d7-4df4-9f61-8633617f45d7 |
Rulename | 1Password - Secret extraction post vault access change by administrator |
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/ |
Severity | High |
Tactics | CredentialAccess |
Techniques | T1555 |
Required data connectors | 1Password |
Kind | Scheduled |
Query frequency | 5m |
Query period | 1h |
Trigger threshold | 0 |
Trigger operator | gt |
Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/1Password/Analytics Rules/1Password - Secret Extraction Post Vault Access Change By Administrator.yaml |
Version | 1.0.0 |
Arm template | 6711b747-16d7-4df4-9f61-8633617f45d7.json |
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)
kind: Scheduled
suppressionEnabled: false
entityMappings:
- entityType: Account
fieldMappings:
- columnName: TargetUsername
identifier: FullName
- entityType: IP
fieldMappings:
- columnName: SrcIpAddr
identifier: Address
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)
relevantTechniques:
- T1555
suppressionDuration: 1h
triggerOperator: gt
triggerThreshold: 0
queryPeriod: 1h
tactics:
- CredentialAccess
id: 6711b747-16d7-4df4-9f61-8633617f45d7
requiredDataConnectors:
- dataTypes:
- OnePasswordEventLogs_CL
connectorId: 1Password
incidentConfiguration:
createIncident: true
groupingConfiguration:
matchingMethod: AllEntities
enabled: true
reopenClosedIncident: false
lookbackDuration: 1h
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/1Password/Analytics Rules/1Password - Secret Extraction Post Vault Access Change By Administrator.yaml
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/
queryFrequency: 5m
name: 1Password - Secret extraction post vault access change by administrator
severity: High
version: 1.0.0
eventGroupingSettings:
aggregationKind: SingleAlert
{
"$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"
}
]
}