← Back to SOC feed Coverage →

Network Logons with Local Accounts

kql MEDIUM Azure-Sentinel
DeviceLogonEvents
credential-thefthuntingmicrosoftofficial
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Azure-Sentinel →
Retrieved: 2026-05-23T11:00:00Z · Confidence: medium

Hunt Hypothesis

Adversaries may be using a single source IP to authenticate to multiple machines using local accounts to establish persistent access or move laterally within the network. SOC teams should proactively hunt for this behavior to identify potential credential reuse or lateral movement tactics in their Azure Sentinel environment.

KQL Query

DeviceLogonEvents
| where Timestamp > ago(30d)
| where AccountDomain == DeviceName and isnotempty( RemoteIP) and RemoteIP !in ('::1','-', '0.0.0.0') and RemoteIP !startswith "127."
| summarize LogonAttempts = count(), DistinctMachines = dcount(DeviceId), Successes = countif(ActionType == 'Success'), RemoteDeviceName = any(RemoteDeviceName)  by RemoteIP, Protocol, LogonType, AccountName
| order by Successes desc, LogonAttempts desc

Analytic Rule Definition

id: 95a44d0f-b717-4e34-902f-2fad4d6fcbe3
name: Network Logons with Local Accounts
description: |
  This query looks for a large number of network-based authentications using local credentials coming from a single source IP address. High counts of logons involving a large number of distinct machines may identify an attacker beachhead within an enterprise.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceLogonEvents
tactics:
- Lateral movement
query: |
  DeviceLogonEvents
  | where Timestamp > ago(30d)
  | where AccountDomain == DeviceName and isnotempty( RemoteIP) and RemoteIP !in ('::1','-', '0.0.0.0') and RemoteIP !startswith "127."
  | summarize LogonAttempts = count(), DistinctMachines = dcount(DeviceId), Successes = countif(ActionType == 'Success'), RemoteDeviceName = any(RemoteDeviceName)  by RemoteIP, Protocol, LogonType, AccountName
  | order by Successes desc, LogonAttempts desc

Required Data Sources

Sentinel TableNotes
DeviceLogonEventsEnsure this data connector is enabled

MITRE ATT&CK Context

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/Lateral Movement/Network Logons with Local Accounts.yaml