Analytic rule catalog
Netskope - Impossible Travel Detection Two Countries in Less Than 1 Hour
Back
| Id | d1b88716-3cd4-4585-a9a2-2dd2c9b04ecb |
| Rulename | Netskope - Impossible Travel Detection (Two Countries in Less Than 1 Hour) |
| Description | Detects when a user accesses resources from two distinct countries within less than 1 hour, indicating potential credential compromise or VPN abuse. |
| Severity | High |
| Tactics | InitialAccess CredentialAccess |
| Techniques | T1078 |
| Required data connectors | NetskopeWebTxConnector |
| Kind | Scheduled |
| Query frequency | 1h |
| Query period | 2h |
| Trigger threshold | 0 |
| Trigger operator | gt |
| Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/NetskopeWebTx/Analytic%20Rules/NetskopeWebtx_Rule5.yaml |
| Version | 1.0.0 |
| Arm template | d1b88716-3cd4-4585-a9a2-2dd2c9b04ecb.json |
let timeWindow = 1h;
NetskopeWebTransactions_CL
| where TimeGenerated > ago(1h)
| where isnotempty(CsUsername) and isnotempty(XCCountry)
| summarize
Countries = make_set(XCCountry),
Locations = make_set(XCLocation),
IPs = make_set(CIp),
MinTime = min(TimeGenerated),
MaxTime = max(TimeGenerated),
EventCount = count()
by CsUsername, bin(TimeGenerated, timeWindow)
| where array_length(Countries) > 1
| extend TimeDiffMinutes = datetime_diff('minute', MaxTime, MinTime)
| where TimeDiffMinutes < 60
| project
TimeGenerated,
User = CsUsername,
DistinctCountries = Countries,
Locations,
SourceIPs = IPs,
TimeDifferenceMinutes = TimeDiffMinutes,
EventCount,
AlertDetails = strcat('User ', CsUsername, ' accessed from ', array_length(Countries), ' countries within ', TimeDiffMinutes, ' minutes')
requiredDataConnectors:
- dataTypes:
- NetskopeWebTransactions_CL
connectorId: NetskopeWebTxConnector
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/NetskopeWebTx/Analytic%20Rules/NetskopeWebtx_Rule5.yaml
version: 1.0.0
status: Available
queryFrequency: 1h
query: |
let timeWindow = 1h;
NetskopeWebTransactions_CL
| where TimeGenerated > ago(1h)
| where isnotempty(CsUsername) and isnotempty(XCCountry)
| summarize
Countries = make_set(XCCountry),
Locations = make_set(XCLocation),
IPs = make_set(CIp),
MinTime = min(TimeGenerated),
MaxTime = max(TimeGenerated),
EventCount = count()
by CsUsername, bin(TimeGenerated, timeWindow)
| where array_length(Countries) > 1
| extend TimeDiffMinutes = datetime_diff('minute', MaxTime, MinTime)
| where TimeDiffMinutes < 60
| project
TimeGenerated,
User = CsUsername,
DistinctCountries = Countries,
Locations,
SourceIPs = IPs,
TimeDifferenceMinutes = TimeDiffMinutes,
EventCount,
AlertDetails = strcat('User ', CsUsername, ' accessed from ', array_length(Countries), ' countries within ', TimeDiffMinutes, ' minutes')
tactics:
- InitialAccess
- CredentialAccess
relevantTechniques:
- T1078
id: d1b88716-3cd4-4585-a9a2-2dd2c9b04ecb
triggerThreshold: 0
triggerOperator: gt
name: Netskope - Impossible Travel Detection (Two Countries in Less Than 1 Hour)
queryPeriod: 2h
severity: High
entityMappings:
- fieldMappings:
- columnName: User
identifier: Name
entityType: Account
kind: Scheduled
description: |
Detects when a user accesses resources from two distinct countries within less than 1 hour, indicating potential credential compromise or VPN abuse.
{
"$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/d1b88716-3cd4-4585-a9a2-2dd2c9b04ecb')]",
"kind": "Scheduled",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/d1b88716-3cd4-4585-a9a2-2dd2c9b04ecb')]",
"properties": {
"alertRuleTemplateName": "d1b88716-3cd4-4585-a9a2-2dd2c9b04ecb",
"customDetails": null,
"description": "Detects when a user accesses resources from two distinct countries within less than 1 hour, indicating potential credential compromise or VPN abuse.\n",
"displayName": "Netskope - Impossible Travel Detection (Two Countries in Less Than 1 Hour)",
"enabled": true,
"entityMappings": [
{
"entityType": "Account",
"fieldMappings": [
{
"columnName": "User",
"identifier": "Name"
}
]
}
],
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/NetskopeWebTx/Analytic%20Rules/NetskopeWebtx_Rule5.yaml",
"query": "let timeWindow = 1h;\nNetskopeWebTransactions_CL\n| where TimeGenerated > ago(1h)\n| where isnotempty(CsUsername) and isnotempty(XCCountry)\n| summarize \n Countries = make_set(XCCountry),\n Locations = make_set(XCLocation),\n IPs = make_set(CIp),\n MinTime = min(TimeGenerated),\n MaxTime = max(TimeGenerated),\n EventCount = count()\n by CsUsername, bin(TimeGenerated, timeWindow)\n| where array_length(Countries) > 1\n| extend TimeDiffMinutes = datetime_diff('minute', MaxTime, MinTime)\n| where TimeDiffMinutes < 60\n| project \n TimeGenerated,\n User = CsUsername,\n DistinctCountries = Countries,\n Locations,\n SourceIPs = IPs,\n TimeDifferenceMinutes = TimeDiffMinutes,\n EventCount,\n AlertDetails = strcat('User ', CsUsername, ' accessed from ', array_length(Countries), ' countries within ', TimeDiffMinutes, ' minutes')\n",
"queryFrequency": "PT1H",
"queryPeriod": "PT2H",
"severity": "High",
"status": "Available",
"subTechniques": [],
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"CredentialAccess",
"InitialAccess"
],
"techniques": [
"T1078"
],
"templateVersion": "1.0.0",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0
},
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
}
]
}