-
-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encrypted ZIP File with .docx Documents #81
Comments
Hi, the problem you face is to guess some compressed plaintext. Your files were compressed and then encrypted when added to the zip file. The known plaintext attack uses a portion of data right before encryption, that is to say compressed data in your case. Now, you may wonder how to guess such compressed data? If you cannot guess plaintext, then you might consider using a password cracker such as john the ripper or hashcat. |
First of all @kimci86 what for a response time do you have ?!?!? I figured that without a complete file this would be difficult to impossible. Would it be theoretically possible for bkcrack to have one of the two docx files as original and create this as a ZIP, using the method Deflate Maximum? |
No, the CRC value is computed on uncompressed data, so it does not give information about compression. If the CRC matches, then you have to guess how the file was compressed: what compression program with what parameters. Looking at the compressed size is a simple way to discard wrong parameters. Note that encryption adds a 12 bytes encryption header to ciphertext, so the compressed size you would try to get is the encrypted file's size minus 12.
Yes, this process of trying compression tools and parameters could be automated to some extent. It is not implemented at the moment but it would be nice to have. It would not be exhaustive but at least trying with zlib deflate implementation could be a good start. |
I am closing this as I believe your questions have been answered. Feel free to reopen if I am mistaken or open a new issue if you have other questions or feedback. |
So I've found an old ZIP File on my computer with two docx files in it.
Unfortunately I set a password years ago...
7z l -slt
`Path = Example_of_C_Code.docx
Folder = -
Size = 1101098
Packed Size = 1055092
Attributes = A
Encrypted = +
Comment =
CRC = 88DA98B2
Method = ZipCrypto Deflate
Host OS = FAT
Version = 20
Volume Index = 0
Path = How_I_made_it.docx
Folder = -
Size = 36693
Packed Size = 30468
Attributes = A
Encrypted = +
Comment =
CRC = 3FC01F92
Method = ZipCrypto Deflate
Host OS = FAT
Version = 20
Volume Index = 0`
So now I make these steps as I understood:
bkcrack -C path_to_encrypted.zip -c Example_of_C_Code.docx -P plain.zip -p plain.docx
bkcrack tells me could not find the keys.
What am I doing wrong?
Thank you for the help, much appreciated in advance!
The text was updated successfully, but these errors were encountered: