kimci86 / bkcrack

Crack legacy zip encryption with Biham and Kocher's known plaintext attack.
zlib License
1.69k stars 163 forks source link

why cant i crack using png beginning #139

Closed seacremai closed 3 weeks ago

seacremai commented 3 weeks ago

i have a archive with only png files inside and i cant crack it using -x 0 89504e470d0a1a0a0000000d49484452 which some other person mentioned or getting another png file and using -t but it doesnt seem to work its zipcrypto with deflate

kimci86 commented 3 weeks ago

That is because you are providing uncompressed PNG header bytes but you are targeting a compressed entry (zipcrypto deflate). If by chance one of the entries in not compressed (zipcrypto store), then try to target that entry. Otherwise you have to provide bytes of a deflate compressed PNG. If you know one entry content in full, try compressing it to get valid compressed data. If you know only a small part, then guessing compressed data might too hard because of deflate algorithm behavior: compressing a prefix of a file does not give a prefix of the compressed file in general.

seacremai commented 3 weeks ago

thanks i guess im sol