> For the complete documentation index, see [llms.txt](https://alham-rizvi.gitbook.io/alhamrizvi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alham-rizvi.gitbook.io/alhamrizvi/active-directory/05.-forest-trusts.md).

# 05. Forest Trusts

**What it is:** a forest trust is a relationship between two AD forests that allows authentication and (optionally) authorization data to flow between them. A **bidirectional** trust means users in either forest can authenticate to resources in the other.

## Key Properties to Check When You Find One

```powershell
Get-ADTrust -Filter *
```

| Property                  | Meaning                                                              |
| ------------------------- | -------------------------------------------------------------------- |
| `Direction`               | Bidirectional / Inbound / Outbound                                   |
| `ForestTransitive`        | Whether the trust extends to *other* forests trusted by the far side |
| `SIDFilteringQuarantined` | If `False`, SID History attacks may be possible across the trust     |

## Why It Matters Here

A trust is only useful to an attacker if there's also a *network path* to the other side (`06_Network_Pivoting.md`) and some *misused permission* that actually crosses the boundary (`08_DACL_Abuse.md`, `07_gMSA_Abuse.md`). The trust alone doesn't grant access — it's the mechanism that makes cross-domain authentication *possible* once you find something worth abusing.

## Example — Spotting It From a Shell

```powershell
PS C:\> Get-ADTrust -Filter *

Direction              : BiDirectional
ForestTransitive       : True
SIDFilteringQuarantined: False
Target                 : sub.htb
```

This alone is enough to justify a deeper look at `sub.htb` for anything reachable from `domain.htb`'s existing foothold.

## Key Term

| Term             | Definition                                                            |
| ---------------- | --------------------------------------------------------------------- |
| **Forest trust** | A relationship allowing authentication to flow between two AD forests |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://alham-rizvi.gitbook.io/alhamrizvi/active-directory/05.-forest-trusts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
