Blog | G5 Cyber Security

Windows Password Hashing: Username Salting?

TL;DR

No, modern Windows systems (Windows 10 and later) do *not* directly salt password hashes with the username. They use a more sophisticated approach involving a unique salt per-user generated randomly, combined with key stretching using PBKDF2-HMAC-SHA1 or similar algorithms. Older systems (pre-Windows 10) may have used weaker methods, but relying on username salting is not a secure practice.

Understanding Password Hashing & Salting

Before we get into Windows specifics, let’s quickly cover the basics:

How Windows Handles Password Hashing

Windows uses different methods depending on the version and configuration. Here’s a breakdown:

1. Modern Windows (Windows 10 & Later)

  1. Unique Salt per User: Each user account gets its own randomly generated salt. This is stored alongside the password hash in the Security Account Manager (SAM) database or Active Directory.
  2. Key Stretching: Windows uses key stretching algorithms like PBKDF2-HMAC-SHA1, SHA512, or similar to slow down the hashing process. This makes brute-force attacks much more difficult and time-consuming. The salt is used as input to this algorithm.
  3. No Username in Hash: The username itself isn’t directly included in the hash generation process. Including it would create predictable patterns attackers could exploit.

You can verify the hashing configuration using tools like mimikatz (for testing purposes only, and with appropriate permissions) or by examining the password policy settings.

2. Older Windows Versions (Pre-Windows 10)

Older versions of Windows used less secure methods:

Checking Password Hash Configuration

You can use PowerShell to check the password policy settings:

Get-LocalGroupPolicy -Name 'Security Settings' | Where-Object {$_.Path -like '*PasswordHistory*'}

This will show you the configured password history length, complexity requirements and other relevant security settings. While this doesn’t directly reveal the hashing algorithm used, it indicates the level of security applied.

Why Username Salting is Bad

Mitigation & Best Practices

  1. Keep Windows Updated: Regularly update your operating system to benefit from the latest security patches and improvements.
  2. Strong Password Policies: Enforce strong, unique passwords with sufficient length and complexity.
  3. Multi-Factor Authentication (MFA): Implement MFA wherever possible for an extra layer of cyber security.
  4. Account Monitoring: Monitor user accounts for suspicious activity.
  5. Regular Security Audits: Conduct regular security audits to identify and address potential vulnerabilities.
Exit mobile version