Query Details
id: a2b8c0d1-e6f7-9a3b-4c5d-6e7f8a9b0c1d
name: Non-Interactive Sign-In via TOR or Anonymous Proxy
version: 1.0.0
kind: Scheduled
description: |
Detects non-interactive Azure AD sign-ins from IP addresses tagged as TOR exit nodes,
anonymous proxies, or VPN anonymizers in the ThreatIntelIndicators table (unified TI -
replaces deprecated ThreatIntelligenceIndicator). Attackers use anonymization
infrastructure to hide their true location when replaying stolen refresh tokens. Even if
the underlying credential is legitimate, sign-ins from TOR or proxies represent
significant risk in enterprise environments.
MITRE ATT&CK: T1090 (Proxy), T1090.003 (Multi-hop Proxy), T1528
severity: High
requiredDataConnectors:
- connectorId: AzureActiveDirectory
dataTypes:
- AADNonInteractiveUserSignInLogs
- connectorId: ThreatIntelligence
dataTypes:
- ThreatIntelIndicators
queryFrequency: 15m
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
- DefenseEvasion
- CredentialAccess
- CommandAndControl
relevantTechniques:
- T1090
- T1528
query: |
let TorExitIPs =
ThreatIntelIndicators
| where TimeGenerated > ago(30d)
| where IsActive == true
| where isempty(ValidUntil) or ValidUntil > now()
| where Tags has_any ("tor", "proxy", "anonymizer", "vpn", "anonymity")
| where Pattern has "ipv4-addr:value"
| extend NetworkIP = extract(@"ipv4-addr:value = '([^']+)'", 1, Pattern)
| where isnotempty(NetworkIP)
| summarize AnonymizationType = make_set(Tags) by NetworkIP;
AADNonInteractiveUserSignInLogs
| where TimeGenerated > ago(1h)
| where ResultType == 0
| join kind=inner TorExitIPs on $left.IPAddress == $right.NetworkIP
| project
TimeGenerated,
UserPrincipalName,
AppDisplayName,
IPAddress,
Location,
AnonymizationType,
ConditionalAccessStatus,
AuthenticationRequirement,
CorrelationId,
UniqueTokenIdentifier
| order by TimeGenerated desc
entityMappings:
- entityType: Account
fieldMappings:
- identifier: FullName
columnName: UserPrincipalName
- entityType: IP
fieldMappings:
- identifier: Address
columnName: IPAddress
customDetails:
AnonymizationType: AnonymizationType
AppDisplayName: AppDisplayName
ConditionalAccessStatus: ConditionalAccessStatus
alertDetailsOverride:
alertDisplayNameFormat: "TOR/Proxy Sign-In - {{UserPrincipalName}} from anonymized IP {{IPAddress}}"
alertDescriptionFormat: "User {{UserPrincipalName}} authenticated non-interactively from anonymized IP {{IPAddress}} (TOR/proxy). Possible stolen token replayed from attacker infrastructure."
incidentConfiguration:
createIncident: true
groupingConfiguration:
enabled: true
reopenClosedIncident: false
lookbackDuration: PT5H
matchingMethod: AnyAlert
groupByEntities:
- Account
- IP
groupByAlertDetails: []
groupByCustomDetails: []
This query is designed to detect non-interactive sign-ins to Azure Active Directory (Azure AD) from IP addresses associated with TOR exit nodes, anonymous proxies, or VPN anonymizers. These types of sign-ins can indicate potential security threats, as attackers often use anonymization tools to conceal their true location when using stolen credentials.
Here's a breakdown of the query:
Purpose: The query aims to identify non-interactive sign-ins from anonymized IP addresses, which could suggest unauthorized access attempts using stolen tokens.
Data Sources: It uses data from two main sources:
AADNonInteractiveUserSignInLogs data type, which logs non-interactive user sign-ins.ThreatIntelIndicators data type, which contains information about IP addresses tagged as TOR, proxy, anonymizer, or VPN.Detection Logic:
ThreatIntelIndicators table that are active and tagged with terms like "tor", "proxy", "anonymizer", etc.Alert Configuration:
Security Context:
Overall, this query helps organizations monitor and respond to potential security threats involving anonymized sign-ins, which could indicate malicious activity.

David Alonso
Released: May 29, 2026
Tables
Keywords
Operators