DefensiveHub

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

02:13:074720Account createdsvc_backup202:13:094722Enabled02:13:154724Password set02:14:024732Added to Administrators02:31:404624RDP logon (Type 10)Each event alone could be normal. All five in a row at night are not.
A teaching scenario written for this article. Machine and account names are not real.

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.

Sentinel · SecurityEventSplunk Add-on for Windows
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, Computer
index=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 <= 3600

Splunk 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:

Hunting Backdoor Accounts with Windows Security Logs (in Arabic)

27 January 2026 · on the @ahmedeidsec channel

IT work or an attacker?

Before opening an incident, answer these questions. Every “yes” moves the result closer to an attacker:

Created out of hours or with no ticket?+1Creator not on the identity team?+1Added to an admins group right away?+2Named like a service account to blend in?+1Used over RDP or from an unexpected machine?+2
The numbers are illustrative, not official scoring. What matters is asking all of these questions, not just one.

You found one. What now?

  1. Don’t delete the account right away. Disable it first: deletion destroys information you need for the investigation.
  2. Remove it from every group, and record exactly where it was.
  3. Work backwards: the account that created it (SubjectUserName in 4720) is probably compromised. That’s what matters most.
  4. Look for its siblings: other accounts created around the same time, or new scheduled tasks and services.
  5. 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.

SourceWho created it?ReasonIs there a ticket?PrivilegesAdded where?UsageLogged on from?DecisionNormal or incident?

  1. 1Who created the account, and from which machine? Is the source approved?
  2. 2Is there a request or change ticket that justifies the account?
  3. 3Was it added to a sensitive group? Does that fit its purpose?
  4. 4Check 4624: when did the account log on, and from where?
  5. 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

Ahmed Eid. I write about the defensive security work I do every day, and explain it in Arabic to save you time.