Detect Local Accounts in Sumo Logic CSE
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.
MITRE ATT&CK
- Technique
- T1078 Valid Accounts
- Sub-technique
- T1078.003 Local Accounts
- Canonical reference
- https://attack.mitre.org/techniques/T1078/003/
Sumo Detection Query
_sourceCategory=*WinEventLog* OR _sourceCategory=*windows*security*
| where EventCode in ("4720", "4722", "4732", "4624", "4625", "4648")
| parse field=Message "Account Domain:\t*\r" as TargetDomainName nodrop
| parse field=Message "Account Name:\t\t*\r" as TargetUserName nodrop
| parse field=Message "Security ID:\t\t*\r" as SubjectSecurityID nodrop
| parse field=Message "Logon Type:\t\t*\r" as LogonType nodrop
| parse field=Message "Source Network Address:\t*\r" as SourceIpAddress nodrop
| if(isNull(TargetDomainName), "", TargetDomainName) as TargetDomainName
| if(isNull(TargetUserName), "", TargetUserName) as TargetUserName
| if(isNull(LogonType), "", LogonType) as LogonType
| if(isNull(SourceIpAddress), "", SourceIpAddress) as SourceIpAddress
// Identify local accounts: domain is ".", empty, or matches the computer name
| where TargetDomainName = "." OR TargetDomainName = "" OR toLowerCase(TargetDomainName) = toLowerCase(Computer)
// Filter system noise
| where TargetUserName not in ("ANONYMOUS LOGON", "LOCAL SERVICE", "NETWORK SERVICE", "SYSTEM", "DWM-1", "DWM-2", "DWM-3", "UMFD-0", "UMFD-1")
| where !isBlank(TargetUserName)
// Only count 4624 when it's a network or remote interactive logon not from localhost
| where EventCode != "4624" OR (LogonType in ("3", "10") AND SourceIpAddress not in ("127.0.0.1", "::1", "-"))
// Classify event types
| if(EventCode = "4720", "LocalAccountCreated",
if(EventCode = "4722", "LocalAccountEnabled",
if(EventCode = "4732", "AddedToAdministrators",
if(EventCode = "4624", "NetworkLogonLocalAccount",
if(EventCode = "4625", "FailedLogonLocalAccount",
if(EventCode = "4648", "ExplicitCredentialUseLocalAccount", "Other")
)
)
)
)
) as EventType
// Assign risk scores
| if(EventCode = "4720", 3,
if(EventCode = "4722", 2,
if(EventCode = "4732", 4,
if(EventCode = "4624", 2,
if(EventCode = "4625", 1,
if(EventCode = "4648", 3, 1)
)
)
)
)
) as RiskScore
// Detect brute force: 10+ failures per host per 10-minute window
| timeslice 10m
| count(if(EventCode = "4625", 1, null)) as FailCount by Computer, _timeslice
| where EventCode != "4625" OR FailCount >= 10
| if(EventCode = "4625" AND FailCount >= 10, "BruteForceLocalAccount", EventType) as EventType
| if(EventCode = "4625" AND FailCount >= 10, 5, RiskScore) as RiskScore
| fields _messageTime, Computer, EventType, EventCode, RiskScore, TargetUserName, LogonType, SourceIpAddress, FailCount
| sort by _messageTime desc, RiskScore desc Sumo Logic query targeting Windows Security Event Log data to detect suspicious local account activity. Parses event message fields to extract target account domain, username, logon type, and source IP. Identifies local accounts by comparing TargetDomainName to the host name or dot/empty notation, classifies events into risk categories, and flags brute force patterns via 10-minute time bucket aggregation.
Data Sources
Required Tables
False Positives & Tuning
- IT operations teams performing local account audits or bulk account creation as part of server hardening playbooks
- Monitoring or EDR agents that authenticate using local service accounts across managed endpoints, generating repeated Type 3 network logon events
- Windows Server failover cluster nodes authenticating to one another using local administrative accounts, which may produce elevated 4624 Type 3 event volumes
Other platforms for T1078.003
Testing Methodology
Validate this detection against 5 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Create Backdoor Local Admin Account
Expected signal: Security EventID 4720: New local account 'argus_test_backdoor' created (TargetDomainName will match ComputerName). Security EventID 4732: Account added to Administrators group (TargetUserName=Administrators). Security EventID 4722: Account enabled. Process creation events for net.exe and net1.exe (Sysmon EventID 1 or Security EventID 4688).
- Test 2Brute Force Local Administrator Account
Expected signal: 15x Security EventID 4625 (logon failure) with TargetUserName=Administrator, LogonType=3, IpAddress=127.0.0.1. Failure reason 0xC000006D (wrong password) or 0xC000006A. SubStatus 0xC0000064 or 0xC000006A. Events will appear in rapid succession within a 1-minute window.
- Test 3Pass-the-Hash Style Lateral Movement Using Local Account Credentials
Expected signal: Security EventID 4648 (explicit credentials used) on the initiating host with TargetUserName=Administrator, TargetDomainName=<COMPUTERNAME>. Security EventID 4624 (LogonType=3) on the target with TargetUserName=Administrator, TargetDomainName=<COMPUTERNAME>, IpAddress of initiating host. Sysmon EventID 3: network connection to destination port 445.
- Test 4Enable and Use Disabled Built-in Administrator Account via Registry
Expected signal: Security EventID 4722 (local account enabled) with TargetUserName=Administrator. Security EventID 4723 or 4724 (password change/reset) for the Administrator account. Process creation events for net.exe (Sysmon EventID 1). If the account is then used for logon, EventID 4624 with TargetUserName=Administrator and LogonType matching the access method.
- Test 5Linux Local Account Abuse — Create Privileged User and Switch Context
Expected signal: Syslog/auth.log: useradd command execution, new user creation entry. /var/log/auth.log or /var/log/secure: PAM authentication events for su session. auditd (if configured): syscall audit records for useradd (execve), usermod (execve), write to /etc/passwd and /etc/shadow. Sysmon for Linux (if deployed): process creation events for useradd, usermod, chpasswd, su.
References (13)
- https://attack.mitre.org/techniques/T1078/003/
- https://attack.mitre.org/techniques/T1078/
- https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4720
- https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4624
- https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4732
- https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4648
- https://www.microsoft.com/en-us/security/blog/2022/05/09/ransomware-as-a-service-understanding-the-cybercrime-gig-economy-and-how-to-protect-yourself/
- https://www.netscout.com/blog/asert/stolen-pencil-campaign-targets-academia
- https://www.malwarebytes.com/blog/news/2017/12/self-propagating-emotet-modules
- https://www.mandiant.com/resources/apt32-targeting-vietnam
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1078.003/T1078.003.md
- https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/plan/security-best-practices/attractive-accounts-for-credential-theft
- https://www.cisa.gov/sites/default/files/publications/AA22-152A_Wiper_Malware_Analysis_508C.pdf
Unlock Pro Content
Get the full detection package for T1078.003 including response playbook, investigation guide, and atomic red team tests.