Trustwave Unveils New Offerings to Maximize Value of Microsoft Security Investments. Learn More

Trustwave Unveils New Offerings to Maximize Value of Microsoft Security Investments. Learn More

Managed Detection & Response

Eliminate active threats with 24/7 threat detection, investigation, and response.

Co-Managed SOC (SIEM)

Maximize your SIEM investment, stop alert fatigue, and enhance your team with hybrid security operations support.

Advisory & Diagnostics

Advance your cybersecurity program and get expert guidance where you need it most.

Penetration Testing

Test your physical locations and IT infrastructure to shore up weaknesses before exploitation.

Database Security

Prevent unauthorized access and exceed compliance requirements.

Email Security

Stop email threats others miss and secure your organization against the #1 ransomware attack vector.

Digital Forensics & Incident Response

Prepare for the inevitable with 24/7 global breach response in-region and available on-site.

Firewall & Technology Management

Mitigate risk of a cyberattack with 24/7 incident and health monitoring and the latest threat intelligence.

Offensive Security
Solutions to maximize your security ROI
Microsoft Exchange Server Attacks
Stay protected against emerging threats
Rapidly Secure New Environments
Security for rapid response situations
Securing the Cloud
Safely navigate and stay protected
Securing the IoT Landscape
Test, monitor and secure network objects
Why Trustwave
About Us
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Security Operations Platform
Trustwave Security Colony
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats
SpiderLabs Blog

Stamping Out Hash Corruption, Like a Boss

Have you ever dumped LM and NTLM password hashes from a Windows system using the registry and never been able to crack the hashes or pass the hash? If so, maybe this blog post will be of specific interest and/or importance to you.

A couple months ago, my good friend Ryan Reynolds of Crowe Horwath explained to me that often times he would extract password hashes from a Windows system via the Windows registry and the hashes would never crack. He also discovered that when he pulled password hashes using other techniques, like LSASS injection, that he would get entirely different hashes, which in fact did crack successfully.

Here is just one example Ryan found when extracting hashes from Metasploit (via SAM/SYSTEM) and Pwdump6 (via LSASS injection).

  • Hash Extraction via Registry using Metasploit
    • LM: 4500a2115ce8e23a99303f760ba6cc96
    • NTLM: 5c0bd165cea577e98fa92308f996cf45
  • Hash Extraction via Injection using Pwdump6
    • LM: aad3b435b51404eeaad3b435b51404ee
    • NTLM: 5f1bec25dd42d41183d0f450bf9b1d6b

After hearing a bit about this problem and knowing full well that we were getting bad hashes, Ryan and I decided that we would put our heads together and see if we could solve this problem.


Here are some highlights that resulted from our research:


  • The corruption problem has been around since the late 90's
  • This has affected Penetration Testers, Forensic Investigators and anyone else extracting password hashes from Windows Systems during this time.
  • Nearly all the registry extraction tools we tested, including the following were affected:
  • This behavior was observed on the following Windows Operating Systems:
    • Windows 2000, Windows XP, Windows 2003, Windows Vista, Windows 7, Windows 2008, Windows 8 Pre-Release and interim versions and service packs
  • We discovered the source of this problem to be a logic flaw in how the registry information was being processed.
  • We developed patches for tools that were open-source and are actively working with community developers to ensure that this problem is "Stamped Out".

Here are the slides that we delivered at DEFCON 20 for your viewing pleasure:



Additionally, for those who don't like power point slides and would prefer reading RFC-like docs, we developed a 15-page white paper (PDF|Google Doc) that describes the process in uber detail for your reading pleasure.
This post would not be complete if we didn't show you how this hash corruption stuff works. Below we have provided the demonstration video that we used in our DEFCON and BlackHat presentations that shows corrupted hash extraction on Windows 8 using Metasploit.

We hope that solving this problem for password cracking tools will help security professionals of all types obtain the correct password hashes from systems to evaluate their true state.

Here's a quick status of where we currently are with our patching efforts at the time of this writing:

  • Creddump - Fixed in Creddump Creddump v0.3
  • Metasploit - Fixed in Metasploit since pull request #587 (7/15/12)
  • L0phtcrack - Fixed in L0phtCrack v6.0.16
  • Samdump2 - Fixed in Samdump v1.1.1 (fix pre-dates our research, but noting it anyways)
  • Fgdump - Fix still in progress as SAM/SYSTEM variant of Fgdump is still BETA
  • Cain and Able - Still awaiting response from Author
  • Pwdump7 - Still awaiting response from Author

If you have experienced this problem in the course of your work (or perhaps with a different tool not listed above) and the result of this research has directly helped you, we would really like to hear from you by commenting on this post.

Latest SpiderLabs Blogs

Using AWS Secrets Manager and Lambda Function to Store, Rotate and Secure Keys

When working with Amazon Web Services (AWS), we often find that various AWS services need to store and manage secrets. AWS Secrets Manager is the go-to solution for this. It's a centralized service...

Read More

Facebook Malvertising Epidemic – Unraveling a Persistent Threat: SYS01

The Trustwave SpiderLabs Threat Intelligence team's ongoing study into how threat actors use Facebook for malicious activity has uncovered a new version of the SYS01 stealer. This stealer is designed...

Read More

Tips for Optimizing Your Security Operations Framework

Building an effective Security Operations framework that provides the right balance of people, processes, and technologies can take years.

Read More