Skip to content

Commit 0be9219

Browse files
committed
Add doc about cracking word password
1 parent 48e0c44 commit 0be9219

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

notes/crack-word-password.md

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Cracking Microsoft Office Document Passwords using Hashcat
2+
3+
## Extracting the Password Hash from the Office Document
4+
5+
Download this script https://github.com/truongkma/ctf-tools/blob/master/John/run/office2john.py and make it executable
6+
7+
chmod +x ./office2john.py
8+
9+
After run:
10+
11+
./office2john.py Docs.docx > officepassword
12+
13+
14+
Open the officepassword file you just created in vim
15+
16+
vim officepassword
17+
18+
You’ll see something like this inside the file:
19+
20+
Docs.docx:$office$*2013*100000*256*16*a46afa1e61b050e43b963c3c4939284b*e2...
21+
22+
You’ll need to remove the filename and colon from the beginning of this line, and save the file.
23+
24+
$office$*2013*100000*256*16*a46afa1e61b050e43b963c3c4939284b*e2...
25+
26+
27+
## Crack the Hash
28+
29+
Cracking passwords with Hashcat using only CPU power is very slow and isn’t recommended, unless you have a very short wordlist of what the password might be. GPU is much preferred.
30+
31+
### Crack the Hash using wordlist
32+
33+
You can download wordlist `rockyou.txt` from https://github.com/danielmiessler/SecLists/tree/master/Passwords
34+
35+
hashcat -w 3 -m 9600 -o cracked officepassword rockyou.txt
36+
37+
The -m 9600 flag in this command lets Hashcat know that we're working with an Office 2013 document.
38+
39+
### Crack the Hash using random bruteforce
40+
41+
This command tries to guess password from 2 to 9 symbols using any character
42+
43+
hashcat -a 3 -i --increment-min=2 -w 3 -m 9600 -o cracked officepassword ?a?a?a?a?a?a?a?a?a
44+
45+
46+
47+
When the hash is cracked successfully, your cracked password should be output in the file cracked, as specified with the -o parameter above.
48+

0 commit comments

Comments
 (0)