T1078.003

Local Accounts

Adversaries may obtain and abuse credentials of a local account as a means of gaining Initial Access, Persistence, Privilege Escalation, or Defense Evasion. Local accounts are those configured by an organization for use by users, remote support, services, or for administration on a single system or service. Adversaries may target dormant local accounts, brute-force local admin credentials, create new local accounts, or reuse harvested credentials across multiple systems. This technique is commonly observed in ransomware operations, APT lateral movement, and post-exploitation frameworks such as Cobalt Strike.

Microsoft Sentinel / Defender
kusto
// T1078.003 - Local Account Abuse Detection
// Detects suspicious use of local accounts including new account creation, logons from unexpected sources, and lateral movement indicators
let SuspiciousLocalAccountEvents = union
(
    // New local account creation
    SecurityEvent
    | where TimeGenerated > ago(24h)
    | where EventID == 4720
    | where TargetDomainName == "."
        or TargetDomainName =~ Computer
        or TargetDomainName == ""
    | extend EventType = "LocalAccountCreated", RiskScore = 3
    | project TimeGenerated, Computer, EventType, RiskScore,
              TargetUserName, SubjectUserName, SubjectLogonId,
              Activity, EventID
),
(
    // Local account enabled (possibly reactivating dormant account)
    SecurityEvent
    | where TimeGenerated > ago(24h)
    | where EventID == 4722
    | where TargetDomainName == "."
        or TargetDomainName =~ Computer
        or TargetDomainName == ""
    | extend EventType = "LocalAccountEnabled", RiskScore = 2
    | project TimeGenerated, Computer, EventType, RiskScore,
              TargetUserName, SubjectUserName, SubjectLogonId,
              Activity, EventID
),
(
    // Local account added to local Administrators group
    SecurityEvent
    | where TimeGenerated > ago(24h)
    | where EventID == 4732
    | where TargetDomainName == "Administrators" or TargetUserName =~ "Administrators"
    | extend EventType = "AddedToAdministrators", RiskScore = 4
    | project TimeGenerated, Computer, EventType, RiskScore,
              TargetUserName, SubjectUserName, SubjectLogonId,
              Activity, EventID
),
(
    // Successful local logon (Type 3 network or Type 10 remote interactive) using local account
    SecurityEvent
    | where TimeGenerated > ago(24h)
    | where EventID == 4624
    | where LogonType in (3, 10)
    | where TargetDomainName == "."
        or TargetDomainName =~ Computer
        or TargetDomainName == ""
    | where TargetUserName !in~ ("ANONYMOUS LOGON", "LOCAL SERVICE", "NETWORK SERVICE", "SYSTEM", "DWM-1", "DWM-2", "DWM-3", "UMFD-0", "UMFD-1")
    | where IpAddress !in ("127.0.0.1", "::1", "-")
    | extend EventType = "NetworkLogonLocalAccount", RiskScore = 2
    | project TimeGenerated, Computer, EventType, RiskScore,
              TargetUserName, SubjectUserName = "", SubjectLogonId = "",
              Activity, EventID
),
(
    // Explicit credential use with local account (runas / pass-the-hash style)
    SecurityEvent
    | where TimeGenerated > ago(24h)
    | where EventID == 4648
    | where TargetDomainName == "."
        or TargetDomainName =~ Computer
        or TargetDomainName == ""
    | where TargetUserName !in~ ("ANONYMOUS LOGON", "LOCAL SERVICE", "NETWORK SERVICE", "SYSTEM")
    | extend EventType = "ExplicitCredentialUseLocalAccount", RiskScore = 3
    | project TimeGenerated, Computer, EventType, RiskScore,
              TargetUserName, SubjectUserName, SubjectLogonId,
              Activity, EventID
),
(
    // Failed logon attempts against local accounts (brute force indicator)
    SecurityEvent
    | where TimeGenerated > ago(24h)
    | where EventID == 4625
    | where TargetDomainName == "."
        or TargetDomainName =~ Computer
        or TargetDomainName == ""
    | where TargetUserName !in~ ("ANONYMOUS LOGON", "LOCAL SERVICE", "NETWORK SERVICE", "SYSTEM")
    | extend EventType = "FailedLogonLocalAccount", RiskScore = 1
    | project TimeGenerated, Computer, EventType, RiskScore,
              TargetUserName, SubjectUserName = "", SubjectLogonId = "",
              Activity, EventID
)
| sort by TimeGenerated desc;
// Aggregate failed logon attempts to detect brute force
let BruteForce =
    SecurityEvent
    | where TimeGenerated > ago(24h)
    | where EventID == 4625
    | where TargetDomainName == "." or TargetDomainName =~ Computer or TargetDomainName == ""
    | where TargetUserName !in~ ("ANONYMOUS LOGON", "LOCAL SERVICE", "NETWORK SERVICE", "SYSTEM")
    | summarize FailCount = count(), DistinctUsers = dcount(TargetUserName) by Computer, bin(TimeGenerated, 10m)
    | where FailCount >= 10
    | extend EventType = "BruteForceLocalAccount", RiskScore = 5, TargetUserName = "(multiple)", SubjectUserName = "", SubjectLogonId = "", Activity = "Multiple failed logons", EventID = 4625;
union SuspiciousLocalAccountEvents, BruteForce
| sort by TimeGenerated desc, RiskScore desc
high severity medium confidence

Data Sources

Logon: Logon User Account: User Account Creation User Account: User Account Modification Windows Security Event Log

Required Tables

SecurityEvent

False Positives

  • IT helpdesk creating local accounts for break-glass or emergency access scenarios (expected during documented maintenance windows)
  • Software installation procedures that create local service accounts (e.g., SQL Server, antivirus agents, monitoring tools installing their own local accounts)
  • Remote management tools (e.g., LAPS, PDQ Deploy, SCCM) authenticating to endpoints using the local administrator account for legitimate patching or management tasks
  • Developers or QA engineers logging into test machines with local credentials instead of domain accounts
  • Backup agents or monitoring services that authenticate via local accounts from internal management servers

Unlock Pro Content

Get the full detection package for T1078.003 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections