> For the complete documentation index, see [llms.txt](https://duc193.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://duc193.gitbook.io/notes/redteam/active-directory/domain-trusts-primer/1.-khai-niem.md).

# 1. Khái Niệm

## 1. Các loại Trust.

Domain trust hay AD trust xảy ra khi 2 hoặc nhiều domain muốn chia sẽ tài nguyên cho nhau, các domain sẽ apply 1 số rule để trust lẫn nhau. Ứng dụng lớn nhất của domain trust là khi cty mở chi nhánh hoặc cty lớn sáp nhập cty con.

Trust được thiết lập giữa (một hoặc hai chiều):

* Domain <=> Domain
* Forest <=> Forest

Điều này cho phép user của domain A có thể truy cập dữ liệu của domain B hoặc admin domain A có thể quản trị domain B, tuỳ config.

Các loại Trust trong AD:

* `Parent-child` : 2 hoặc nhiều domain trong cùng 1 forest. Child domain trust 2 chiều với parent domain.
* `Cross-link` : 2 child domain trust nhau để tăng tốc authen.
* `External` : Trust giữa 2 domain riêng biệt, thường khác forest. Trust này thường là non-transitive (không lan truyền trust sang domain khác) và hay dùng với partner/vendor/MSP.
* `Tree-root` : Trust 2 chiều giữa forest root domain và một tree root domain mới trong cùng forest.
* `Forest` : Trust transitive giữa 2 forest root domain, cho phép authentication xuyên toàn bộ forest.
* `ESAE` : Bastion forest chuyên dùng để quản trị Active Directory an toàn hơn (Enhanced Security Administrative Environment).

## 2. `transitive` and `non-transitive`

Transitive Trust có nghĩ là Trust có thể được lan truyền, transitive qua cho các domain khác.

Ví dụ :

* Domain A Transitive Trust Domain B
* Domain B Transitive Trust Domain C

⇒ Domain A Trust Domain C

Còn Non-Transitive Trust thì ngược lại, Domain A ko trust Domain C.

> External Trust là Non-Transitive Trust.

<figure><img src="https://cdn.services-k8s.prod.aws.htb.systems/content/modules/143/trusts-diagram.png" alt=""><figcaption></figcaption></figure>


---

# 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://duc193.gitbook.io/notes/redteam/active-directory/domain-trusts-primer/1.-khai-niem.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.
