The differences between a local account, domain account, SYSTEM, and service identity
One person can use several accounts, and matching account names can represent different identities. First distinguish local and domain accounts by authority and SID, then compare SYSTEM and service identities locally and on the network.
One person, several accounts
Tunahan is a person; Windows grants permissions to the account being used. One person may have a work account, a local account and a separate administrative account. Those accounts need not have the same permissions. Before saying that Tunahan performed an action, establish which account context was used.
Lesson 01.01 explained why accounts are administered through a shared domain. This lesson asks a different question: do two matching account names represent one identity? Resolve that with three accounts before moving to service identities.
S-1-5-21-101010101-202020202-303030303-1001S-1-5-21-404040404-505050505-606060606-1001S-1-5-21-111111111-222222222-333333333-1105A domain member can refer to the same full domain-account SID; each local user in this example belongs to a different account authority. This does not show matching passwords or granted permissions.
Same name, three account authorities
WS01\tunahan is a local account on WS01. FS01\tunahan is a separate local account on FS01. IYELABS\tunahan is a domain account. Their short names can all be tunahan while their creating and managing authorities differ.
A principal is an entity such as a user, group or computer recognized in Windows security decisions. A SID identifies that principal. These local users have different SIDs; the full domain-account SID can refer to the same account at domain-member resources. A shared domain SID prefix does not make all users one account: the final RID is also needed.
Matching passwords do not merge accounts. Reusing a secret can instead create the risk of separate authorities accepting it for their own accounts. A file permission assigned to one account does not transfer to another account with the same name.
Renaming or recreating an account
Renaming an existing account does not change its principal SID. Deleting it and creating a new account with the old name creates a new principal and SID. A permission tied to the old SID is not given to the new account simply because the name was reused.
An account name alone is therefore insufficient: retain its authority and inspect the SID in the appropriate record. This comparison concerns user accounts; well-known SIDs such as Everyone can have the same value on different devices and should not be confused with these local-user examples.
Identity, session and file permission
Authentication verifies the account using the presented credential. A successful Windows logon establishes a security context and access token. The token carries user and group SIDs; lesson 02.03 examines its structure separately.
Authorization determines whether the requested operation is permitted at a resource. FS01 evaluates its permissions and the effective security context. A correct domain password grants no report READ permission; comparing identities is not a full Windows AccessCheck result.
Distinguishing a matching name in 4624
The two synthetic interactive-logon examples in this lesson both have TargetUserName=tunahan, but different TargetDomainName and TargetUserSid values. Computer identifies the event-producing host. Event producer and account authority are separate concepts: a domain-account session can be recorded on WS01.
Event 4624 establishes a successful target logon session. It does not show matching passwords, current online DC authentication or a particular file read. Now apply the identity distinction to service accounts.
First explain the basic idea in your own words. Then follow the scene; interface names and evidence details are available below.
1. Core mechanism
Windows components / teknik ayrıntılar
The identity chain between the Service Control Manager (SCM), LSA security functions, the service process, and any remote resource it accesses. This lesson compares account authority with local and network context; access-token internals are covered in 02.03, and the service-account lifecycle in 08.04.
Interfaces and specifications
- Local account: the corresponding computer is the security authority; its local SID and assignments have meaning on that host.
- Domain account: the AD domain is its security authority; resource ACLs refer to the account’s full SID, including its RID, rather than the shared domain SID prefix.
- SCM service logon: SCM logs on the configured account, creates an access token, and attaches it to the service process.
- LocalSystem: a highly privileged predefined identity on the local computer; on the network, it presents the computer account's credentials.
- NetworkService: a low-privilege predefined local identity; on the network, it presents the computer account's credentials.
- LocalService: a low-privilege predefined local identity; on the network, it presents anonymous credentials.
- 4624 LogonType 5: a service logon session initiated by SCM on the service host.
A service identity is not a special account type
SCM logs on the account configured for the service and attaches the resulting access token to the service process. The process uses that token when it accesses local objects.
The configured identity may be a predefined account, a regular user account, a managed service account, or a virtual account. The phrase 'service account' alone identifies neither its authority nor its network behavior.
Code running in the process is bounded by the rights in its token; labeling the account as a service identity does not expand that boundary.
Separate the local token from the network identity
LocalSystem is highly privileged on the local host, but a remote resource does not see a forest-wide SYSTEM principal. It sees the computer account's credentials.
NetworkService also acts as the computer account on the network despite its lower local privilege. LocalService presents anonymous credentials. Local privilege alone does not determine network impact.
The remote resource establishes its own logon context and evaluates access against the rights it has granted to the presented principal.
State and data flow
- The service configuration specifies the account under which the service runs.
- SCM logs on that account and creates an access token.
- The token is attached to the service process; local-resource requests are evaluated in that token’s SID/privilege context. The requested access still requires a separate resource decision.
- When the service accesses a remote resource, the selected identity's network-credential behavior applies.
- The remote host makes its own logon and access decisions for the presented principal.
- Analysts correlate local and remote telemetry without losing account-authority or logon-context information.
2. Exploitation
Broken trust assumption
The broken assumption is that a service will perform only its intended application work and will not use the local or network authorizations given to its identity for other resources.
Technical prerequisites
- Permission to run code in the service process or change the service configuration.
- The token attached to the service process includes the rights required for the target local operation.
- For remote impact, the target resource has actually granted the required rights to the computer account or configured domain service account.
Exploitation mechanism
Code running with the service process token can access local resources and may reach remote resources using the identity's supported network credentials. LocalSystem does not confer forest-wide authorization: remote access remains bounded by the rights the target resource grants to the presented computer or domain principal.
High local privilege does not cross the network unchanged
Running code as LocalSystem is powerful on the target host, but a remote resource sees the computer account. If that account has not been granted access, the remote request is denied.
NetworkService can present the same computer identity on the network despite having fewer local privileges. The process owner alone therefore cannot define the impact boundary.
Domain-account impact depends on actual assignments
The impact of a domain service account depends on its memberships, user-right assignments, and relevant resource ACLs. The account's 'service' label creates no additional authorization.
Managed-account password handling is outside this lesson's mechanism. The focus here is how an identity is carried into process and network contexts.
3. Defense & Detection
Telemetry scope
- Audit Logon / Success auditing is required for 4624 service logon records.
- 4624 LogonType 5 shows the service logon launched by SCM; it is not an attack indicator by itself.
- For access to a remote resource, inspect the network-logon context on the remote host as well; the local Type 5 event does not prove remote access.
- Preserve the 4624 Version field; fields such as VirtualAccount, ElevatedToken, and TargetLinkedLogonId depend on Version 2.
Events and relevant fields
- 4624 / TargetUserSid, TargetUserName, TargetDomainName: the principal and authority context of the logon.
- 4624 / TargetLogonId: a correlation key for related events on the same host.
- 4624 / LogonType 5: service logon launched by Service Control Manager.
- 4624 / LogonProcessName, AuthenticationPackageName, ProcessId, ProcessName: context for how the logon was generated; interpret these fields against the event version and provider schema.
- 4624 / Version 2: adds VirtualAccount, ElevatedToken, and TargetLinkedLogonId; do not assume these fields exist in older versions.
Type 5 is context, not a verdict
4624 LogonType 5 reports that a service logon session was created. Normal boot and service restarts produce the same record, so the event alone does not prove malicious intent.
The event becomes useful when compared with the expected service-account-host inventory. TargetDomainName is especially important for distinguishing identical short account names.
Verify remote impact on the remote host
The Type 5 record on the service host identifies the service logon. Telemetry from the remote host shows which principal arrived and what access it received.
LocalSystem and NetworkService are expected to use the computer account on the network, while LocalService is expected to behave anonymously. Do not turn observed field values into a fixed allowlist until they have been verified in a lab on the supported operating-system build and with the relevant collector.
Detection logic · Sigma
title: Beklenmeyen servis logon kimligi
status: experimental
logsource:
product: windows
service: security
detection:
selection:
EventID: 4624
LogonType: 5
condition: selection
fields:
- TargetUserSid
- TargetUserName
- TargetDomainName
- TargetLogonId
- LogonProcessName
- AuthenticationPackageName
- ProcessName
falsepositives:
- Isletim sistemi acilisi ve beklenen servis yeniden baslatmalari
level: lowQuery assumptions
- LogonType can be stored as number or text in the target backend; mapping should be verified.
- The rule selects all service logon records as a starting point; identifying unexpected accounts requires an inventory.
- Version 2 fields are not part of the selection condition, so older records must not be excluded.
- The rule was not run on a real SIEM or data set.
False positives
- Normal service startup during operating-system boot.
- Planned service restart, maintenance and failover operations.
- Expected service logons created by software installation or updates.
Hardening
- Choose the least-privileged local and network identity that each service requires; avoid LocalSystem and broadly authorized domain accounts unless necessary.
- Do not grant interactive logon rights to service identities; constrain user rights and resource ACLs to the intended workload.
- Inventory local and remote dependencies before changing an identity; pilot the change and prepare a rollback path.
- For workloads that require managed passwords, evaluate managed service account options with the product and compatibility considerations in 08.04.
Read the examples
Compare the two examples.
- Account name
- tunahan
- Domain / computer
- WS01
- SID
- S-1-5-21-101010101-202020202-303030303-1001
- Account name
- tunahan
- Domain / computer
- IYELABS
- SID
- S-1-5-21-111111111-222222222-333333333-1105
Same name, different SID. These examples show two distinct security identities. Read the account name together with its domain and SID.
READ THE EXAMPLE TOGETHER
SYNTHETIC TEACHING EXAMPLEWhich account and context does this record show?
4624 · service logon (Event XML, Version 2)
svc-readerThe account name recorded here. A name alone does not establish that accounts from different authorities are identical.
BESIKTASThe domain or computer context of the account. A local account can show the computer name.
S-1-5-21-111111111-222222222-333333333-1201A SID identifies the account independently of its displayed name. Two examples can share a name and have different SIDs.
Read the fields together: account, object, service and result answer different questions. One record is not the system’s entire story.
We are reading a sample record. This does not connect to Windows or verify that an event or an attack occurred.
Scope of this example
This is a synthetic, deliberately incomplete subset of Version 2 fields, not a real Windows or lab record. The synthetic-example values are not product output. The parser locally displays the XML envelope and the namespace, EventID, Version, target account and LogonType values; it does not validate the full Event 4624 Version 2 schema. This record does not prove that a particular service ran or accessed a remote resource.
Open the raw record · EVENT-XML
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Microsoft-Windows-Security-Auditing" />
<EventID>4624</EventID>
<Version>2</Version>
<Channel>Security</Channel>
<Computer>APP01.besiktas.example</Computer>
</System>
<EventData>
<Data Name="TargetUserSid">S-1-5-21-111111111-222222222-333333333-1201</Data>
<Data Name="TargetUserName">svc-reader</Data>
<Data Name="TargetDomainName">BESIKTAS</Data>
<Data Name="TargetLogonId">0x456</Data>
<Data Name="LogonType">5</Data>
<Data Name="LogonProcessName">synthetic-example</Data>
<Data Name="AuthenticationPackageName">synthetic-example</Data>
</EventData>
</Event>READ THE EXAMPLE TOGETHER
SYNTHETIC TEACHING EXAMPLEDoes the same name mean the same account?
4624 · WS01 local account (synthetic)
tunahanThe account name recorded here. A name alone does not establish that accounts from different authorities are identical.
WS01The domain or computer context of the account. A local account can show the computer name.
S-1-5-21-101010101-202020202-303030303-1001A SID identifies the account independently of its displayed name. Two examples can share a name and have different SIDs.
Read the account name together with its authority and SID. A local account and a domain account can share a name while being separate principals.
We are reading a sample record. This does not connect to Windows or verify that an event or an attack occurred.
Scope of this example
This synthetic subset contains course-relevant fields from Microsoft’s 4624 Version 2 documentation; it is not a complete record. The SID and GUID are synthetic, not production data. The parser accepted the record, but real Windows domain values have not yet been verified.
Open the raw record · EVENT-XML
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System><Provider Name="Microsoft-Windows-Security-Auditing"/><EventID>4624</EventID><Version>2</Version><Channel>Security</Channel><Computer>WS01</Computer></System>
<EventData><Data Name="TargetUserSid">S-1-5-21-101010101-202020202-303030303-1001</Data><Data Name="TargetUserName">tunahan</Data><Data Name="TargetDomainName">WS01</Data><Data Name="TargetLogonId">0x7a31</Data><Data Name="LogonType">2</Data><Data Name="AuthenticationPackageName">Negotiate</Data><Data Name="WorkstationName">WS01</Data><Data Name="IpAddress">-</Data><Data Name="LogonGuid">{00000000-0000-0000-0000-000000000000}</Data></EventData>
</Event>READ THE EXAMPLE TOGETHER
SYNTHETIC TEACHING EXAMPLEDoes the same name mean the same account?
4624 · IYELABS domain account (synthetic)
tunahanThe account name recorded here. A name alone does not establish that accounts from different authorities are identical.
IYELABSThe domain or computer context of the account. A local account can show the computer name.
S-1-5-21-111111111-222222222-333333333-1105A SID identifies the account independently of its displayed name. Two examples can share a name and have different SIDs.
Read the account name together with its authority and SID. A local account and a domain account can share a name while being separate principals.
We are reading a sample record. This does not connect to Windows or verify that an event or an attack occurred.
Scope of this example
This synthetic subset uses the same username so that the different authority and SID can be compared. It does not claim password equality or resource access, and it has not been authenticated in a lab.
Open the raw record · EVENT-XML
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System><Provider Name="Microsoft-Windows-Security-Auditing"/><EventID>4624</EventID><Version>2</Version><Channel>Security</Channel><Computer>WS01.iyelabs.example</Computer></System>
<EventData><Data Name="TargetUserSid">S-1-5-21-111111111-222222222-333333333-1105</Data><Data Name="TargetUserName">tunahan</Data><Data Name="TargetDomainName">IYELABS</Data><Data Name="TargetLogonId">0x8b42</Data><Data Name="LogonType">2</Data><Data Name="AuthenticationPackageName">Negotiate</Data><Data Name="WorkstationName">WS01</Data><Data Name="IpAddress">-</Data><Data Name="LogonGuid">{11111111-2222-3333-4444-555555555555}</Data></EventData>
</Event>Two reality checks
- Assumption: SYSTEM is the most powerful account throughout the domain or forest.
- In fact: LocalSystem's broad privilege applies on the local computer. For network access it presents the computer account's credentials, and the remote resource applies only the rights actually granted to that principal.
- Assumption: All services use the same 'service account' security context.
- In fact: SCM can run each service under a configured user, managed, virtual, or predefined account. The local token and network behavior depend on the selected identity.
YOUR TURN
Work through this story.
Go beyond recall: change a condition, read evidence, explain the reason for a decision.
1 / 5 · PREDICT
WS01\tunahan and IYELABS\tunahan share a name. Which statement is correct?
A hint
Consider the authority that created the account, not its displayed name.
Read the answer reasoning
They are separate accounts in separate authorities.
Yes. Sharing a name does not merge the accounts; their SID and authority distinguish them.
2 / 5 · READ EVIDENCE
Which value distinguishes the domain account in this short example?
- Yerel hesap / Local account
- WS01\tunahan
- Domain hesabı / Domain account
- IYELABS\tunahan
A hint
Read the account name together with its context.
Read the answer reasoning
The IYELABS authority
Correct. The comparison distinguishes the account authority alongside its name; it does not show an access outcome.
3 / 5 · PREDICT
A WS01 service runs as LocalSystem. Which credential behavior does it use toward FS01?
A hint
Do not treat local SYSTEM privileges as a forest-wide principal.
Read the answer reasoning
With the WS01 computer-account credentials in this domain-joined example.
FS01 evaluates rights actually assigned to that principal; local SYSTEM power is not carried over.
4 / 5 · READ EVIDENCE
Why cannot this card establish READ on FS01?
- System/Computer
- WS01
- EventData/TargetUserName
- SYSTEM
- EventData/TargetDomainName
- NT AUTHORITY
- EventData/LogonType
- 5
A hint
Which host and logon type produced the record?
Read the answer reasoning
It shows a service logon on WS01; FS01 network principal and resource outcome are separate.
A local service-start record is not evidence of the remote resource operation.
5 / 5 · EXPLAIN
Explain why same-named local/domain accounts are separate, then why a service can use different local and network identities.
A hint
Focus on the credentials seen by FS01.
Read the answer reasoning
WS01\tunahan belongs to the local computer, while IYELABS\tunahan belongs to the domain; they are distinct security principals even though their names match. NetworkService presents the WS01 computer-account credentials on the network, while LocalService presents anonymous credentials. Matching local privilege levels do not make the remote principals or FS01 rights identical.
- I stated that sharing a name does not imply the same account.
- I distinguished local computer and domain authorities.
- I identified NetworkService’s computer-account behavior.
- I distinguished LocalService’s anonymous behavior and target rights.
Your explanation is not automatically graded. Compare the checkpoints with your answer.
Open the case terminal · PowerShell / CMD
Training simulation · Commands and outputs belong to this case.
Read the account name and SID of this session.
Run the prepared script as supplied, or try the everyday commands below.
Ctrl / ⌘ + Enter: run · Shift + Enter: new line
PS C:\Users\tunahan>
Long output: scroll inside the terminal to read more.
Curious? Try everyday commands
Tap a command, then Run. User and network details follow the selected sample computer.
Recent commands in this session
These are learning practices; they do not affect certification exam scores.
Sources
- Microsoft · Service User Accounts
SCM logging on the configured account and attaching the token to the service process. - Microsoft · LocalSystem Account
Local privilege and computer identity behavior on the network. - Microsoft · NetworkService Account
Low local privilege and the computer account's network credentials. - Microsoft · LocalService Account
Low local privilege and anonymous network credential behavior. - Microsoft · Access Tokens
Access token contents; process/thread identity, SIDs, and privileges. - Microsoft · 4624(S) An account was successfully logged on
Event Description, Event Versions, logon types and Field Descriptions. - Microsoft · Security identifiers
How SIDs work; local and domain security authorities. - Microsoft · Local accounts
Introduction and “Local accounts”: how local accounts are defined on a device and how the local security context works. - Microsoft · Security Principals
“How security principals work”, “Security identifiers”, and “Access tokens”. - Microsoft · Credentials Processes in Windows Authentication
“Windows credentials authentication overview”: local SAM and domain/DC authentication paths. - Microsoft · 4624(S): An account was successfully logged on
Event Description, Version 2 XML, New Logon fields, and Account Domain behavior for local accounts. - Microsoft · Windows LAPS overview
Introduction and Benefits: unique per-device local-administrator passwords and rotation.