How the attack works
Every domain and every Windows computer has a built-in Guest account with the well-known relative identifier 501. Microsoft describes it as a user account for people who do not have individual accounts. It does not require a password, although it can have one, and unlike an anonymous connection it is a real account that can be used to sign in interactively. By default Guest is a member of the Everyone and the Guests groups, and the Guest account of a domain is also a member of Domain Guests and Domain Users. It should be disabled, and in a domain that is managed with care it is.
That makes the account a ready-made back door. An attacker who has the right to change accounts enables Guest instead of creating a new user. No account is created, so the events and reports that watch for new accounts stay silent, and a review of the user list shows an account that has always been there. Once enabled, the account authenticates to everything that grants access to Everyone, Guests or Domain Users, with an empty password or with one the attacker sets.
The domain controller logs the step as event 4722, a user account was enabled, with the SID of the account in the Target Account field. The SID of the Guest account always ends in 501, whatever name the account was given. The same event with the same ending is written on member servers and workstations for their local Guest account when their Security logs are collected.
What an attacker needs
- The right to enable user accounts in the domain, which members of Domain Admins and Account Operators have, or administrator rights on the computer for its local Guest account.
Impact
The attacker has an account that existed before the intrusion, needs no password and is a member of Domain Users in the domain. It gives access to every resource that authenticated users, Domain Users, Guests or Everyone can reach, and it is a way back into the network after the passwords of the accounts used in the intrusion were reset.
Detection rules
Built-in Guest Account Enabled
Detects event 4722 (a user account was enabled) for an account whose SID ends in -501, the well-known relative identifier of the built-in Guest account. The match on the SID covers renamed and localized accounts. Every domain and every Windows computer has this account. It does not require a password, and the Guest account of a domain is by default a member of Domain Guests and Domain Users. Enabling it gives an attacker a working account without creating one, so nothing that watches for new accounts reports it. On a domain controller the event concerns the Guest account of the domain. On member servers and workstations it concerns the local Guest account. The account that enabled it is in SubjectUserName. Requires Audit User Account Management.
title: Built-in Guest Account Enabled
id: 8b8dbfa7-f4e0-4979-aaf7-f2620ed946ba
status: experimental
description: >-
Detects event 4722 (a user account was enabled) for an account whose SID
ends in -501, the well-known relative identifier of the built-in Guest
account. The match on the SID covers renamed and localized accounts.
Every domain and every Windows computer has this account. It does not
require a password, and the Guest account of a domain is by default a
member of Domain Guests and Domain Users. Enabling it gives an attacker a
working account without creating one, so nothing that watches for new
accounts reports it. On a domain controller the event concerns the Guest
account of the domain. On member servers and workstations it concerns
the local Guest account. The account that enabled it is in
SubjectUserName. Requires Audit User Account Management.
references:
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4722
- https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/understand-security-identifiers
- https://attack.mitre.org/techniques/T1078/001/
author: Forestall
date: 2026-11-18
tags:
- attack.persistence
- attack.initial-access
- attack.t1078.001
logsource:
product: windows
service: security
detection:
selection:
EventID: 4722
TargetSid|endswith: '-501'
condition: selection
falsepositives:
- Kiosk or lab computers on which the local Guest account is enabled on purpose, and images that enable it during setup. Exclude those computers. For the Guest account of a domain there is no routine reason.
level: medium
False positives
- Kiosk or lab computers on which the local Guest account is enabled on purpose, and images that enable it during setup. Exclude those computers. For the Guest account of a domain there is no routine reason.
Detection logic
Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.
Guest account enabled and then used to authenticate
Enabling the account is preparation. The use that follows shows where the attacker comes from and what the account reaches. An enabling followed by a ticket request or a logon of the Guest account ties the change to a source address.
- The Guest account is enabled: event 4722 with a
TargetSidthat ends in -501. Keep the time,TargetUserNameandSubjectUserName. - After that a ticket is requested for the account: event 4768 with a
TargetSidthat ends in -501. Read the source inIpAddress. - Or the account logs on: event 4624 with a
TargetUserSidthat ends in -501. ReadLogonType,IpAddressandWorkstationName.
Events472247684624
LimitsA logon of the Guest account without the enabling event is the stronger single finding and does not need the sequence. Logons of a local Guest account on a member computer look the same and have to be told apart by the computer that wrote the event.
Triage
- Confirm from TargetSid that the account is the Guest account (the SID ends in -501) and read from the computer name whether it is the account of the domain (event on a domain controller) or a local account.
- Identify who enabled it (SubjectUserName, SubjectLogonId) and from where, using the logon behind the logon ID.
- Look for changes to the account around the same time, such as a password reset (event 4724) and added group memberships (events 4728, 4732, 4756).
- Look for use of the account after the change, that is logons (event 4624) and ticket requests (event 4768) with the Guest account as target.
- Ask for a reason. There is none in a current environment, so an enabling without a ticket is treated as hostile.
Response
Once the attack is confirmed:
- Disable the Guest account again and reset its password.
- Remove the account from every group other than its defaults.
- Disable or reset the account that enabled it and find out how its rights were obtained.
- Review the logons of the Guest account and the resources it reached since the enabling, and investigate those systems.
- Check the other domains of the forest and the local Guest accounts of servers for the same change.
Mitigation
- Keep the Guest account of the domain and the local Guest accounts disabled, and enforce the setting for local accounts with the security option Accounts, Guest account status.
- Deny the Guests group the right to log on locally, through Remote Desktop and from the network on servers and domain controllers, so that an enabled Guest account still cannot sign in there.
- Limit the right to enable accounts to the administrators who need it, and keep the Account Operators group empty.
- Check the state of the Guest accounts on a schedule and compare it with the baseline.
- Enable the audit subcategory Audit User Account Management on domain controllers and on member computers.
Frequently asked questions
Why match the SID and not the account name Guest?
The account can be renamed and has a different name in other language versions of Windows, but its relative identifier is always 501. Event 4722 carries the SID of the account that was enabled in the Target Account field, so a SID that ends in -501 identifies the Guest account in every domain and on every computer.
Does the Guest account need a password?
No. Microsoft states that the Guest account does not require a password, but it can have one. An enabled Guest account with an empty password can be used by anyone who can reach a logon surface that accepts it, which is why enabling it matters even when nobody set a password.
What can an enabled Guest account of a domain access?
By default the domain Guest account is a member of the Guests and Domain Guests groups and also of Domain Users, and Everyone includes it. It reaches what those groups were granted. It is not part of Authenticated Users, so resources that are limited to that identity stay closed to it.
Does the rule also report local Guest accounts?
Yes, when the Security logs of member servers and workstations are collected. Event 4722 is generated there for local accounts, and the local Guest account has a SID that ends in -501 as well. The computer that wrote the event tells the two apart.