Reversing Microsoft’s Windows95 Product Key Check Mechanism
The Windows 95 product key validation algorithm was weak: it only checked that the first three digits were not in a small exclusion list and that the sum of the next seven digits was divisible by seven. An attacker could therefore generate valid product keys without purchasing a licence.
Published on infosecwriteups.com
Do you know that 111–1111111 is a valid Windows95 product key, so is 000–0000007? I didn’t.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The validation relied on a trivial arithmetic check (sum of digits divisible by 7) and a short exclusion list, with no cryptographic signature or server-side verification.
Impact
An attacker could bypass product activation and use Windows 95 without a legitimate key.
What the attacker needed
Windows 95 installation media; Ability to run reverse engineering tools
The fix
The algorithm should have used a cryptographic signature or online verification instead of a simple divisibility check.
How it was found
- Extract the Windows 95 ISO and CAB files to obtain setupx.dll.
- Open setupx.dll in Ghidra and locate the PIDVALIDATE function.
- Identify the PersonalProductKeyCheck and OEM_KeyCheck subroutines.
- Analyse the checks: first three digits not in exclusion list, and sum of next seven digits divisible by 7.
- Test a generated key such as 111-1111111 during installation.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A product key is a code that proves you bought software. Windows 95 only checked two simple rules: the first three digits could not be certain numbers, and the last seven digits had to add up to a multiple of seven. Anyone who knew these rules could make up working keys.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.