> 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/ru/active-directory/enumeration/remote-sam-enumeration.md).

# Перечисление удалённой SAM

Заметки по безопасности Active Directory для перечисления удалённой SAM, охватывающие перечисление, Kerberos, учётные данные, злоупотребление ACL, боковое перемещение, рабочий процесс эксплуатации и этапы проверки.

### Принцип

SAM означает **Диспетчер учетных записей безопасности**.

Он содержит сведения о:

* локальных учетных записях;
* локальных группах;
* членстве в локальных группах.

В более старых версиях Windows, до Windows 10 и Windows Server 2016, часто можно было удалённо перечислять определённые сведения SAM без повышенных привилегий.

### Перечисление локальных групп удалённого компьютера

С PowerView:

```powershell
Get-NetLocalGroup -ComputerName WS02
```

Эта команда пытается получить локальные группы, присутствующие на `WS02`.

### Альтернатива без PowerView

С использованием PowerShell Remoting:

```powershell
Invoke-Command -ScriptBlock { Get-LocalGroupMember -Group Administrators } -ComputerName WS02
```

Эта команда выполняет `Get-LocalGroupMember` непосредственно на `WS02`.

Обычно требуется, чтобы:

* PowerShell Remoting был включён;
* у пользователя были необходимые права;
* это разрешали сетевые правила и правила брандмауэра.

### Просмотр пользователей, подключенных к удалённому компьютеру

С PowerView:

```powershell
Get-NetLoggedon
```

Эта команда определяет пользователей, которые в данный момент прошли аутентификацию на компьютере.

Это полезно знать:

* где выполнен вход пользователя;
* активен ли администратор на компьютере;
* какие компьютеры могут представлять интерес для дальнейшего анализа.

### Просмотр сеансов, открытых к вашему компьютеру

С PowerView:

```powershell
Get-NetSession
```

Эта команда отображает SMB-сеансы, установленные к компьютеру.

Например, если пользователь пытается получить доступ к:

```bash
//WS01/c$
```

<figure><img src="https://4248209978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-315e3fccee4b5d1998a8a148bd42f34ee5b31c8a%2Fimage%20(3196).png?alt=media" 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 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/ru/active-directory/enumeration/remote-sam-enumeration.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.
