460 words
2 minutes
User and Machine Accounts

User and Machine Accounts#

Purpose of User Accounts#

User accounts (local or domain) allow individuals or programs to:

  • Log on to systems
  • Access system resources
  • Execute tasks under specific security contexts

Upon login:

  • The system verifies the password
  • Generates an access token containing:
    • Security identifier (SID)
    • Group membership
    • Rights and privileges

These tokens govern access to system resources throughout a session.

Why User Accounts Matter#

  • Users can be assigned to groups to manage access more efficiently.
  • Administrators can assign privileges at the group level instead of individually.
  • Helps with:
    • Simplified access control
    • Easier privilege revocation
    • Reduced risk of misconfigurations

User Account Types#

a. Standard User Accounts#

  • Used by employees or contractors
  • Typically part of Domain Users group
  • Can be:
    • Local accounts (for non-domain systems)
    • Domain accounts (for enterprise environments)

b. Admin Accounts#

  • Elevated privileges for system administration
  • E.g., IT support, system admins, help desk technicians

c. Service Accounts#

  • Used to run background services or applications
  • Often highly privileged
  • Must be carefully managed to prevent misuse

d. Disabled Accounts#

  • Belong to former employees or temporary staff
  • Often retained for audit purposes
  • Typically moved to special OUs like Former Employees
  • Should be deactivated and stripped of privileges

Active Directory (AD) User Accounts#

  • Every user in an organization typically has at least one AD account.
  • Large organizations may have more accounts than actual users.
  • AD helps centralize:
    • User provisioning
    • Access control
    • Group policy management

Security Risks of User Accounts#

  • Misconfigurations can grant unintended privileges
  • Often the primary attack vector in penetration testing
  • Common issues:
    • Weak passwords
    • Password reuse
    • Poor privilege management
    • Lack of account auditing

Organizations should adopt:

  • Security policies
  • User behavior monitoring
  • Defense-in-depth strategies

Local Accounts#

Stored locally on a device (not domain-joined):

  • Only valid for that machine

  • Can manage resources on that host

  • Examples of default local accounts:

AccountDescription
AdministratorFull control over the host. Cannot be deleted/locked. Usually disabled by default on new Windows systems.
GuestTemporary, limited access. Disabled by default. Security risk if enabled.
SYSTEM (NT AUTHORITY\SYSTEM)OS-level account with the highest privileges. Cannot be deleted, does not appear in User Manager. Used internally by Windows.
Network ServiceUsed to run services with limited privileges. Presents computer credentials to network.
Local ServiceRuns services with minimal privileges. Presents anonymous credentials to network.

Domain Users#

  • Centralized in Active Directory
  • Can access shared resources across the domain:
    • File servers
    • Intranet
    • Printers
  • Managed via Group Policy

Key AD User Naming Attributes#

AttributeDescription
UserPrincipalName (UPN)Typically the user’s email address, used for login
ObjectGUIDGlobally unique identifier for the user object
SAMAccountNameLegacy logon name, used by older systems
objectSIDUnique Security Identifier assigned to the user
sIDHistoryStores previous SIDs, helpful in domain migrations

Example: AD User Attributes#

Command: Get-ADUser -Identity htb-student

AttributeValue
DistinguishedNameCN=htb student,CN=Users,DC=INLANEFREIGHT,DC=LOCAL
EnabledTrue
GivenNamehtb
Namehtb student
ObjectGUIDaa799587-c641-4c23-a2f7-75850b4dd7e3
SamAccountNamehtb-student
SIDS-1-5-21-3842939050-3880317879-2865463114-1111
Surnamestudent
UserPrincipalNamehtb-student@INLANEFREIGHT.LOCAL

KRBTGT Account (Special Case)#

  • A service account for the Kerberos Key Distribution Center (KDC)
  • Vital for domain authentication
  • Highly targeted in attacks (e.g., Golden Ticket)
  • Compromise of this account grants unrestricted domain access

Domain-Joined vs Non-Domain-Joined Machines#

CategoryDomain-JoinedNon-Domain-Joined (Workgroup)
ManagementCentralized via AD and Group PolicyManaged locally per machine
Resource AccessUsers can log in from any domain hostAccess limited to local host
Typical UseEnterprise environmentsHome, small offices
ConfigurationPolicy-based and unifiedManual configuration required
ProfilesRoaming or portableTied to local machine

Machine Accounts in AD#

  • Machine accounts are created in AD when a system joins the domain
  • SYSTEM-level access on domain-joined hosts can be leveraged to:
    • Enumerate domain data
    • Launch AD-related attacks
  • SYSTEM access is a powerful foothold, not just for local exploitation
User and Machine Accounts
https://fuwari.vercel.app/posts/active-directory/user-and-machine-accounts/
Author
Yonten
Published at
2025-04-29