This article will introduce in detail how to use Hashcat to crack Word document password, including preparation, basic principles of Hashcat, specific operation steps, and how to improve the success rate of cracking. Even if you're a tech novice, you can follow this guide step by step to retrieve your lost password.
Microsoft Word (2010 and later) uses AES-256 encryption by default, which is more secure. The early Word 97-2003 used RC4 encryption, which was relatively easy to crack.
When a user sets a password, Word will:
Hash the password (convert it to a fixed-length string).
Use that hash to encrypt the document content.
Therefore, the essence of cracking a Word password is:
Extract the password hash of the document (similar to a "fingerprint").
Use Hashcat to try different password combinations until the match is successful.
Hashcat cannot directly read .docx or .doc files, and needs to extract the hash value of the password first. We can do this using office2john.py tools (from the John the Ripper toolset).
Visit the Python official website to download and install Python (version 3.8+ recommended).
Download the office2john.py script (available on GitHub by searching for "John the Ripper").
Open the command line (Windows:cmd/macOS/Linux:Terminal) and run:
bash
copy
Download
python office2john.py 你的文件.docx > hash.txt
When executed, the hash.txt file will contain a hash value similar to the following:
copy
Download
$office$*2013*100000*256*16*...*你的哈希值
This hash is what we're going to crack.
Download from the official website: https:// hashcat.net/hashcat/
Support Windows/Linux/macOS, NVIDIA graphics card (CUDA acceleration) or AMD graphics card (OpenCL acceleration) is recommended.
Hashcat supports a variety of cracking modes, the common ones are:
Dictionary Attack: Attempts using a list of common passwords, such as rockyou.txt.
Mask Attack: Known partial cryptographic structures (e.g., "Pass123?"). )。
Brute-Force: Try all possible combinations (for short passwords).
bash
copy
Download
hashcat -m 9600 hash.txt rockyou.txt
-m 9600 indicates the hash pattern of Word 2013+.
rockyou.txt is a commonly used password dictionary (available for download on the web).
If you remember that your password starts with "Pass" followed by a number, you can try:
bash
copy
Download
hashcat -m 9600 hash.txt -a 3 "Pass?d?d?d"
?d represents a number (0-9).
?l stands for lowercase letters (a-z).
?u stands for capital letters (A-Z).
bash
copy
Download
hashcat -m 9600 hash.txt -a 3 ?l?l?l?l?l?l
This tries all 6-digit lowercase letter combinations and works well for simple passwords.
rockyou.txt (including tens of millions of common passwords).
Custom dictionaries: Combine personal information (e.g., birthday, name, common words).
Hashcat supports "rules" to transform dictionaries, such as:
Case conversion (password→ password, PASSWORD).
Add numbers/symbols (pass→ pass123, pass!).
Example:
bash
copy
Download
hashcat -m 9600 hash.txt dict.txt -r rules/best64.rule
GPU cracking is more than 100 times faster than CPU, and it is recommended to use high-end graphics cards such as NVIDIA RTX 4090.
If your computer is not performing enough, consider a cloud server (such as an AWS GPU instance) or a proxy service (to save time).
If a user forgets a 6-digit numeric-only password (e.g., "198504"), the user uses a mask to attack:
bash
copy
Download
hashcat -m 9600 hash.txt -a 3 ?d?d?d?d?d?d
It only takes 10 seconds to successfully recover the password.
The password may be "Company2024!", but the case and symbols are not determined. Terms of Use:
bash
copy
Download
hashcat -m 9600 hash.txt dict.txt -r rules/leetspeak.rule
After 2 hours, the match was "COMPANY2024!".
Extract Hash: Use office2john.py to get the hash of your Word password.
Select the following attack mode: dictionary attack (recommended to try first), mask attack (partially known), brute-force attack (short password).
Optimization strategy: Use stronger dictionaries, rules, and GPU acceleration.
Consider running on behalf of the service: If the hardware is insufficient, you can find a professional team to run on your behalf to save time.
If you encounter the problem of forgetting Word password, you may wish to follow this tutorial to try to crack it. If you have a high technical threshold, you can also choose a professional Hashcat running service to retrieve your password efficiently and safely!