Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 27 Apr 2021 09:14:32 +0800
From: Ian B <Ian.Blakeley@...lhouse-communications.co.uk>
To: john-users@...ts.openwall.com
Subject: Extracting the hash from MS word

I am going through an old directory and binning/checking some old documents 
~2005/6 there's a few encrypted word documents for which I have forgotten the 
password. I successfully recovered the hash and hence the password from a few 
with the office2john.py script. However, for two of them this fails with the 
following issue

em1.doc : invalid keySize
Traceback (most recent call last):
   File "./office2john.py", line 3148, in <module>
     ret = process_file(sys.argv[i].decode("utf8"))
   File "./office2john.py", line 3109, in process_file
     passinfo = find_rc4_passinfo_doc(filename, workbookStream)
   File "./office2john.py", line 2553, in find_rc4_passinfo_doc
     if typ == 3:
UnboundLocalError: local variable 'typ' referenced before assignment

Looking with a hex editor it seems to be a valid Word document, MS Word 
certainly recognises it and asks for the forgotten password, LibreOffice 
refuses with unsupported encryption. Not sure if it is a bug in the script or 
some silly error I am making. The point of failure in the script is looking 
for either a 128 or a 40 bit key.

-- 
Ian

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.