> 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/ports-and-services/smb-445/crackmapexec-smb-tool.md).

# CrackMapExec（SMBツール）

CrackMapExecを使ったSMB列挙。ホスト、ユーザー、認証情報、共有、昇格権限、RIDブルートフォースを対象。

> CrackMapExec（CME）は、Active Directory環境向けのポストエクスプロイテーション用セキュリティ監査ツールです。認証情報を検証し、SMBの露出を列挙し、一般的な弱点を検出し、十分な権限があればリモートコマンドを実行できます。

### **システム列挙**

ネットワーク上のシステムを特定し、ドメイン名を見つけるには：

```bash
crackmapexec smb 10.10.10.10
```

これは、ドメインや利用可能なサービスを含む、対象のSMBサーバーに関する情報を提供します。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-7f276890946faae5bc956b762c9a43ded15e999f%2Fimage%20(1643).png?alt=media" alt=""><figcaption></figcaption></figure>

#### ユーザー列挙

```bash
crackmapexec smb 10.10.10.10 -u '' -p '' --users
```

### **認証情報の検証**

ユーザー名/パスワードの組み合わせが有効かどうかを確認するには：

```bash
crackmapexec smb 10.10.10.10 -u '<user>' -p '<password>'
```

認証情報が正しければ、CMEは対象システムへのアクセスを確認します。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-1afdd3f0e1aab2272babe773938540d613b3afcd%2Fimage%20(1652).png?alt=media" alt=""><figcaption></figcaption></figure>

### **権限昇格を伴う認証情報の検証（PWNED）**

ユーザーが **Remote Management Users** グループに属している場合、そのアカウントは対象システムへ直接接続できます。これらの認証情報を検証するには：

```bash
crackmapexec smb 10.10.10.10 -u '<user>' -p '<password>'
```

PWNEDアクセスを示す応答は、そのユーザーが昇格された権限を持ち、リモート実行が可能であることを意味します。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-2e47ab9e0f7968b52620b69faa837956e9ad6991%2Fimage%20(2103).png?alt=media" alt=""><figcaption></figcaption></figure>

### **共有と権限の列挙**

提供された認証情報でアクセス可能な権限とネットワーク共有を調べるには：

```bash
crackmapexec smb 10.10.10.10 -u '<user>' -p '<password>' --shares
```

これは、利用可能な共有とユーザーに関連付けられた権限を表示します。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-0302ddc9339c95bf7ed87a25680f753b9d206820%2Fimage%20(1654).png?alt=media" alt=""><figcaption></figcaption></figure>

### RIDブルートフォース

#### ドメインユーザーを特定するには、RIDブルートフォース攻撃を開始します：

```bash
crackmapexec smb 10.10.11.35 -u 'Guest' -p "" --rid-brute
```

> その `--rid-brute` パラメーターは **ブルートフォース攻撃を実行します** に対して **RID（相対識別子）** Windowsドメイン内で。RIDはWindowsのセキュリティ識別子の一部であり、ユーザーおよびグループアカウントの識別によく使われます。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-f5ff61c34c8f56d994e65824e94b9d32e070cfa6%2F%7B2A5D72BB-3931-490A-A31B-C3A9D1B42C52%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

見つかったユーザーの一覧は次のとおりです：

```
Administrator
Guest
krbtgt
CICADA-DC$
john.smoulder
sarah.dantelia
michael.wrightson
david.orelious
emily.oscars
```

#### ユーザー検証

検出したパスワードを列挙されたすべてのユーザーに対して試します：

```bash
crackmapexec smb 10.10.11.35 -u users.txt -p 'Cicada$M6Corpb*@Lp#nZp!8'
```

ユーザー **michael.wrightson** はこのパスワードを使用します。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-6544bdeedaf1ace5b1f3de36ea5af89b891e8808%2Fimage%20(807).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/ports-and-services/smb-445/crackmapexec-smb-tool.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.
