Stale AWS policy attachment to identity
Id | 766a3b1b-0d5b-4a8d-b0d6-7dd379e73567 |
Rulename | Stale AWS policy attachment to identity |
Description | The policy detects ‘AWS policies’ attached to IAM users or roles that have not used it during the last X days. It is recommended to remove unused policies from identities to reduce risk. |
Severity | Low |
Tactics | InitialAccess |
Techniques | T1078 |
Required data connectors | Authomize |
Kind | Scheduled |
Query frequency | 30m |
Query period | 30m |
Trigger threshold | 0 |
Trigger operator | gt |
Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Authomize/Analytic Rules/Stale_AWS_policy_attachment_to_identity.yaml |
Version | 1.0.2 |
Arm template | 766a3b1b-0d5b-4a8d-b0d6-7dd379e73567.json |
Authomize_v2_CL
| where ingestion_time() >= ago(30m)
| extend EventID = id_s, Policy = policy_name_s, Severity = severity_s,Description = description_s,Recommendation = recommendation_s,URL = url_s,Tactics = tactics_s
| where Policy has "Stale AWS policy attachment to identity"
| project EventID, Policy, Severity, Description, Recommendation, URL, Category, Tactics
name: Stale AWS policy attachment to identity
alertDetailsOverride:
alertnameFormat: Alert from Authomize - Stale AWS policy attachment to identity
alertSeverity: Severity
alertDynamicProperties:
- alertProperty: AlertLink
value: URL
alertDescriptionFormat: Stale AWS policy attachment to identity. The policy detects 'AWS policies' attached to IAM users or roles that have not used it during the last X days. It is recommended to remove unused policies from identities to reduce risk.
alertTactics: Tactics
severity: Low
queryFrequency: 30m
query: |-
Authomize_v2_CL
| where ingestion_time() >= ago(30m)
| extend EventID = id_s, Policy = policy_name_s, Severity = severity_s,Description = description_s,Recommendation = recommendation_s,URL = url_s,Tactics = tactics_s
| where Policy has "Stale AWS policy attachment to identity"
| project EventID, Policy, Severity, Description, Recommendation, URL, Category, Tactics
customDetails:
ReferencedURL: URL
EventDescription: Description
AuthomizeEventID: EventID
EventRecommendation: Recommendation
EventName: Policy
version: 1.0.2
relevantTechniques:
- T1078
status: Available
description: The policy detects 'AWS policies' attached to IAM users or roles that have not used it during the last X days. It is recommended to remove unused policies from identities to reduce risk.
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Authomize/Analytic Rules/Stale_AWS_policy_attachment_to_identity.yaml
requiredDataConnectors:
- connectorId: Authomize
dataTypes:
- Authomize_v2_CL
entityMappings:
- fieldMappings:
- identifier: Url
columnName: URL
entityType: URL
triggerOperator: gt
queryPeriod: 30m
tactics:
- InitialAccess
suppressionEnabled: false
incidentConfiguration:
createIncident: true
groupingConfiguration:
matchingMethod: AnyAlert
lookbackDuration: 5h
enabled: true
groupByEntities: []
reopenClosedIncident: false
groupByAlertDetails: []
groupByCustomDetails: []
kind: Scheduled
eventGroupingSettings:
aggregationKind: SingleAlert
triggerThreshold: 0
suppressionDuration: 5h
id: 766a3b1b-0d5b-4a8d-b0d6-7dd379e73567
{
"$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/766a3b1b-0d5b-4a8d-b0d6-7dd379e73567')]",
"kind": "Scheduled",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/766a3b1b-0d5b-4a8d-b0d6-7dd379e73567')]",
"properties": {
"alertDetailsOverride": {
"alertDescriptionFormat": "Stale AWS policy attachment to identity. The policy detects 'AWS policies' attached to IAM users or roles that have not used it during the last X days. It is recommended to remove unused policies from identities to reduce risk.",
"alertDynamicProperties": [
{
"alertProperty": "AlertLink",
"value": "URL"
}
],
"alertnameFormat": "Alert from Authomize - Stale AWS policy attachment to identity",
"alertSeverity": "Severity",
"alertTactics": "Tactics"
},
"alertRuleTemplateName": "766a3b1b-0d5b-4a8d-b0d6-7dd379e73567",
"customDetails": {
"AuthomizeEventID": "EventID",
"EventDescription": "Description",
"EventName": "Policy",
"EventRecommendation": "Recommendation",
"ReferencedURL": "URL"
},
"description": "The policy detects 'AWS policies' attached to IAM users or roles that have not used it during the last X days. It is recommended to remove unused policies from identities to reduce risk.",
"displayName": "Stale AWS policy attachment to identity",
"enabled": true,
"entityMappings": [
{
"entityType": "URL",
"fieldMappings": [
{
"columnName": "URL",
"identifier": "Url"
}
]
}
],
"eventGroupingSettings": {
"aggregationKind": "SingleAlert"
},
"incidentConfiguration": {
"createIncident": true,
"groupingConfiguration": {
"enabled": true,
"groupByAlertDetails": [],
"groupByCustomDetails": [],
"groupByEntities": [],
"lookbackDuration": "PT5H",
"matchingMethod": "AnyAlert",
"reopenClosedIncident": false
}
},
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Authomize/Analytic Rules/Stale_AWS_policy_attachment_to_identity.yaml",
"query": "Authomize_v2_CL\n| where ingestion_time() >= ago(30m)\n| extend EventID = id_s, Policy = policy_name_s, Severity = severity_s,Description = description_s,Recommendation = recommendation_s,URL = url_s,Tactics = tactics_s\n| where Policy has \"Stale AWS policy attachment to identity\"\n| project EventID, Policy, Severity, Description, Recommendation, URL, Category, Tactics",
"queryFrequency": "PT30M",
"queryPeriod": "PT30M",
"severity": "Low",
"status": "Available",
"subTechniques": [],
"suppressionDuration": "PT5H",
"suppressionEnabled": false,
"tactics": [
"InitialAccess"
],
"techniques": [
"T1078"
],
"templateVersion": "1.0.2",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0
},
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
}
]
}