Active Directory & Azure AD/Entra ID Security

Active Directory & Azure AD/Entra ID Security

Active Directory & Azure AD/Entra ID: Enterprise Security, Methods to Secure Active Directory, Attack Methods & Effective Defenses, PowerShell, Tech Notes, & Geek Trivia…

  • Home
  • About
  • AD Resources
  • Attack Defense & Detection
  • Mimikatz
  • Presentations
  • Schema Versions
  • Security Resources
  • SPNs
  • Top Posts

Active Directory Security Tip #16: Mitigating Kerberoast Attacks

Mar 02 2026

Detecting Fake Active Directory Password Changes

  • By Sean Metcalf in ActiveDirectorySecurity, Microsoft Security, Mitigation, PowerShell

In Active Directory, there has been a method that’s been around for many years which changes the password last set date but not the actual password. This is what I call a “fake password change” since the account appears to have a recent password when scanning for old passwords based on password last set, but the underlying password hasn’t actually changed.
I spoke about this in my 2015 BSides Charm talk which was my first conference talk.

Why does this happen?
There are times where service account (or admin accounts) need to have password changes, but someone doesn’t want to do the work to change them. The ability to fake a password change requires modify rights on the pwdLastSet attribute which provides the ability to check/uncheck the setting “User must change password at next logon”. This setting is enabled when you want the user to change their own password when they logon.


How does this work?

To see how this works, we’ll focus on the service account “svc-AGPM” in my lab. This account last changed its password on August 20th in 2025.


We open up Active Directory Users and Computers (ADUC), double-click on it to open up the account properties and then click on the Account tab.
From here we check the box for “User must change password at next logon” and click Apply.


What happens to the PasswordLastSet date when this happens?
It is now blank.  Which makes it seem like the account has never had a password set.


We continue with our process where we uncheck the box we checked and then click Apply.


After performing this action, we can see that the password change date has now been set to the current date and time even though the password itself hasn’t been changed since August 2025. We have successfully faked a password change!



Why does this happen?

This happens because the “User must change password at next logon” option is used to force a user to change their password at next logon. With it checked, Active Directory is waiting for the user to attempt to logon which is when the user is directed to change their password. During this time the PasswordLastSet value is blank since it is waiting for a new password. Once the user changes their password, the checkbox is effectively removed and the current date and time are set for the user’s passwordlastset property (technically this is the “pwdlastset” attribute, but the AD PowerShell cmdlets use that property).

How can we detect a fake password change?

In order to detect a fake password change we need to figure out how this change occurs on a Domain Controller. We have already identified that the pwdlastset attribute is what shows the date the password is last set. We have to look at another attribute called unicodePwd which is used to store the account’s password on the Domain Controller.

We can use the Active Directory PowerShell module cmdlet “Get-ADReplicationAttributeMetadata” to get AD replication metadata about the account. Running this cmdlet provides the following replication metadata about the account that continues beyond the screenshot.


Let’s scope this down to the 2 attributes that we care about, unicodepwd and pwdlastset.


The attribute we care about in this output is “LastOriginatingChangeTime”. I have highlighted the values for this attribute in the following screenshot.


Here we can clearly see that while the pwdlastset date is 3/03/2026, the date for unicodepwd remains 8/20/2025. This means that the password hasn’t changed, only the value that’s supposed to show when it has last changed.

An attacker could use this technique for an account with an old password they discover and have control of the account (with the ability to flip this bit). This would show that the password changed without it actually changing. This would allow for some sneaky persistence.

Detect fake Active Directory password changes at scale

I wrote a PowerShell script that will scan either the Active Directory Admins or All Users in the domain to see if there’s a fake password change that has been performed on them.
https://github.com/PyroTek3/ActiveDirectory/blob/main/Get-FakePWChanges.ps1

Example Script Output


Note that there may be scenarios where an account could be flagged but an admin wasn’t responsible for faking the password change. This does identify when a password shows it changed, but actually has not.

(Visited 1,446 times, 12 visits today)
  • ActiveDirectory, ActiveDirectoryReplicationMetadata, FakeADPasswordChange, FakePasswordChange, PowerShell, pwdlastset, unicodepwd

Sean Metcalf

I improve security for enterprises around the world working for TrustedSec & I am @PyroTek3 on Twitter.
Read the About page (top left) for information about me. :)
https://adsecurity.org/?page_id=8

Recent Posts

  • Detecting Fake Active Directory Password Changes
  • Active Directory Security Tip #16: Mitigating Kerberoast Attacks
  • Active Directory Security Tip #15: Active Directory Domain Root Permissions
  • Active Directory Security Tip #14: Group Managed Service Accounts (GMSAs)
  • Improve Entra ID Security More Quickly

Active Directory & Entra ID Security Services

Have concerns about your Active Directory environment and/or Entra ID tenant? We help enterprises improve their security posture.

Find out how...

Popular Posts

  • AD Reading: Windows Server 2019 Active Directory Features
  • PowerShell Encoding & Decoding (Base64)
  • Attack Methods for Gaining Domain Admin Rights in…
  • Kerberos & KRBTGT: Active Directory’s…
  • Finding Passwords in SYSVOL & Exploiting Group…
  • Securing Domain Controllers to Improve Active…
  • Securing Windows Workstations: Developing a Secure Baseline
  • Detecting Kerberoasting Activity
  • Mimikatz DCSync Usage, Exploitation, and Detection
  • Scanning for Active Directory Privileges &…

Categories

  • ActiveDirectorySecurity
  • Apple Security
  • Cloud Security
  • Continuing Education
  • Entertainment
  • Entra ID Security
  • Exploit
  • Hacking
  • Hardware Security
  • Hypervisor Security
  • Interview
  • Linux/Unix Security
  • Malware
  • Microsoft Security
  • Mitigation
  • Network/System Security
  • PowerShell
  • RealWorld
  • Security
  • Security Conference Presentation/Video
  • Security Recommendation
  • Technical Article
  • Technical Reading
  • Technical Reference
  • TheCloud
  • Vulnerability

Tags

ActiveDirectory Active Directory ActiveDirectorySecurity Active Directory Security ActiveDirectorySecurityTip ADReading ADSecurity AD Security Azure DCSync DomainController GoldenTicket HyperV Invoke-Mimikatz KB3011780 KDC Kerberoast Kerberos KerberosHacking KRBTGT LAPS LSASS MCM MicrosoftEMET MicrosoftWindows mimikatz MS14068 PassTheHash PowerShell PowerShellCode PowerShellHacking PowerShellv5 PowerSploit PowerView Presentation Security SilverTicket SneakyADPersistence SPN TGS TGT Windows10 WindowsServer2008R2 WindowsServer2012 WindowsServer2012R2

Recent Posts

  • Detecting Fake Active Directory Password Changes
  • Active Directory Security Tip #16: Mitigating Kerberoast Attacks
  • Active Directory Security Tip #15: Active Directory Domain Root Permissions
  • Active Directory Security Tip #14: Group Managed Service Accounts (GMSAs)
  • Improve Entra ID Security More Quickly

Recent Comments

  • Gxxxx on Active Directory Security Tip #1: Active Directory Admins
  • Sean Metcalf on Securing Domain Controllers to Improve Active Directory Security
  • Oliver on Securing Domain Controllers to Improve Active Directory Security
  • Oddvar Moe on Securing Windows Workstations: Developing a Secure Baseline
  • Kurt Falde on Securing Windows Workstations: Developing a Secure Baseline

Archives

  • March 2026
  • January 2026
  • December 2025
  • November 2025
  • October 2025
  • September 2025
  • August 2025
  • December 2020
  • May 2020
  • January 2020
  • August 2019
  • March 2019
  • February 2019
  • October 2018
  • August 2018
  • May 2018
  • January 2018
  • November 2017
  • August 2017
  • June 2017
  • May 2017
  • February 2017
  • January 2017
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • July 2013
  • November 2012
  • March 2012
  • February 2012

Categories

  • ActiveDirectorySecurity
  • Apple Security
  • Cloud Security
  • Continuing Education
  • Entertainment
  • Entra ID Security
  • Exploit
  • Hacking
  • Hardware Security
  • Hypervisor Security
  • Interview
  • Linux/Unix Security
  • Malware
  • Microsoft Security
  • Mitigation
  • Network/System Security
  • PowerShell
  • RealWorld
  • Security
  • Security Conference Presentation/Video
  • Security Recommendation
  • Technical Article
  • Technical Reading
  • Technical Reference
  • TheCloud
  • Vulnerability

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Copyright

Content Disclaimer: This blog and its contents are provided "AS IS" with no warranties, and they confer no rights. Script samples are provided for informational purposes only and no guarantee is provided as to functionality or suitability. The views shared on this blog reflect those of the authors and do not represent the views of any companies mentioned. Content Ownership: All content posted here is intellectual work and under the current law, the poster owns the copyright of the article. Terms of Use Copyright © 2011 - 2025.

Content Disclaimer: This blog and its contents are provided "AS IS" with no warranties, and they confer no rights. Script samples are provided for informational purposes only and no guarantee is provided as to functionality or suitability. The views shared on this blog reflect those of the authors and do not represent the views of any companies mentioned.

Made with by Graphene Themes.