hashcat使用
安裝地址
安裝hashcat:(linux)
git clone https://github.com/hashcat/hashcat.git cd hashcat makeoffice2john.py下載:
John: run/office2john.py | Fossies
使用步驟
hashcat與office2john.py配套使用
Step1:
先使用office2john.py對目標文檔進行hash值提取
并且有文檔版本(之后會用到)
python2 office2john.py <文件路徑>
得到形式如:
1.docx:$office$?201010000012816*265c4784621f00ddb85cc3a7227dade7*f0cc4179b2fcc2a2c5fa417566806249*b5ad5b66c0b84ba6e5d01f27ad8cffbdb409a4eddc4a87cd4dfbc46ad60160c9
這樣的字符串;將其保存為txt文件(只要":"之后的字符串)
Step2:
使用hashcat進行破解
對照網站[hashcat wiki]尋找到文檔對應的版本號(如MS Office 2010的記號是9500)
hashcat分為多個破解模式使用 -a x調整
- Wordlist :hashcat -a 0
- Wordlist + Rules :hashcat -a 0
- Brute-Force :hashcat -a 3
- Combinator :hashcat -a 1
這里介紹暴力破解的命令:
hashcat -a 0 -m xxxx hash.txt ?d?d?d?d
補充:
?a 表示大小寫字母數字符號 包含?l?u?d?s,重復幾次表示密碼有幾位
?d 表示數字
?l 小寫字母
?u 大寫字母
?s 特殊字符 ?space?!"#$%&’()*+,-./:;<=>?@[]^_`{|}~
?b 0x00 - 0xff
?h 十六進制字符 0123456789abcdef
?H 大寫的十六進制字符 0123456789ABCDEF
報錯及其他相關文章
一些關于hashcat使用的文章:
hashcat(一)找回office文件密碼-zodream夢想開源/個人編程日記
hashcat破解office(97-03,2007,2010,2013)密碼 | 二哈博客 (zmyth.me)
有關hashcat使用的ctf題目:BUUCTF在線評測 (buuoj.cn)
還有一些關于hashcat常見報錯:
Token length exception No hashes loaded. 實際上是hash文件(也就是剛才我們保存的txt文件的格式有問題,是形如$…$…*…的字符串)
Signature unmatched 文檔的記號找錯了(是-m之后的數字)在網站里面仔細找找多試試
總結
- 上一篇: CF1527D MEX Tree(mex
- 下一篇: Unity报错: Broken text