6

I have a text file (.txt) compressed in ZIP format protected by a password. I think it has only one line of text and I want to see the contents of this file.

I tried fcrackzip but I think the password is more complicated than I imagine, so the question is: is it possible to see the content without needing to have the password of the file?

I am not an expert in computer security but a somewhat absurd idea that comes to mind quickly is something like seeing the hexadecimal code of the file and trying to decipher it.

6
  • 5
    If you could see the "hexadecimal code of the file" then so could the computer and then why wouldn't the computer display it as text for you?
    – user253751
    Jan 2, 2018 at 12:16
  • Be aware that softwarerecs.stackexchange.com is the correct place to ask for an app - but I am not sure if they would allow asking for what look like hacking tools (best phrase it as "lost password recovery" ;-) Jan 2, 2018 at 13:49
  • 9
    see the content without needing to have the password I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. Jan 2, 2018 at 16:01
  • 2
    @JohnGordon nor comprehend it... :)
    – RonJohn
    Jan 2, 2018 at 16:27
  • No, not without an unrealistically large resource investment (assuming the the password was chosen in a way that makes it hard to guess). Otherwise it would defeat the entire point of having a password in the first place. Jan 2, 2018 at 17:36

3 Answers 3

24

No. There are two ways of zip encryption, a classic one, which is weaker, and a newer one based on AES.

In both cases the password is needed in order to decrypt the contents (i.e. it's not just UI, where you could be asked for a password without the program actually requiring it to read the file). So the process would involve breaking the password (which would be more or less complex depending on the algorithm used and how the password was used).

At most, you would be able to obtain without decrypting, in addition to the filename, the CRC32 of the plain file. But although that would help if you already suspected what the content was, it probably won't be helpful here, even if it is just a line of text.

7
  • 8
    Seems like poor design if the encrypted format actually leaks a CRC of the plaintext.
    – kasperd
    Jan 2, 2018 at 10:08
  • 3
    @kasperd the conspiracy theorist me would say it's by design; you keep an encrypted version of a file you're not meant to have, three letter agency arrests you for possession of said file with CRC32 Jan 2, 2018 at 16:28
  • 5
    @HaykoKoryun: There are many files which share a CRC32, necessarily.
    – MSalters
    Jan 2, 2018 at 16:48
  • 4
    What are you trying to say is "not asked by the UI but not actually required"? The password? You just said the password is needed, so that doesn't seem to make sense. Jan 2, 2018 at 17:27
  • 4
    @kasperd The whole original design of ZIP encryption was flawed, and it's generally considered to be insecure. WinZip-defined AES-256 encryption, on the other hand, will produce a CRC of all zeros, and therefore leaks no data about the original file (other than the original size, timestamp, and name). Jan 2, 2018 at 20:21
11

No, nowadays zip files are protected by AES. This will hide all of the plaintext in a way that you can only recover it when you have the key. The only other thing you can see is the size of the plaintext as that is as good as identical to the size of the ciphertext.

Hexadecimals are just a readable representation of the bytes that make up the ciphertext. However, as the ciphertext will consist of byte values indistinguishable from random, that will not help you one iota.

0
9

Unfortunately, not really.

What you must understand here is that we are not speaking of a file that "is there", access to the original contents is not actively being blocked by the zip software you are using. That would make password protection essentially useless, as another software could just show the file without asking for the password, right?

Instead, the file content itself is cryptographically encrypted, and the password you are being asked for is the actual decryption key itself, which is required to transform the encrypted contents to their original form.

In theory, it is possible to brute-force the key, but this is only possible in practice if you have a finite (and "not too long") list of possible keys, or if the key is considerably short (which, according to your question, does not seem to be the case).

1
  • 11
    What a strange use of the word "Unfortunately"
    – user123931
    Jan 2, 2018 at 18:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .