impacket
impacket copied to clipboard
Added renameMachine.py
Preparing a Pull Request that introduces scripts that allow to exploit the Kerberos sAMAccountName spoofing attacks (CVE-2021-42278 + CVE-2021-42287).
This attack chain allows regular users to spoof domain controllers.
The requirement to this attack is to have an unpatched KDC and full control over a machine account (to be able to edit its sAMAccountName and servicePrincipalName attributes). Full control over a machine account can be gained by creating it in the first place (e.g. by leveraging the MachineAccountQuota domain-level attribute if it's greater than 0)

References
- https://exploit.ph/cve-2021-42287-cve-2021-42278-weaponisation.html
- https://www.thehacker.recipes/ad/movement/kerberos/samaccountname-spoofing