AD Rights Management Service (Part 3): The Forgery Crosses the Trust

Key Takeaways

  • A stolen AD RMS Server Licensor Certificate (SLC) private key reaches past its own deployment. Across a Trusted User Domain (TUD), it forges identities that the trusting deployment honors, and that deployment opens its own documents for those forged identities.

  • Once an attacker holds a deployment's SLC private key, a Trusted User Domain (TUD) becomes the blast-radius multiplier: it causes a trusting deployment to honor forged identities and issue licenses for its own content. A Trusted Publishing Domain (TPD) does not expand that attacker's existing access, although importing one creates a separate key-custody risk by placing the source deployment's private key in another environment.

  • It works out of the box: A TUD trusts all email domains by default, and I reproduced the result with Security Identifier (SID) trust off and the TPD removed. Scoping a TUD to the partner's email domains narrows the reach, but an attacker can still forge any identity in those domains.

  • The SLC key cannot be rotated, so keep trusts few and reviewed, and alert when the account requesting a license differs from the identity on the certificate it presents.

Where Part 2 left off

Part 2 of our AD RMS series ended with one deployment owned completely. A member of the AD RMS Service Group, a small and highly privileged group, exported the private key behind the deployment's Server Licensor Certificate (SLC) over the web-services interface, with no interactive logon to the server. That private key signs everything the deployment issues. With a copy of it I decrypted protected documents offline and forged a Rights Account Certificate (RAC) for any user the deployment would ever certify. On the deployment that issued the key, you could read any protected document as anyone.

The obvious question is how far that key reaches. An SLC carries a validity window of about 255 years (Microsoft's documentation lists the SLC lifetime as 250 years; the issued certificate's actual window, December 2002 to March 2258, runs closer to 255), and the private key beneath it is one no organization can afford to rotate, because rotating it would invalidate every document already protected. That is the full exposure when only one deployment is in play. 

But AD RMS is built to connect deployments. A trust lets a document protected in one place be opened by a user coming from another, which is how content moves across a merger, a partner relationship, or separate business units. That trust is the subject of Part 3, and wherever it exists, a single stolen private key stops being a one-deployment problem.

All of this assumes an attacker who already holds a deployment's SLC private key, the compromise from Part 2, and the cross-deployment reach it enables is the trust model working as designed.

Everything below is proven in a purpose-built lab, and each claim carries its raw result. Where a result is suggestive rather than conclusive, it is labeled as such.

The lab: two families, two deployments, two roots

The New Jersey deployment from Part 2 protects the DiMeo family's documents in newjersey.sopranos.local, with the AD RMS service on VESUVIO, its configuration database on BARONE, and tony.soprano, a member of the AD RMS Service Group. For Part 3 I stood up a second, fully independent deployment for the Lupertazzi family in New York: a separate forest, newyork.sopranos.local, a separate AD RMS root deployment on AVERNASOCIAL with its own SLC, the same cryptographic mode, and the same exportable software key storage. 

The two are built differently on purpose. New Jersey follows Microsoft's recommended architecture: the roles split across three machines, the AD RMS service on a member server rather than a domain controller, running under a dedicated account. New York takes the shortcut real deployments often take for convenience, collapsing everything onto the domain controller and running the AD RMS application pool as johnny.sack, a domain administrator. That is the consolidated deployment you are warned not to build, and I built it on purpose as the contrast. It has no bearing on the attack, which never needs a single New York privilege. 

The one place johnny.sack's domain-admin role matters is that he owns and protects the New York documents; the attack forges that identity, but an AD RMS identity carries no AD privilege, so the choice of victim is incidental. Had New York been built the recommended way, the result would be identical, because the attack rides the trust, not the deployment's configuration. Two families, two deployments, two roots. Nothing connects them until I say so.

AD RMS cross-forest topology

Figure 1: The cross-forest topology for Part 3. New York imports New Jersey's Trusted User Domain over a forest trust, so it honors identities issued under New Jersey's root. (New Jersey's Trusted Publishing Domain is imported only for the contrast experiment and then stripped.) The attack rides that trust in reverse: a forged New Jersey RAC, signed with the extracted licensor key, flows into New York, and New York issues a use license against the forged identity.

Wiring the trust

AD RMS gives one deployment two different ways to trust another, and they are not two labels for the same mechanism. They differ in exactly what one deployment hands the other, and that difference decides what a stolen key can reach. Each deserves a precise definition, because the attack means something very different against each.

A Trusted User Domain (TUD) is user trust. An administrator imports one to let another deployment's users open content their own deployment protects, and nothing more. When deployment B imports deployment A's TUD, B agrees to honor Rights Account Certificates (RAC) that A issued. The only thing that crosses is the public half of A's identity: A's SLC as a public certificate, with no private key and nothing secret. B can now validate that a RAC chains to A's SLC and accept the user that RAC names. 

None of this uses Kerberos, but the analogy is useful: a TUD behaves like an inter-forest trust, where B trusts A to vouch for A's own users and holds nothing that would let it impersonate A.

A Trusted Publishing Domain (TPD) is a key handover. An administrator imports one when their deployment must serve licenses for content that another deployment protected, most often during a migration or when one deployment is folded into another. When B imports A's TPD, B receives A's SLC including its private key. B can now decrypt and re-license content that A published, because B literally holds A's key. In the same analogy, a TPD is not a trust at all. It behaves like copying A's KRBTGT key onto B's domain controller.

The choice looks like a straightforward trade: share a public certificate and take on little, or share a private key and take on a lot. That assumption runs backward for the threat model tested here, where an attacker already holds deployment A's SLC private key.

In that scenario, the Trusted User Domain is the blast-radius multiplier: it makes deployment B honor the attacker's forged identities and issue licenses for content protected with B's own key. Importing A's Trusted Publishing Domain does not expand what the already-stolen key can decrypt, because the attacker can already open content protected by A. That does not make a TPD low risk; importing one creates a separate key-custody risk by placing A's private key inside B's environment.

A's stolen key cannot directly decrypt B's documents, which are sealed to B's key. The attack succeeds only because B trusts A to assert identity and therefore issues a use license to the forgery. In this already-stolen-key scenario, the public-certificate trust is what carries the compromise across the boundary. The key material never moves.

The two even look different on disk. Export them from the RMS console and you get two files:

File

What it is

Size

Contains

nj.tpd

Trusted Publishing Domain

~34 KB (password-protected)

SLC certificate + private key

nj-tud.bin

Trusted User Domain

~12 KB

SLC public certificate only

The ~22 KB gap is the private key the TPD carries, wrapped and password-encrypted, that the TUD does not.

exported trust files

Figure 2: A File Explorer view of the exported trust files, nj.tpd (34 KB, TPD File) and nj-tud.bin (12 KB, BIN File).

They also leave different fingerprints in the configuration database. A TUD import adds a row to DRMS_TrustedIdentityDomain. A TPD import adds a row to DRMS_LicensorPrivateKey, because the deployment now holds an additional private key. That distinction is how you tell, from the config DB alone, which kind of trust a deployment actually has.

New York's AD RMS console shows the trust directly: Under Trust Policies, New Jersey now appears in the Trusted User Domains list.

AD RMS trust

Figure 3: The same trust in the AD RMS console: New Jersey listed under Trust Policies, Trusted User Domains on AVERNASOCIAL. Reading the trust policy in this console requires AD RMS Service Group membership, the same boundary a plain user hits at the /admin surface.

SharpRMS reads the same policy back from New York's admin surface, and the IsImported flag tells the entries apart. The Trusted User Domains list carries two: New York's own root, and New Jersey, which arrived with the import.

IsImported flag

Figure 4: SharpRMS reading New York's Trusted User Domains over the admin surface: the Enterprise entry is New York's own root (IsImported: false), and New Jersey (Id 103, IsImported: true) is the imported cross-forest trust. The New Jersey entry shows IsSecurityIdentifiersAllowed: true only because I was exercising the SID path later in the post; off is the default.

For the result that matters I import only New Jersey's Trusted User Domain into New York, and nothing else. One experiment, shown first as a deliberate contrast, temporarily adds the Trusted Publishing Domain, which we then strip away. New York's list of Trusted Publishing Domains holds only its own, so New York carries none of New Jersey's key material. What New York carries is New Jersey's public certificate, and that alone is enough to honor the Rights Account Certificates that New Jersey issued. New York can confirm a certificate was signed by New Jersey's private key without ever holding that private key. The attacker holds that private key, extracted in Part 2, and works from an ordinary low-privilege New Jersey account with no access in New York at all. New York validates with the public half, the attacker forges with the private half, and that split is the whole trick.

The attack needs nothing on the New York side beyond what two trusts already grant:

  • The AD forest trust gives any authenticated New Jersey user network reach to New York's licensing endpoint and a way to authenticate. 

  • The RMS Trusted User Domain is what makes New York honor a certificate New Jersey signed. 

Both exist by design, because that is exactly how a legitimate New Jersey user acquires a license for a document New York shared. The forged identity rides in on the same path. No Trusted Publishing Domain, no shared private key on New York's side: New York never holds New Jersey's private key, the attacker does, and the attack is run by the New Jersey key-holder from Part 2, from a low-privilege New Jersey account.

Finding the trust

Before forging anything, I look at the trust. Two layers sit between the forests, and only one is visible to a low-privilege attacker. From a low-privilege foothold in New Jersey, nltest /domain_trusts shows a two-way, forest-transitive trust to newyork.sopranos.local. That is the AD layer, readable by any authenticated user, and it tells us the forests are wired together but nothing about AD RMS. The RMS layer is the one that decides the attack, and it is the one the attacker cannot see. 

In New York's trust policy, New Jersey is listed as a Trusted User Domain (Id 103), so New York honors the Rights Account Certificates that New Jersey issued, while New York's Trusted Publishing Domains list holds only its own key. New York trusts New Jersey to vouch for users and holds none of New Jersey's key material. I can describe that policy because I built the lab. A low-privilege attacker in New Jersey cannot read the RMS trust policy, because that view is gated exactly as in Part 1; the /admin surface answers only to the AD RMS Service Group, and a plain user gets 401, the same wall paulie.gualtieri, my low-privilege New Jersey user from Part 1, hit. 

So the RMS view belongs to the AD RMS Service Group, not to a regular user in either forest. I do not need that view. The forest trust already shows a path exists, and one forged identity will prove the rest.

nltest /domain_trusts /all_trusts

Figure 5: nltest /domain_trusts /all_trusts from a low-privilege New Jersey foothold: a two-way, forest-transitive trust to newyork.sopranos.local. Any authenticated user can read this AD layer, and it says nothing about AD RMS.

operation tpd

Figure 6:  SharpRMS reading New York's Trusted Publishing Domains: only AVERNASOCIAL, New York's own, shown by IsImported: false. New York holds none of New Jersey's key material.

The same read as a plain New York user,

Figure 7: The same read as a plain New York user, albie.cianflone, not in the AD RMS Service Group: HTTP 401 at the /admin surface. Reading the trust policy is gated exactly as /admin was in Part 1, Tony in, Paulie out.

Local first: the attack primitive

First, the stage. On New Jersey I protect a document, the board minutes, sealed under New Jersey's own SLC and granted read to tony.soprano. An ordinary New Jersey document, nothing crossing an organization boundary. This is the file the stolen key will open without ever presenting a real credential.

Before crossing a trust, I establish what the stolen key does on its own deployment. I could simply decrypt this file offline, the way I did in Part 2, but I route through the licensing endpoint on purpose, because that request is the primitive a trust carries. Cross-trust is only the same request pointed at a neighbor.

Holding New Jersey's SLC private key from the Part 2 export, I forge a Rights Account Certificate for tony.soprano, the user the document grants. As Part 2 showed, a forged RAC carries identity only, a chosen SID and email on a freshly generated keypair, and the deployment supplies the authorization itself, matching that identity against the document's rights. I present the forged certificate to New Jersey's licensing endpoint, the deployment issues a use license, the object that carries the content key, and I decrypt.

./SharpRMS.exe goldenrac /keyfile:slc.bin 
/template:forged_rac.xml /infile:BOARD_MINUTES_2026.docx 
/server:http://vesuvio.newjersey.sopranos.local 
/target:[email protected]
/sid:S-1-5-21-877797059-2172394321-2911316366-1109

That command, goldenrac, is the forge-and-acquire primitive the rest of this series runs on. It takes as its /template a genuine Rights Account Certificate, the one forged in Part 2, whose issuer block and certificate chain are copied verbatim, re-signs the body with the stolen private key in /keyfile, writes in the identity named by /target and /sid, reads the protected document in /infile, and presents the forged certificate to the licensing endpoint in /server to obtain a use license. It forges the identity and returns the license in one run; a separate decrypt command then opens the document. The stolen key lets the re-signed certificate chain through that copied issuer block, up to a root the deployment already trusts. Every later example is the same goldenrac command with a different identity.

goldenracforged keypair opens document

Figures 8A & 8B: The stolen key's local primitive. (a) Run as paulie.gualtieri, goldenrac forges a Rights Account Certificate for tony.soprano and New Jersey issues a use license off the forgery; the deployment binds identity from the certificate, not from the account that signed the request. (b) decrypt then uses the forged keypair and that license to open the document in cleartext.

Note that paulie.gualtieri signs the request, the same ordinary user the console shut out in Part 1, yet the deployment licenses tony.soprano, because it binds identity from the certificate, not from who authenticated. The account that could not read a thing through the admin surface reads the document by presenting a forged one. That mismatch is both how the attack works and, later, what gives it away.

What the deployment actually matches on

Which field decides the grant: the email, the security identifier (SID), or both? We forged the same RAC several ways against a document granted to tony.soprano, holding the authenticating account constant as a non-grantee:

Forged RAC

Result

Tony's email + Tony's SID

ACCEPTED

Tony's email + a non-grantee's SID

ACCEPTED (email is enough)

a non-grantee's email + Tony's SID

ACCEPTED (SID is enough)

non-grantee email + non-grantee SID

REJECTED

Locally, the deployment matches on email or SID: either one pointing at a granted principal is enough to be licensed, and an identity matching neither is refused, which proves the grant genuinely gates. This is not "any forgery wins." This matrix was measured on New Jersey; New York honors the same email and SID paths, as the cross-trust results below show.

The crux, in one sentence

Steal the private key behind deployment A's Server Licensor Certificate, forge a Rights Account Certificate naming any user including B's own, and present it to deployment B which trusts A: B issues a use license for a document that belongs to B, because B holds only A's public certificate and that is enough to honor what A's private key signed. B never held A's private key. The rest of Part 3 proves that result, then repeats the test after removing the TPD.

The surprising part is why deployment B accepts an A-signed RAC naming one of B's own users. In this lab, the default TUD import trusted all email domains, not only A's. That allowed a certificate signed by A to claim a B-domain email address even with SID trust disabled. I test the email and SID paths separately below.

The weaker shape: publishing trust

The first experiment looks like the attack but is not quite, and it is the only one that uses a Trusted Publishing Domain. For it alone I import New Jersey's TPD into New York, so New York holds a copy of New Jersey's private key; every other experiment, including the real result, runs on the Trusted User Domain alone. We take a New-Jersey-protected document, the board minutes, sealed to New Jersey's key. We forge an authorized user's RAC with New Jersey's stolen private key and present it to New York while New York holds New Jersey's TPD. SharpRMS returns the same ACCEPTED verdict it printed for the local run in Figure 8A.

New York issues the license. But read what just happened: The document belongs to New Jersey, and New York can open it only because, for this experiment, it imported New Jersey's Trusted Publishing Domain and now holds a copy of New Jersey's private key. With that key in New York's own store, New York opening New Jersey's content is expected, exactly what the earlier analogy described: we copied a KRBTGT key onto the other domain controller, and of course it minted tickets. This is a real cross-deployment result, but not the stronger one. Here the second deployment adds nothing the stolen key did not already provide, which is exactly why it is the weaker shape. The trust earns its place only in the next experiment.

The tell is in the publishing license embedded in the document. Its licensor MS-DRM-Server object is named VESUVIO, at HTTP://vesuvio.newjersey.sopranos.local/_wmcs. The content is stamped, in cleartext, as New Jersey's.

The board minutes' publishing license

Figure 9: The board minutes' publishing license, licensor VESUVIO. The document is stamped, in cleartext, as New Jersey's.

The real shape: user trust and a forged identity

The stronger result is the other one: a document New York protected for itself, opened by one of New York's own users whose certificate New York never issued. New Jersey's private key forged that identity, and New York holds nothing of New Jersey's but a public trust.

I published two documents on the New York deployment, signed in as johnny.sack on a New York workstation. The first, NY_SHARED_TONY.docx, is the ordinary cross-organization share this trust exists to allow: Johnny keeps Full Control access as the owner, and I granted read to a New Jersey colleague, [email protected]. The second, NY_TEST_DOCUMENT.docx, is the file I actually attack, and it grants New Jersey nothing: Johnny owns it, and no New Jersey user appears on it at all. I forge against the second one on purpose, because opening a document that was never shared with New Jersey is the stronger claim. New York sealed both to its own SLC.

Full Control for Johnny

Figure 10: Restrict Access on NY_SHARED_TONY.docx, a New-York-sealed document, signed in as johnny.sack: Full Control for Johnny, Read shared to [email protected]. The attack below instead targets NY_TEST_DOCUMENT.docx, a second New-York-sealed file that Johnny owns and shares with no one in New Jersey.

The magic bytes confirm the protection. An RMS-protected Office document is an OLE compound file beginning with D0-CF-11-E0, not the PK of an ordinary DOCX. That is also how an attacker sweeps a share for protected content worth targeting.

magic bytes for RMS-protected Office document

Figure 11: The protected document's magic bytes. It begins with D0-CF-11-E0, the OLE compound-file signature RMS uses, not the PK of an ordinary docx. Sweeping a share for that header is how an attacker finds protected content worth targeting.

You would expect the next move to forge Tony, the shared New Jersey user. New Jersey's private key reaches further. From the same low-privilege position as every attack in this series, I forge a RAC for johnny.sack himself, New York's own user and the document's owner, and present it to New York. The forged certificate is signed by New Jersey's private key, not New York's, yet New York honors it as Johnny and hands New Jersey Full Control of New York's own document, because the trust tells New York to accept whatever New Jersey's private key vouches for. 

You might expect that holding New Jersey's key is already enough to open this file, but it is not. New York sealed the content to its own SLC, so the offline route would need New York's private key, which this attack never holds. The content opens only when New York issues the use license, and once it does I decrypt the file offline with the forged keypair. The trust is what makes New York issue that license for a certificate its servers never signed.

That exchange is a single goldenrac command, run as Paulie against New York. It carries /user and /password this time because the request authenticates across the forest trust into New York, rather than running in a local New Jersey session:

./SharpRMS.exe goldenrac /keyfile:slc.bin 
/template:forged_rac.xml /infile:NY_TEST_DOCUMENT.docx 
/server:http://avernasocial.newyork.sopranos.local 
/user:NEWJERSEY\paulie.gualtieri /password:Gabagool123! 
/target:[email protected] /sid:S-1-5-21-1432269242-3701569443-26560649-1108

goldenrac writes the forged keypair to forged_rac_priv.bin and the use license to use_license.xml; I rename these to ny_forged.bin and ny_uselicense.xml for the decrypt.

./SharpRMS.exe decrypt /keyfile:ny_forged.bin 
/infile:NY_TEST_DOCUMENT.docx /uselicense:ny_uselicense.xml 
/outfile:ny_recovered.docx

cross-forest result.forged keypair

Figures 12a & 12b: The cross-forest result. (a) As low-privilege NEWJERSEY\paulie.gualtieri, goldenrac forges a RAC for johnny.sack@newyork with New Jersey's stolen private key and presents it to New York; New York issues a use license off a certificate its own servers never signed, licensed to johnny.sack. (b) decrypt then uses the forged keypair and that license to open New York's own document in cleartext.

This time the publishing license tells a different story. Its licensor MS-DRM-Server object is named AVERNASOCIAL, at HTTP://avernasocial.newyork.sopranos.local/_wmcs, and the content key is sealed to New York's SLC. That last detail is the cryptographic proof: a content key sealed to New York's key can only be unsealed with New York's key. New Jersey's TPD, even while it was still imported, was mathematically incapable of opening this document. The only thing that let the forgery through was the user's trust.

The New York document's publishing license,

Figure 13: The New York document's publishing license, AVERNASOCIAL, content key sealed to New York's SLC. This document is New York's own.

Removing all doubt: strip the publishing key

A skeptic can still object that New York was holding New Jersey's key the whole time, even if the math says that key went unused. So I removed the key. I deleted the Trusted Publishing Domain from New York, leaving only the Trusted User Domain, and recycled New York's RMS application pool (_DRMSAppPool1) so the change took effect and the server's in-memory no-rights cache was cleared. New York now held no New Jersey key material of any kind, and its only relationship to New Jersey was the public user trust.

New York's own configuration database confirms that state exactly. Its table of licensor private keys holds a single row, New York's own certificate, and nothing of New Jersey's. New Jersey appears only as a Trusted User Domain row carrying New Jersey's public certificate, identified by the same GUID named as the issuer in the forged Rights Account Certificate.

With the deployment in that state, I ran the forge again, as low-privilege NEWJERSEY\paulie.gualtieri. New York issued a use license for johnny.sack, New York's own user, off a certificate New York's servers never signed.

.\SharpRMS.exe goldenrac /keyfile:slc.bin /template:forged_rac.xml 
/infile:NY_TEST_DOCUMENT.docx 
/server:http://avernasocial.newyork.sopranos.local /user:NEWJERSEY\paulie.gualtieri /password:Gabagool123! 
/target:[email protected]
/sid:S-1-5-21-1432269242-3701569443-26560649-1108
SharpRMS post-strip result

Figure 14: The post-strip result. With New Jersey's Trusted Publishing Domain removed and only the Trusted User Domain left, goldenrac run as low-privilege NEWJERSEY\paulie.gualtieri is still accepted, and New York issues a use license for johnny.sack, New York's own user.

Deployment state

What New York holds of New Jersey

goldenrac for johnny.sack

Before the strip (TPD imported)

Private key (TPD) and public user trust (TUD)

ACCEPTED

After the strip (TPD removed)

Public user trust (TUD) only

ACCEPTED

Two independent facts rule out a cached license:

  • The tool mints a fresh key pair on every run and the use license is sealed to that key pair, so no earlier license could satisfy the request.

  • New York's request log recorded the acquisition as a live event: one AcquireLicense entry, succeeded, whose authenticated caller is NEWJERSEY\paulie.gualtieri even though the license was issued to johnny.sack. The experiment removed New Jersey's key material from New York's side, not the stolen key from the attacker's hands.

What is left to explain the result is the trust, amplifying a forgery that only New Jersey's stolen private key could sign.

Figure 15: New York's trust policy after the strip. Only New York's own publishing key remains, and New Jersey is still present as a Trusted User Domain. The user trust is all that's left.

There is one correction from my own testing worth sharing, because it is the kind of thing that derails an investigation. An earlier run of this exact request was rejected with UntrustedPersonaCertException. The cause was not a flaw in the finding. It was a stale TUD. New Jersey's deployment had been rebuilt with a new SLC key, and the New Jersey TUD New York had imported still carried the old public key, so the signature no longer chained. Re-importing the current TUD fixed it and the result reproduced cleanly. A stale trust fails closed. A current trust is the open door.

This works out of the box. A Trusted User Domain, by default, trusts all email domains, so New Jersey's key can vouch for a @newyork identity with no SID trust involved; I re-ran the johnny.sack forgery with SID trust off and New York still issued the license off the @newyork email. The AD RMS import offers no option to narrow the trusted domains at import time, and restricting a TUD to specific domains is a separate step done afterward. I confirmed a scoped TUD rejects the forged @newyork RAC even with SID trust enabled.

But email-domain scoping gates only the email path: with SID trust enabled, I forged an in-domain, non-granted @newjersey certificate carrying johnny.sack's SID and New York issued the license off the SID. The control is to restrict trusted email domains and leave SID trust off, which it is until you deliberately turn it on; the figures show it enabled only because I was exercising the SID path. Either one alone leaves a path, and even a fully scoped TUD still lets an attacker forge any identity in the trusted partner's domains.

It runs both directions

Trust in AD RMS is imported per relationship, and it is symmetric only if you make it so. I wired it both ways: New York imported New Jersey's Trusted User Domain, and New Jersey imported New York's.

The forgery does not care which way it runs. It needs one thing, a deployment that trusts the SLC that signed the forged Rights Account Certificate, and a Trusted User Domain is exactly that trust: a standing instruction to honor whatever the foreign private key vouches for. The document need not grant the partner forest anything. In the real result I forged New York's own owner, johnny.sack, not the New Jersey grantee, so the attack never leaned on a New Jersey grant, and NY_TEST_DOCUMENT, a New York document shared to no one in New Jersey, opened exactly that way.

The same primitive that let New Jersey's stolen private key open New York's documents runs in reverse for an attacker holding New York's private key, once New Jersey imports New York's TUD. I proved the New Jersey to New York direction end to end; the reverse is the same attack with the other private key and the other server, riding a trust of the same shape.

Named grants are not the only exposure a stolen key creates: Everyone-shared and group-protected documents widen the blast radius further, and Part 4 of this series will take up how far that reach goes.

What I did not prove

Two claims sit one step beyond what I demonstrated:

The enterprise-wide blast radius

I proved the attack across single trust edges: New Jersey to New York. Enterprise AD RMS deployments are hubs and spokes, webs of deployments that trust a common root or trust each other pairwise. Whether a forged identity cascades across that whole graph or stops at each explicit trust boundary depends on the topology, and AD RMS trust is imported per relationship rather than inherited transitively. The pairwise result is proven. The enterprise cascade is the natural next question, not a demonstrated fact.

The self-enrollment root

Every deployment's SLC is signed, during server self-enrollment, by a certificate that ships with the product, a Microsoft self-enrollment root common to AD RMS installations. It is tempting to think a certificate chaining to that shared root would therefore be honored everywhere by construction. It would not. A live deployment pins the specific licensor certificates it trusts, its own plus any it has explicitly imported as a trust, and rejects a Rights Account Certificate whose issuing SLC it does not recognize (UntrustedPersonaCertException).

That is the same failure mode I saw earlier when a stale Trusted User Domain no longer matched a rebuilt deployment's key: chain provenance alone buys nothing. The deployment honors the trust it was configured to honor, and nothing else. The shared enrollment root is part of a certificate's lineage, not a trust anchor a deployment will accept blind. It is no shortcut around the trust relationships at the heart of this post.

One proven attack is worth more than five hinted ones. The cross-trust forgery is proven end to end in the New Jersey to New York direction against a named grant, and the reverse direction follows from the symmetric trust by construction. The rest is honest about being open.

Remediation

The central problem highlighted in this series cannot be fixed by a routine in-place key rotation. AD RMS has no equivalent to resetting a compromised credential while preserving access to all content protected under the old key. That constraint shapes the cross-deployment guidance too.

Audit and minimize trust, and govern every trust as a highly-privileged grant

The two trust types carry different risks. A Trusted User Domain transfers no private key; it enables your deployment to process license requests based on Rights Account Certificates issued by another deployment, subject to the trusted email-domain and SID settings you configure. If that deployment's SLC private key is stolen, an attacker who can forge certificates that chain to that SLC can assert identities permitted by those settings. With the TUD left at its default all-email-domain setting in this lab, New York accepted a New Jersey-signed certificate naming a New York user and issued a use license for a document that granted rights to that identity. This does not open every protected document automatically: the attacker must also obtain the protected file, reach and authenticate to the licensing endpoint, and forge an identity that matches a grant. Keep Trusted User Domains few and review them regularly. A Trusted Publishing Domain creates a different key-custody risk. In a software-keyed deployment like this lab, importing one gives the importing deployment the source deployment's SLC private key, creating another environment in which that key must be protected. Treat TPDs as rare and tightly guarded, and remove trusts of either kind when they are no longer required.

Scope the trust you must keep

When you cannot remove a Trusted User Domain, narrow it. Restrict it to the partner's specific email domains, and leave SID trust off, which is its default. Each control alone leaves a path open, as shown above, so apply both. Even a fully scoped TUD still lets an attacker forge any identity within the trusted partner's domains, so scoping bounds the exposure rather than closing it. And if you suspect a partner's key has been compromised, removing their TUD is the one revocation lever that actually works here, because exclusion policies cannot.

Guard the exported trust files

A .tpd on a backup or migration share holds the deployment's private key, wrapped in the export password. The wrapping is AES, but the AES key is derived straight from the export password with no real work factor: a single SHA-256 over the password (encoded as UTF-16LE), with the first sixteen bytes used as the AES-128 key. There is no salt and no iteration count, so the derivation is fast and fully offline-crackable; a guess costs one SHA-256 and one trial decrypt. This is the export format worked out in the DisARMS research and implemented in SharpRMS. If the password is weak, a .tpd sitting on a file share is one dictionary run away from the key behind the 255-year certificate. A long, random passphrase resists that crack; the weak derivation only dooms a human-chosen one.

Know what a Hardware Security Module (HSM) does not buy you

An HSM-backed SLC closes the software-extraction path, so a key that was HSM-backed from the start cannot be pulled out this way at all. But HSM does nothing once a copy is already out. Cross-deployment forgery uses the SLC key to sign. If that key was ever software-keyed and extracted, protecting the legitimate key with an HSM later does not invalidate the stolen copy. The stolen key can still sign forged certificates for any deployment that continues to trust the compromised SLC.

You cannot revoke your way out either

AD RMS exclusion policies blocklist by public key, but every forgery mints a fresh keypair, so there is nothing stable to exclude. Exclusion cannot stop a forger.

Accept the horizon

An SLC is valid for about 255 years and cannot be rotated in place. Once its private key leaks, forgeries work against every deployment that trusts that key for as long as the certificate stays trusted, and content already protected under it stays readable for as long as that content exists. A new deployment with a new key, and a migration off the old one, stops future forgeries and protects new content. It does nothing for content already protected under the leaked key, which stays readable to the key-holder. This is where a leaked licensor key diverges from a KRBTGT compromise, which you recover from by rotating the key: a double KRBTGT reset invalidates the forged tickets. A leaked SLC key offers no such reset, because rotating it would invalidate every document already protected. Recovery is the heavier project of standing up a new deployment and migrating content off the old key, closer to rebuilding a domain than resetting a credential.

Detection

When the trusted path must remain open for business reasons, monitor it. Removing the trust may not be practical without losing the collaboration it enables. Treat cross-forest license acquisition as security-relevant traffic, but alert specifically on the mismatch between the authenticating caller and the identity on the certificate, not on cross-forest acquisition by itself. New York's RMS logging database records both halves, but not in one place.

The dbo.ServiceRequestView view carries the authenticating caller in UserName, UserDomain, and UserHostAddress, along with the request type and whether it succeeded. It does not contain the identity asserted by the presented certificate. That identity is recorded through Certificate.IssuedPrincipalObjectId, which points to an XrmlObject row containing the principal's email in XrmlObject.Name and its SID in XrmlObject.ID. Correlate each request to its certificates through the ServiceRequestAndCertificate junction table, then inspect the issued principal on the Content-License and Group-Identity-Credential records. Every accepted forgery in this post shows caller NEWJERSEY\paulie.gualtieri against a license issued to a different principal, for example johnny.sack.

Closing

Part 2 showed that a Service Group member can export a deployment's key and turn that deployment into an open book, forever. Part 3 showed that the book is not the only one on the shelf. Wherever that deployment is trusted, and wherever the attacker can also reach the protected files, the forged identity walks through and opens documents that were never the compromised deployment's to begin with. Those documents are sealed with the trusting deployment's own key, which the attack never uses. The key it does carry, the stolen one, only has to sign the forgery, and the trust does the rest. Set the trust up the other way, and the same attack runs the other way.

New Jersey's key opened New York's mail. The families are separate. The trust between them did not care.

References

- Grothe, Mainka, Rösler & Schwenk: How to Break Microsoft Rights Management Services

- RUB-NDS: MS-RMS-Attacks 

- Migrate from AD RMS to Azure Information Protection - Phase 2 

- Rights Account Certificates (AD RMS SDK)

- RMS FAQ: Certificates, Keys, and Encryption

- AD RMS: Adding and Removing Trusted User Domains 

- TrustedUserDomain.IsSecurityIdentifiersAllowed property, AD RMS Scripting API 

Acknowledgments

Special thanks to Charlie Clark for helping me threat-model the attacks in this series and for his work refactoring SharpRMS.

Thanks to Aaron Margosis for extensively reviewing this post; his feedback sharpened both the accuracy and the argument. And thanks to Susannah Matt for her help reviewing, formatting, and publishing this post.

You might also like