I have allfiles.zip
contains only file allfiles.exe
and is password protected. I heard about pkcrack
, it is possible to get the file from a zip file which is encrypted if we have some part of encrypted zip.(Correct me if I'm wrong)
So, with that statement, I have add a plaintext file(words.txt
) to allfiles.zip
, created another zip file wordfiles.zip
which contains only plaintext file words.txt
and run pcrack
.(You can see below step-by-step)
- Initially we have password protected zip
allfiles.zip
-> allfiles.exe
- Add a dummy plaintext file to
allfiles.zip
. Now the fileallfiles.zip
contains 2 files
allfiles.zip
-> allfiles.exe
-> words.txt
- Create a zip file contains only
words.txt
wordfiles.zip
-> words.txt
- Run pkcrack on those files
./pkcrack -C allfiles.zip -c words.txt -P wordfiles.zip -p words.txt -d allfiles.exe1 -a
Warning! Plaintext is longer than Ciphertext!
Files read. Starting stage 1 on Thu Feb 28 11:39:48 2019
Generating 1st generation of possible key2_255982 values...done.
Found 4194304 possible key2-values.
---OUTPUT REMOVED----
Lowest number: 93 values at offset 246121
Done. Left with 93 possible Values. bestOffset is 246121.
Stage 1 completed. Starting stage 2 on Thu Feb 28 11:40:10 2019
Stage 2 completed. Starting zipdecrypt on Thu Feb 28 11:40:15 2019
No solutions found. You must have chosen the wrong plaintext.
Finished on Thu Feb 28 11:40:15 2019
Is this a right way to crack? What is the best way to crack?(Other than fcrackzip
)
allfiles.exe
. If you did, then you could recover the encryption pattern (the 'keystream') and apply it to other files, of which you might not have the plaintext (e.g. ifallfiles.zip
contains another file which you don't yet know the contents of, but it doesn't: there is onlyallfiles.exe
).words.txt
has to be encrypted in a same way asallfiles.exe
to make this trick work