Skip to content
Pwnversity
AD-PERSISTexpert · 10 min · upd. 2026-11

Persistence in Active Directory

T1558.001T1558.002T1003.006T1207T1098

After compromising the domain, the attacker’s goal is not to lose access even if passwords are changed, hosts are reinstalled, or the initial intrusion is detected. AD offers extraordinarily powerful persistence because its trust rests on long-lived cryptographic keys (krbtgt, service keys, certificates) that are rarely rotated and that let you forge arbitrary authentication. A Golden Ticket or a stolen CA key can grant months of invisible access. The broken invariant: a credential forged with one of those keys is valid, without re-exploiting anything. That’s why cleaning a compromised domain is far harder than detecting the compromise.

flowchart LR
    DC["DCSync: krbtgt hash"] -->|"ticketer / kerberos::golden"| GT["Golden Ticket<br/>(any user, years)"]
    GT --> ACC["persistent domain access"]
    CA["CA private key"] -->|"certipy forge"| GC["Golden Certificate"]
    GC --> ACC
  • Who attacks: someone who has already compromised the domain (Domain Admin or equivalent, access to a DC or the CA) and wants long-term access.
  • What it breaks: that authentication rests on long-lived secrets. Whoever steals the krbtgt key forges TGTs for anyone indefinitely; whoever steals a service account’s key forges tickets for that service; whoever steals the CA private key forges certificates for anyone.
  • What it gains: persistent and often invisible access, resistant to password changes and partial cleanup.
  • Why it’s so hard to eradicate: none of these techniques requires re-exploiting anything. Eradicating means rotating the secrets, sometimes twice, and assuming that a single undetected persistence reopens everything.
  • krbtgt: signs all the domain’s TGTs. Its hash lets you forge TGTs (Golden Ticket). Almost never rotated.
  • Service/computer account keys: sign the TGS of their service. Enable Silver Tickets.
  • CA private key: signs certificates. Enables Golden Certificates.

The krbtgt account keeps a history of its last two passwords. Resetting it once leaves tickets signed with the previous one still valid (and a DC that hasn’t replicated yet can use the old one). It must be reset twice, with an interval for replication to complete, to invalidate all Golden Tickets. This is official Microsoft guidance (the New-KrbtgtKeys.ps1 script) and CISA’s (CM0050) after an AD incident.

Technique Secret it uses Stealth / note
Golden Ticket krbtgt hash Forges a TGT for anyone, years
Silver Ticket service/computer key Doesn’t touch the DC (very stealthy), one service
Diamond Ticket krbtgt + legitimate TGT Modifies a real TGT, evades “impossible ticket” detection
Sapphire Ticket krbtgt + real account’s PAC Uses a legitimate PAC, even stealthier
DCSync rights replication ACL Re-dump hashes whenever, without being DA
DCShadow rogue DC registration Seeds changes without the normal logs
AdminSDHolder / ACL backdoor ACL SDProp reapplies the permission hourly: “revives”
Golden Certificate CA key Survives password resets
Skeleton Key in-memory DC patch Volatile (doesn’t survive reboot)

With the krbtgt account hash (from a DCSync), you forge a TGT for any user, with any group membership, valid for years:

Ventana de terminal
# get the krbtgt
secretsdump.py corp.local/da:'Passw0rd!'@dc01.corp.local -just-dc-user krbtgt
# forge and inject (impacket)
ticketer.py -nthash <krbtgt_hash> -domain-sid <domain-SID> -domain corp.local Administrator
export KRB5CCNAME=Administrator.ccache

With a service/computer account hash, you forge a TGS directly for that service (CIFS, HTTP, MSSQL) without going through the DC → no KDC traffic, very stealthy. Persistent access to a specific service:

Ventana de terminal
ticketer.py -nthash <computer_hash> -domain-sid <SID> -domain corp.local \
-spn cifs/srv-app.corp.local Administrator

Stealthier than the Golden: instead of forging from scratch, Diamond modifies a legitimate TGT (requests a real one and rewrites its PAC with the krbtgt key) and Sapphire uses the PAC of a real, privileged account. They evade detections that look for “impossible” tickets (10-year lifetimes, groups the account doesn’t have).

Granting a controlled account replication rights (DS-Replication-Get-Changes + -All) lets you re-dump hashes (including krbtgt) whenever you want, without being DA. A discreet, powerful ACL (see ACL abuse):

Ventana de terminal
dacledit.py -action write -rights DCSync -principal jdoe -target-dn 'DC=corp,DC=local' \
corp.local/da:'Passw0rd!'@dc01.corp.local

Registering a controlled machine as a rogue DC and replicating malicious changes into the directory (adding SID history, changing memberships, seeding backdoors) without leaving the normal modification logs. Stealthy directory-level persistence (mimikatz lsadump::dcshadow).

Modifying the ACL of the AdminSDHolder object (the permission template for protected groups): every hour, SDProp reapplies those permissions to all privileged groups → you grant yourself access that “revives” even if removed. Same with seeded ACLs (GenericAll over DA, WriteDacl over the domain for DCSync).

  • Golden Certificate: steal the CA key → forge certificates for anyone (certipy forge), or keep a PFX of a privileged account. Survives password resets (see AD CS).
  • Shadow Credentials seeded over privileged accounts (see Shadow Credentials).
  • GPO backdoor (see GPO abuse), hidden accounts/SPNs, Skeleton Key (in-memory DC patch, volatile).
  1. After DA: DCSync the krbtgt → Golden Ticket (the quintessential domain persistence).
  2. Seed a discreet, distinct layer: DCSync rights or an AdminSDHolder ACL backdoor.
  3. For a specific, stealthy service: Silver Ticket.
  4. If there’s a CA: Golden Certificate (survives password rotation).
  5. Document each seeded persistence so you can remove it when the engagement ends.
  • mimikatz (kerberos::golden, lsadump::dcsync, lsadump::dcshadow, misc::skeleton).
  • impacket (ticketer.py, secretsdump.py, dacledit.py).
  • Rubeus (golden/silver/diamond), Certipy (golden certificate), PowerView (ACL backdoors).

Persistent and often invisible access to the domain, resistant to password changes and partial cleanup. It’s what turns an incident into a long-term compromise; its existence forces drastic eradication.

  • Golden/Silver tickets: TGT/TGS used without a prior AS-REQ (4769 without the matching 4768), anomalous lifetimes (10 years), RC4 encryption, impossible SIDs/groups in the PAC.
  • DCSync from a non-DC principal (4662 with the replication GUID) — high-fidelity detection.
  • DCShadow: ephemeral registration of a new nTDSDSA/server in the Configuration partition; replication from an unexpected source.
  • AdminSDHolder and domain ACLs (5136); accounts that reappear in protected groups after removal.
  • Auditing of replication (4662), of changes to sensitive objects (5136 over AdminSDHolder/domain) and of Kerberos (4768/4769 with encryption type and AS/TGS correlation).
  • Microsoft Defender for Identity (Golden Ticket, DCSync, DCShadow detection).
  • Rotate krbtgt TWICE (with an interval for replication) → invalidates all existing Golden Tickets. An essential step after a DC compromise; use Microsoft’s script or CISA’s (CM0050), verifying replication health between resets.
  • Restrict replication rights to the DCs; audit domain and AdminSDHolder ACLs regularly.
  • gMSA and long passwords on service accounts (mitigates Silver Tickets by cracking); AES over RC4.
  • Protect the CA (key in an HSM, auditing) to cut off Golden Certificates; review Shadow Credentials.
  • Tiering/PAW, Protected Users and continuous monitoring.

After a domain compromise: rotate krbtgt ×2, reset all privileged and service accounts, review AdminSDHolder and ACLs, reissue/revoke certificates if the CA fell, delete seeded accounts/SPNs/GPOs/Shadow Credentials, and rebuild the DCs if there was DCShadow or Skeleton Key. Assume that one undetected persistence reopens everything.

  • Golden Ticket, DCSync, DCShadow and Skeleton Key are mimikatz TTPs (MITRE T1558.001 Golden, T1558.002 Silver, T1003.006 DCSync, T1207 DCShadow, T1098 Account Manipulation).
  • APT29, APT28, FIN6 and ransomware groups use Golden Tickets and DCSync to persist after the initial compromise.
  • Double krbtgt rotation is official Microsoft and CISA guidance after an AD incident, precisely because of Golden Tickets.
  • Golden Ticket with the krbtgt hash (forge + use).
  • Silver Ticket with a service/computer key (stealthy, doesn’t touch the DC).
  • Diamond/Sapphire to evade forged-ticket detection.
  • DCSync rights granted to a controlled account.
  • DCShadow to seed changes without normal logs.
  • AdminSDHolder / ACL backdoors (DCSync, GenericAll over DA).
  • Golden Certificate (CA key) / seeded Shadow Credentials.
  • Persistences documented and removed at closeout.
  • Blue: was krbtgt rotated ×2 and are replication/AdminSDHolder audited?