Backdoor Accounts: How Attackers Make Sure They Keep Access
Attackers want a way back after eviction, and the easiest is a new account in an admin group. How to detect it in Windows Security logs, and what to do next.
Ahmed Eid 6 min read
- Topic
- Threat Hunting
- Level
- Beginner to intermediate
- Techniques
- T1136 · T1098
- Data sources
- 4720 · 4722 · 4724 · 4732 · 4624
- You leave with
- A query linking account creation to group membership, and questions that separate IT work from an attacker

18 minutes on DC01 at 2 AM
An attacker inside your environment knows the stolen password could change tomorrow. So the first thing they do after getting admin rights is build a backdoor: a new account with a dull name like svc_backup2, placed in an admins group, ready for whenever they want to come back.
The idea
ATT&CK calls this T1136 (Create Account) when a new account is created, and T1098 (Account Manipulation) when an existing account is changed or added to a group. Both sit under Persistence, and T1098 also sits under Privilege Escalation.
The advantage for a defender is that this activity doesn’t hide in memory and doesn’t need an EDR to see. Windows records every step itself, provided the audit policy is set correctly.
The events that tell the story
- 4720: a user account was created. This is the first event, and it carries the new account’s SID in
TargetSid. - 4722: the account was enabled. Some tools create new accounts disabled, so this often follows 4720 immediately.
- 4724: an attempt to reset another account’s password. When it lands seconds after 4720, it’s the same person finishing the account setup.
- 4728, 4732 and 4756: a member was added to a global, local or universal security group, respectively. This is where the account becomes dangerous. Its SID is in
MemberSid. - 4624: the account was actually used. Logon Type 10 means RDP, and 3 means over the network.
Events for domain accounts are logged on the domain controller. Local accounts are logged on the machine itself, which is why collecting logs from endpoints, not only DCs, matters.
First things first: the audit policy
Many environments discover during an incident that these events were never being logged. You need both of these enabled for Success, and ideally for Success and Failure:
- Audit User Account Management: this generates 4720, 4722, 4724 and 4738.
- Audit Security Group Management: this generates 4728, 4732 and 4756.
Try it yourself: create a test account in a lab, add it to a group, and confirm the events reach your SIEM before you rely on any query.
The query: a new account joins a group within its first hour
Each event alone could be routine IT work. What makes the difference is the correlation: the same SID was created, then added to a security group within an hour.
let created = SecurityEvent
| where TimeGenerated > ago(14d)
| where EventID == 4720
| project CreatedTime = TimeGenerated, AccountSid = TargetSid,
NewAccount = TargetUserName, CreatedBy = SubjectUserName, Computer;
SecurityEvent
| where TimeGenerated > ago(14d)
| where EventID in (4728, 4732, 4756)
| project AddedTime = TimeGenerated, AccountSid = MemberSid,
Group = TargetUserName, AddedBy = SubjectUserName
| join kind=inner created on AccountSid
| where AddedTime between (CreatedTime .. CreatedTime + 1h)
| project CreatedTime, AddedTime, NewAccount, Group, CreatedBy, AddedBy, Computerindex=wineventlog EventCode IN (4720, 4728, 4732, 4756) earliest=-14d
| eval sid=if(EventCode=4720, Target_SID, Member_SID)
| eval stage=if(EventCode=4720, "created", "added")
| stats min(_time) as first_seen max(_time) as last_seen
values(stage) as stages values(Group_Name) as groups values(src_user) as by_user by sid
| where mvcount(stages)=2 AND last_seen - first_seen <= 3600Splunk field names vary by add-on version and collection method, so check them against a real event in your environment first. If you get a result, follow up with 4624 for the same account: which machine did it log on from, and when?
Video walkthrough
This topic is covered in detail and hands-on on the channel, in Arabic, with examples from Windows Security logs:
IT work or an attacker?
Before opening an incident, answer these questions. Every “yes” moves the result closer to an attacker:
You found one. What now?
- Don’t delete the account right away. Disable it first: deletion destroys information you need for the investigation.
- Remove it from every group, and record exactly where it was.
- Work backwards: the account that created it (
SubjectUserNamein 4720) is probably compromised. That’s what matters most. - Look for its siblings: other accounts created around the same time, or new scheduled tasks and services.
- Learn from it: turn the query into an analytics rule, and make any addition to an admins group fire an immediate alert.
Not every new account is a backdoor
In a real environment you’ll see new accounts every day. To avoid drowning in alerts, learn your normal sources:
- HR onboarding systems and identity tools that create accounts automatically.
- Service accounts for a new application, with a change ticket behind them.
- IT teams during working hours.
It’s better to keep a list of approved accounts and sources and exclude them in a documented way than to turn off the whole rule. Review that list regularly, because an attacker can use a stolen approved account.
- 1Who created the account, and from which machine? Is the source approved?
- 2Is there a request or change ticket that justifies the account?
- 3Was it added to a sensitive group? Does that fit its purpose?
- 4Check 4624: when did the account log on, and from where?
- 5If all is normal, document it. If not, open an incident and start the response.
The same idea in the cloud
An attacker doesn’t need a domain controller to persist. ATT&CK splits T1136 into Local Account (T1136.001), Domain Account (T1136.002) and Cloud Account (T1136.003). In Microsoft Entra ID, the audit logs are where you review user creation and role changes.
There’s also a quieter route: rather than a new account, the attacker adds a secret or certificate to an existing app, which is T1098.001 (Additional Cloud Credentials). You can see it in the Password Spray scenario on the ATT&CK Matrix.
Reducing the opportunity
Detection matters, but it’s better still to make the step itself harder:
- Limit the number of accounts that can create users or change groups.
- Use Windows LAPS so the local admin password isn’t shared across machines.
- Use Privileged Identity Management for high-privilege roles in Entra ID, so the privilege exists only when it’s needed.
- Review the members of admin groups regularly.
- Ship logs to a central location, so wiping them from the machine doesn’t destroy the evidence.
References
- Audit User Account Management and Audit Security Group Management on Microsoft Learn.
- MITRE ATT&CK T1136 and T1098.
- The episode on YouTube.