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

# リモート SAM の列挙

リモート SAM の列挙、Kerberos、資格情報、ACL の悪用、横展開、悪用のワークフロー、検証手順を扱う Active Directory セキュリティメモ。

### 原則

SAM は意味します **セキュリティ アカウント マネージャー**.

含まれている情報は次のとおりです:

* ローカル アカウント;
* ローカル グループ;
* ローカル グループへの所属。

古いバージョンの Windows、つまり Windows 10 と Windows Server 2016 より前では、昇格された権限がなくても特定の SAM 情報をリモートで列挙できることがよくありました。

### リモート マシンのローカル グループを列挙する

PowerView では：

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

このコマンドは、次の場所に存在するローカル グループの取得を試みます `WS02`.

### PowerView を使わない代替方法

PowerShell リモーティングを使用:

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

このコマンドは実行します `Get-LocalGroupMember` で直接 `WS02`.

通常、次の条件が必要です:

* PowerShell リモーティングが有効であること;
* ユーザーに必要な権限があること;
* ネットワークおよびファイアウォールのルールで許可されていること。

### リモート マシンに接続しているユーザーを表示する

PowerView では：

```powershell
Get-NetLoggedon
```

このコマンドは、マシン上で現在認証されているユーザーを識別します。

把握しておくと便利です:

* ユーザーがどこにログインしているか;
* 管理者がそのマシンでアクティブかどうか;
* さらに分析するうえで関心のある可能性があるマシンはどれか。

### 自分のマシンに対して開かれているセッションを確認する

PowerView では：

```powershell
Get-NetSession
```

このコマンドは、そのマシンに確立された SMB セッションを表示します。

たとえば、ユーザーが次にアクセスしようとすると:

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

<figure><img src="https://2001299964-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/ja/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.
