In a lesson of Computer Security our teacher showed us how to find out the password of a zip.
I tried his steps at home but now I'm stuck:
- Created 2 zip with same file:
plain_zip.zip
without password andencrypted_zip.zip
with a 4 characters psw:1234
- Create another zip with another file:
plain_zip_2.zip
andencrypted_zip_2.zip
. - Show through terminal his header (I don't remember the command line) and see that both:
plain_*.zip
andencrypted_*.zip
has similar lines - Through a
XOR operation
between encrypted and plain zip find out the password. (He told us that's possible only if the password is 4 characters)
Now someone can tell me if these steps are correct? And moreover, how can see the header of a file? (I tried with: head -n 1 plain_zip.zip
without success)