> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/zh/active-directory/fundamentals.md).

# Active Directory 基础

面向 Active Directory 基础的 Active Directory 安全笔记，涵盖枚举、Kerberos、凭据、ACL 滥用、横向移动、利用流程和验证步骤。

{% hint style="info" %}
Active Directory 存储有关网络资源的信息，并使用户和管理员能够轻松地组织、查找和管理这些资源。

它使用结构化数据存储作为信息层级组织的基础。这种存储称为 **目录**.
{% endhint %}

Active Directory 中存储的资源通常包括：

* 服务器
* 打印机
* 用户账户
* 网络设备

除了信息存储（数据库）之外，Active Directory 还由一组服务组成。

#### Active Directory 域服务（AD DS）

AD DS 对应于一组控制 IT 环境中不同操作的服务：

* **身份验证**：确保每个实体都是其所声称的身份
* **授权**：确保每个实体只能访问被授权给它的数据和服务
* **名称解析**：允许通过名称在网络元素之间进行通信
* **集中管理**：允许应用组策略（Group Policy）

### Active Directory 结构

Active Directory 逻辑结构的主要元素包括：

* **林**
* **域**
* **组织单位（OU）**

#### 林

林是 Active Directory 中最高的组织级别。/ 每个林共享一个唯一的目录，并代表一个安全边界。

#### 域

林可以包含一个或多个域。

#### 组织单位（OU）

域可以包含一个或多个组织单位。

### 数据存储

域和组织单位的信息存储在一个特定的 **域控制器**.

这种存储称为 **数据存储**.

信息以 **对象**的形式存储。/ 所有对象都由一个 **架构**定义，目录会根据该架构检查数据的有效性。

### 什么是域？

域是一个 **对象的逻辑分区** ，位于一个林内，具有共同的管理、安全和复制配置。

具体来说，域：

* 保证用户在整个网络中的身份
* 提供身份验证服务
* 提供授权服务
* 允许不同域控制器之间复制信息，并将其作为一个单一单元进行管理
* 允许在域之间创建信任关系

### 什么是组织单位（OU）？

组织单位（OU）是一个 **容器对象** ，允许你在域内组织其他对象。

它有三个主要功能：

* 允许对域对象进行有序查看
* 对可应用组策略（Group Policy）的对象进行分组
* 允许对对象进行分组，以便将管理权限委派给域中的其他用户或组

### Active Directory 架构（AD 架构）

Active Directory 中存储的一切都表示为 **对象**。/ **架构** 定义每种对象类型的属性。

主要特性：

* 每个林只定义一个架构
* 该架构的副本存在于林中的所有域控制器上，确保对象定义一致
* 该 **数据存储** 使用架构来确保数据完整性

结果：

所有对象都以统一方式创建，无论是由哪个域控制器创建或修改。

### Active Directory 数据存储

该 **数据存储**，通常称为 **目录**，存储有关林中对象的所有信息：

* Users
* 组
* 计算机
* 域
* 组织单位（OU）

目录存储在 **域控制器** 上，并可供应用程序和网络服务访问。

如果有多个域控制器，每个都拥有一个 **目录的完整副本** ，其中包含所有域信息。

***

### 数据存储组件

#### 接口

诸如 **LDAP**, **REPL**, **PAMI**，以及 **SAM** 等接口提供了与数据库通信的方式。

#### DSA（目录系统代理）

该 **DSA** 允许：

* 访问目录
* 维护模式
* 保证对象的标识
* 强制属性的数据类型

#### 数据库层

该 **数据库层** 是一个作为应用程序和目录之间接口的 API。

它阻止应用程序直接与数据库交互，并管理对各个目录记录的访问。

#### 数据库文件

目录信息存储在一个 **单一数据库文件**.

此外， **日志文件** 用于：

* 管理事务
* 确保在事务不完整或失败时能够恢复


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/zh/active-directory/fundamentals.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
